emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

incorrect working revision for the mercurial VC backend


From: Alex Harsanyi
Subject: incorrect working revision for the mercurial VC backend
Date: Wed, 30 Dec 2009 09:53:54 +0800

It seems that `vc-hg-working-revision` is using "hg log -l1 FILE" to
obtain the working revision of the file.  This only works correctly if
the file is at the most recent revision in the workspace.  If you
update the workspace to a different repository revision using "hg
update -r REV", emacs will continue to think that files are at their
latest revision.  As a side effect, `vc-annotate` will always annotate
the latest revision of a file regardless of what the file revision is
in the workspace.

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.

Cheers,
Alex.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]