mercurial.el: implement hg-pull, and stub in hg-update.
authorBryan O'Sullivan <bos@serpentine.com>
Fri, 09 Sep 2005 22:07:10 -0700
changeset 1246 ae96c85fb0af
parent 1231 effff847870f
child 1248 2534b41ce0c5
mercurial.el: implement hg-pull, and stub in hg-update.
contrib/mercurial.el
--- a/contrib/mercurial.el	Fri Sep 09 12:19:24 2005 -0700
+++ b/contrib/mercurial.el	Fri Sep 09 22:07:10 2005 -0700
@@ -993,9 +993,16 @@
 		  (or repo hg-outgoing-repository))
     (hg-log-mode)))
 
-(defun hg-pull ()
-  (interactive)
-  (error "not implemented"))
+(defun hg-pull (&optional repo)
+  "Pull changes from repository REPO.
+This does not update the working directory."
+  (interactive (list (hg-read-repo-name " to pull from")))
+  (hg-view-output ((format "Mercurial: Pull to %s from %s"
+			   (hg-abbrev-file-name (hg-root))
+			   (hg-abbrev-file-name
+			    (or repo hg-incoming-repository))))
+    (call-process (hg-binary) nil t nil "pull"
+		  (or repo hg-incoming-repository))))
 
 (defun hg-push (&optional repo)
   "Push changes to repository REPO."
@@ -1079,6 +1086,10 @@
   (interactive)
   (error "not implemented"))
 
+(defun hg-update ()
+  (interactive)
+  (error "not implemented"))
+
 (defun hg-version-other-window ()
   (interactive)
   (error "not implemented"))