all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Alex Harsanyi <alexharsanyi@gmail.com>
To: emacs-devel@gnu.org
Subject: incorrect working revision for the mercurial VC backend
Date: Wed, 30 Dec 2009 09:53:54 +0800	[thread overview]
Message-ID: <cf628bc60912291753q6df29db7ra4a1825a89766384@mail.gmail.com> (raw)

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	other threads:[~2009-12-30  1:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-30  1:53 Alex Harsanyi [this message]
2009-12-30  2:31 ` incorrect working revision for the mercurial VC backend Nick Roberts
     [not found]   ` <cf628bc60912291930x46faaa61j488e15cc5b953689@mail.gmail.com>
2009-12-30  3:42     ` Nick Roberts
2009-12-30  6:15       ` Alex Harsanyi
2009-12-30  7:02         ` Nick Roberts
2009-12-30  8:02         ` Eli Zaretskii
2009-12-30  9:37           ` Alex Harsanyi
2009-12-30  3:29 ` Dan Nicolaescu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cf628bc60912291753q6df29db7ra4a1825a89766384@mail.gmail.com \
    --to=alexharsanyi@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.