| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • Dokkio Sidebar (from the makers of PBworks) is a Chrome extension that eliminates the need for endless browser tabs. You can search all your online stuff without any extra effort. And Sidebar was #1 on Product Hunt! Check out what people are saying by clicking here.

View
 

Mercurial and Emacs

Page history last edited by PBworks 13 years, 11 months ago

Loading mercurial.el

If mercurial is installed, you'll have an emacs-lisp file for adding the bindings in.  Typically this will be in /usr/share/emacs/site-lisp/mercurial

but if it isn't, you can find it by running locate mercurial.el.  Once you've found it, you'll need to add it to your .emacs config file.  Assuming it

is at the above location, the additional lines will look something like the following:

 

;; setting up mercurial                                                        

;; Uncomment the following 2 lines if you don't already have this in your load-path (ubuntu doesn't need these)

;(setq load-path (cons "/usr/share/emacs/site-lisp/mercurial"

;                      load-path))

(require 'mercurial)

 

Useful Bindings

SCM TASK Global / Local Binding Command Name
Help overview (what you are reading) G C-c h h  hg-help-overview
 Add a file to the current repository G C-c h a  hg-add
 Commit changes to the current file L C-x v n  hg-commit-start
 Undo changes to a file since commit L C-x v u  hg-revert-buffer
 Diff a file against the last checkin L C-x v =  hg-diff
 View file change history L C-x v l  hg-log
 View annotated file L C-x v a  hg-annotate
 Diff the repository against the last checkin G C-c h =  hg-diff-repo
 View status of files in a repository G C-c h s  hg-status
 Commit all changes to the repository G C-c h c  hg-commit-start
 Undo all changes since last commit (irreversible) G C-c h U  hg-revert
 View repository change history G C-c h l  hg-log -repo
 See changes that can be pulled G C-c h ,  hg-incoming
 Pull changes G C-c h <  hg-pull
 Update working directory after a pull G C-c h u  hg-update
 See changes that can be pushed

G

C-c h .  hg-outgoing
 Push changes G C-c h >  hg-push

 

Global means global to a repository; local means local to a file.

Comments (0)

You don't have permission to comment on this page.