Coder Social home page Coder Social logo

monky's Introduction

Monky An Emacs mode for Hg

Monky provides an interactive interface for Hg.

screenshot

Installation

(add-to-list 'load-path "path/to/monky/dir")
(require 'monky)

;; By default monky spawns a seperate hg process for every command.
;; This will be slow if the repo contains lot of changes.
;; if `monky-process-type' is set to cmdserver then monky will spawn a single
;; cmdserver and communicate over pipe.
;; Available only on mercurial versions 1.9 or higher

(setq monky-process-type 'cmdserver)

Usage

open any file in a hg repo and run M-x monky-status to see the current status. Look at the documentation for further details.

Thanks

Heavily borrowed from Magit. Thanks to Marius Vollmer.

Contributors

ananthakumaran (Anantha Kumaran)

lyro (Frank Fischer)

tkf (Takafumi Arakaki)

monky's People

Contributors

ananthakumaran avatar bounga avatar daarno avatar deangiberson avatar gjnoonan avatar htgoebel avatar juszczakn avatar kuribas avatar lbolla avatar mjoerg avatar mrighele avatar ncalexan avatar ounim avatar stephan-cr avatar thierryvolpiatto avatar tkf avatar wilfred avatar xecycle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monky's Issues

Prepopulate commit message buffer with hg's usual output

This seems to work if you have with-editor installed:

M-x eshell
$ with-editor-export-editor                                                                                                                                                                                                                                                   
Successfully exported EDITOR
$ hg commit

This give you a nice buffer with HG things:



HG: Enter commit message.  Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: Wilfred Hughes <[email protected]>
HG: changed ...

Support discarding hunks

At least in the case where a file has a single hunk, we should support discarding it when point is inside the hunk.

missing reset (x) command

Magit has a command to reset, I believe the hg equivalent is hg update -C or hg revert -r tip path/to/file (for a file)

Discard item (k) not working

I have a modified file that I'm trying to discard the changes to. I hit 'k' then the buffer asks "Revert [file]? (y or n)" I hit 'y' and the message says "Invalid function: monky-with-refresh"

pop queue patch error

When I try to pop a patch ('u'), I get the following stack trace:

Debugger entered--Lisp error: (invalid-function monky-with-refresh)
  monky-with-refresh(t)
  monky-run-hg("qpop" "--config" "extensions.mq=" "nand-updates")
  apply(monky-run-hg "qpop" "--config" "extensions.mq=" "nand-updates")
  monky-qpop("nand-updates")
  #[nil [item cl-struct-monky-section-tags info *type* *context* monky-current-section 0 error "monky-section-info accessing a non-monky-section" 8 "monky-section-type accessing a non-monky-section" 5 monky-section-context-type monky-prefix-p (patch applied) monky-qpop t (applied) monky-qpop-all "Nothing to %s here" "qpop" "Can't %s as %s"] 5]()
 monky-refresh-wrapper(#[nil   [item cl-struct-monky-section-tags info *type* *context* monky-current-section 0 error "monky-section-info accessing a non-monky-section" 8 "monky-section-type accessing a non-monky-section" 5 monky-section-context-type monky-prefix-p (patch applied) monky-qpop t (applied) monky-qpop-all "Nothing to %s here" "qpop" "Can't %s as %s"] 5])
  monky-qpop-item()
  call-interactively(monky-qpop-item nil nil)

monky doesn't ask password when pushing/pulling to a private repository (only on tty terminal)

When executing emacs on a tty terminal like a remote ssh session and you try to push a commit to a private mercurial repository using a ssh key rsa it responds "no suitable response from remote hg!" because it's waiting for a password to decrypt the private key.

On a graphical display a window popsup asking for the password to decrypt the private key, and it works. I suppose this is a feature of the window system.

Testing on:
Ubuntu server 14.04
mercurial repository bitbucket.org
using an encrypted private ssh key rsa

log for a single file?

Is there a log view that shows commits for a single file? I know there's blame, but that's not what I want.

monky-log UI only really supports one font size

The implementation of the log feature is based on character-based column width, which causes UI issues whenever the font size is not as expected.

The solution for this would be to dynamically choose the expected column width, or to not use the default configured font. The entire way it's displayed could be reworked to not be static as well.

screenshot from 2017-09-27 18-44-27

screenshot from 2017-09-27 18-57-53

Status buffer does not show names of modified files

When I do "monky-status" in the working copy with couple of untracked files and couple of modified files I dont see the names of modified files:

Untracked files:
    dates_and_times.pdf
    xdot.py

Changes:
    Modified   nil
    Modified   nil

When I press Tab on "Modified" line I could see the diff and infer the file name from the first line of the diff output.

I tried debuggin monky-insert-changes. Seems like monky-wash-sequence and monky-with-wash-status are ok (after all, "Untracked files" are displayed properly). I tried tracing monky-insert-diff, but got lost in the macros :(

Is it a known problem?

I am running monky from git as of 15 Sep 2011 on GNU Emacs 23.2.1 (x86_64-redhat-linux-gnu, GTK+ Version 2.10.4) of 2010-08-06 (CentOS 5.5)

"decode-coding-region: Removing old name" error, no function works

emacs: 24.3-r2(24)(16:02:34 08/07/13)
compilation flags: X alsa gif gtk gtk3 jpeg png tiff xft xpm

error: Debugger entered--Lisp error: (coding-system-error ascii)
decode-coding-region(1 29 ascii)
monky-cmdserver-runcommand("--config" "diff.git=Off" "root")
apply(monky-cmdserver-runcommand ("--config" "diff.git=Off" "root"))
monky-cmdserver-process-file("hg" nil (t "/tmp/monky-temp-file28709G5q") nil "--config" "diff.git=Off" "root")
apply(monky-cmdserver-process-file ("hg" nil (t "/tmp/monky-temp-file28709G5q") nil "--config" "diff.git=Off" "root"))
monky-process-file("hg" nil (t "/tmp/monky-temp-file28709G5q") nil "--config" "diff.git=Off" "root")
apply(monky-process-file "hg" nil (t "/tmp/monky-temp-file28709G5q") nil ("--config" "diff.git=Off" "root"))
monky-hg-output(("root"))
monky-hg-string("root")
monky-get-root-dir()
monky-status()
call-interactively(monky-status record nil)
command-execute(monky-status record)
execute-extended-command(nil "monky-status")
call-interactively(execute-extended-command nil nil)

Allow monky-commit mode to toggle the full commit message

Right now, monky always shows the full commit message. I'd like to be able to toggle the "description:" section, so that we see the shortlog by default and the full log on toggle. (This is a Magit's default behaviour, and I quite like it.)

License

Hello,

I would be interested in knowing what is the license for monky and see if it can be added to the repo

Two groups are used for monky faces

This is an example from the code.

(defface monky-section-title
  '((t :weight bold :inherit monky-header))
  "Face for section titles."
  :group 'monky-faces)

(defface monky-branch
  '((t :weight bold :inherit monky-header))
  "Face for the current branch."
  :group 'monky)

Are there any reason for this? Or it must be fixed so that all the faces are in monky-faces group?

Queue support

Monky is progressing wonderfully!

Would love to have queue support in monky. Not quite sure what that would look like but I spend a lot of time in the shell using "hg q*"....

monky-qnew ignores staged files

monky-qnew ignores staged files, and adds all modified files (staged & unstaged) to the new patch. It would be helpful if only staged files were included when creating a new patch.

Monky reports "default repository not configured" when pushing to a repository

Hi,

When pushing my commits to a repository, by using the shortcut key P,
I always encounter the error message like below:

Running hg push --branch my-branch-name 
Hg exited abnormally with code 255.
default repository not configured!

It happens to me in both my machines at work and at home.
I have tried to configure the file .hg/hgrc with both default and default-push
but it doesn't work.

Can anyone advise how can I resolve this issue?

Thank you and in advance!

Is monky abandoned?

Last commit is more than a year ago. Is monky abandoned?

We only use Mercurial, it would be so important to be able to rely on such a tool as monky.

Show phases in monky

I think it would be useful to display the phase state of commits in monky. It's handy to know which commits are still in the draft phase.

Running monky-status brings up "Removing old name: No such file or directory"

I just installed monky.el from the latest in master (5e133). When I run monky-status from a buffer in dired mode pointed to a directory with an existing hg repo I get the following message:

call-process: Removing old name: No such file or directory, /var/folders/7n/p4x3tkhd4kj1krmdt18r3nhh0000gn/T/monky-temp-file30190kB8

All of the other monky commands bring up the same message.

Platform: OSX 10.9.4, GNU Emacs 24.3.1 (x86_64-apple-darwin, NS apple-appkit-1038.36)

'Diff' in commit messages confuses monky

Given the following commit:

$ hg show
changeset:   c3b6a6540e61c13c0a1e9da773b5a2174557ee72   (@)
user:        Wilfred Hughes <[email protected]>
date:        Fri, 21 Sep 2018 14:20:20 +0100

    An example commit

    Differences are important.

    Hello world.

diff -r 718f54d8eb02 -r c3b6a6540e61 README
--- a/README    Fri Sep 21 14:17:55 2018 +0100
+++ b/README    Fri Sep 21 14:20:20 2018 +0100
@@ -1,1 +1,1 @@
-new content!
+new content again

Monky is confused by 'Differences':

screen shot 2018-09-21 at 14 21 08

Don't assume that load-file-name is defined

When testing monky today, I noticed that I can't just grab the file and do M-x eval-buffer, because of this line:

(defvar monky-el-directory (file-name-directory load-file-name)
  "The parent directory of monky.el")

This errors because load-file-name is nil. Perhaps something like (file-name-directory (or load-file-name default-directory)) would be more robust.

Use lexical-binding

This allows the bytecode compiler to do more optimisations, and also produces more warnings of things that look like bugs.

Add a ? command

It would be useful to have a ? command like magit does. Otherwise, it's hard to discover all the keybindings (I ended up using describe-function on monky-status-mode).

Don't fold diffs when staging changes

If I press <TAB> s, monky expands the diff, but unexpands when the file is staged. This means I need to expand the diff again when writing the commit message.

I know I've been filing several issues, I'm happy to send a PR if you're interested :)

Link to a mercurial clone of the project

I understand the reasoning behind this plugin being hosted in git and on github.
However I think that since it is indeed a plugin for interacting with mercurial
then we should at least have a version in a mercurial repo.

I have a copy (via hg-git) up on bitbucket, is there an "official" one?

monky-status doesn't work

When I invoke monky-status I get the help message from hg in the minibuffer and the status buffer is empty.

It might be because my system's in French.

It happens with both hg 1.8.2 and 1.9

Here's the message (it says "Setting current directory: filename too long, " and then the hg help message):

apply: Setting current directory: nom de fichier trop long, Mercurial, système de gestion de sources distribué

commandes de base :

add add the specified files on the next commit
annotate show changeset information by line for each file
clone make a copy of an existing repository
commit commit the specified files or all outstanding changes
diff diff repository (or selected files)
export dump the header and diffs for one or more changesets
forget forget the specified files on the next commit
init create a new repository in the given directory
log show revision history of entire repository or files
merge merge working directory with another revision
pull pull changes from the specified source
push push changes to the specified destination
remove remove the specified files on the next commit
serve start stand-alone webserver
status show changed files in the working directory
summary summarize working directory state
update update working directory (or switch revisions)
view start interactive history viewer

utiliser "hg help" pour la liste complète des commandes ou "hg -v" pour plus de détails/

EDIT: actually the status buffer is named with the whole help message...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.