]> git.eshelyaron.com Git - emacs.git/commitdiff
Show working revision correctly for mercurial.
authorNick Roberts <nickrob@snap.net.nz>
Wed, 30 Dec 2009 02:22:45 +0000 (15:22 +1300)
committerNick Roberts <nickrob@snap.net.nz>
Wed, 30 Dec 2009 02:22:45 +0000 (15:22 +1300)
* vc-hg.el (vc-hg-working-revision): Use hg parent instead of
hg log as suggested by Alex Harsanyi <alexharsanyi@gmail.com>,

lisp/ChangeLog
lisp/vc-hg.el

index 3c59b6ed87ce3b83455ac09f5fc61c125f5336cf..4d78d53c81c0dbedb21c8a586506a9db4677ca1d 100644 (file)
@@ -1,3 +1,9 @@
+2009-12-30  Nick Roberts  <nickrob@snap.net.nz>
+
+       Show working revision correctly for mercurial.
+       * vc-hg.el (vc-hg-working-revision): Use hg parent instead of
+       hg log as suggested by Alex Harsanyi <alexharsanyi@gmail.com>,
+
 2009-12-29  Juanma Barranquero  <lekktu@gmail.com>
 
        Declare some functions for the byte-compiler.
index 91e9d682f8842db0ed7da824b987cc7d29cc4197..9dc1d380b0a42b1e5a17ec8ceef6af358543e189 100644 (file)
@@ -209,14 +209,11 @@ If nil, use the value of `vc-diff-switches'.  If t, use no switches."
                        ;; Ignore all errors.
                        (process-file
                         "hg" nil t nil
-                        "log" "-l1" (file-relative-name file)))
+                        "parent" "--template" "\"{rev}\"" (file-relative-name file)))
                     ;; Some problem happened.  E.g. We can't find an `hg'
                     ;; executable.
                     (error nil)))))))
-    (when (eq 0 status)
-      (if (string-match "changeset: *\\([0-9]*\\)" out)
-          (match-string 1 out)
-        "0"))))
+    (when (eq 0 status) (read out))))
 
 ;;; History functions