[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
incorrect working revision for the mercurial VC backend
From: |
Nick Roberts |
Subject: |
incorrect working revision for the mercurial VC backend |
Date: |
Wed, 30 Dec 2009 15:31:19 +1300 |
> I believe using the "hg parent" command is more accurate in computing
> the working revision:
>
> hg parent --template "{rev}" FILE
>
> Also by using the --template option, the command will return just the
> revision number, making the `string-match' call unnecessary.
To get some practice with bzr, I've pushed the change below. Can you please
tell me if it DTRT for you?
--
Nick http://users.snap.net.nz/~nickrob
2009-12-30 Nick Roberts <address@hidden>
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 <address@hidden>,
=== modified file 'lisp/vc-hg.el'
*** lisp/vc-hg.el 2009-12-14 17:12:18 +0000
--- lisp/vc-hg.el 2009-12-30 02:22:45 +0000
*************** If nil, use the value of `vc-diff-switch
*** 209,222 ****
;; Ignore all errors.
(process-file
"hg" nil t nil
! "log" "-l1" (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"))))
;;; History functions
--- 209,219 ----
;; Ignore all errors.
(process-file
"hg" nil t nil
! "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) (read out))))
;;; History functions
- incorrect working revision for the mercurial VC backend, Alex Harsanyi, 2009/12/29
- incorrect working revision for the mercurial VC backend,
Nick Roberts <=
- Message not available
- Re: incorrect working revision for the mercurial VC backend, Nick Roberts, 2009/12/29
- Re: incorrect working revision for the mercurial VC backend, Alex Harsanyi, 2009/12/30
- Re: incorrect working revision for the mercurial VC backend, Nick Roberts, 2009/12/30
- Re: incorrect working revision for the mercurial VC backend, Eli Zaretskii, 2009/12/30
- Re: incorrect working revision for the mercurial VC backend, Alex Harsanyi, 2009/12/30
Re: incorrect working revision for the mercurial VC backend, Dan Nicolaescu, 2009/12/29