From unknown Sat Jun 14 03:46:48 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#5232 <5232@debbugs.gnu.org> To: bug#5232 <5232@debbugs.gnu.org> Subject: Status: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed Reply-To: bug#5232 <5232@debbugs.gnu.org> Date: Sat, 14 Jun 2025 10:46:48 +0000 retitle 5232 23.1.90; vc-hg-working-revision always gives latest revision i= n which file changed reassign 5232 emacs submitter 5232 Magnus Henoch severity 5232 normal thanks From magnus@erlang-consulting.com Wed Dec 16 09:14:07 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 16 Dec 2009 17:14:07 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.1 required=4.0 tests=FOURLA,IMPRONONCABLE_2, MURPHY_DRUGS_REL8 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nBGHE6nf027975 for ; Wed, 16 Dec 2009 09:14:07 -0800 Received: from mail.gnu.org ([199.232.76.166]:38118 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NKxRt-0008Oz-49 for emacs-pretest-bug@gnu.org; Wed, 16 Dec 2009 12:14:05 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NKxRd-0002WG-4f for emacs-pretest-bug@gnu.org; Wed, 16 Dec 2009 12:14:00 -0500 Received: from zimbra.erlangsystems.com ([88.208.247.62]:42337) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NKxRZ-0002P6-EJ for emacs-pretest-bug@gnu.org; Wed, 16 Dec 2009 12:13:48 -0500 Received: from linux-b2a3.site (unknown [192.168.42.57]) by zimbra.erlangsystems.com (Postfix) with ESMTP id B85E1135A903 for ; Wed, 16 Dec 2009 17:10:33 +0000 (GMT) From: Magnus Henoch To: emacs-pretest-bug@gnu.org Subject: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed X-Hashcash: 1:25:091216:emacs-pretest-bug@gnu.org::V8bWI1wJVjNt4Z4D:000000000000000000000000000000000002KmKf Date: Wed, 16 Dec 2009 17:12:30 +0000 Message-ID: <84k4wmlu69.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) When the revision currently checked out is not the latest revision that touched the file in question, vc-hg-working-revision gives the wrong result. This can happen in two cases: you have checked out a non-head revision, or the file has been changed in another branch. Two test cases: /tmp $ mkdir hgtest /tmp $ cd hgtest /tmp/hgtest $ hg init /tmp/hgtest $ echo foo > foo.txt /tmp/hgtest $ hg add foo.txt /tmp/hgtest $ hg commit -m "Added foo.txt" /tmp/hgtest $ echo bar > foo.txt /tmp/hgtest $ hg commit -m "Changed foo to bar" /tmp/hgtest $ hg up -r 0 1 files updated, 0 files merged, 0 files removed, 0 files unresolved /tmp $ mkdir hgtest2 /tmp $ cd hgtest2 /tmp/hgtest2 $ hg init /tmp/hgtest2 $ echo foo > foo.txt /tmp/hgtest2 $ hg add foo.txt /tmp/hgtest2 $ hg commit -m "Added foo.txt" /tmp/hgtest2 $ hg branch bar marked working directory as branch bar /tmp/hgtest2 $ echo bar > foo.txt /tmp/hgtest2 $ hg commit -m "Changed foo to bar" /tmp/hgtest2 $ hg update -r default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved /tmp/hgtest2 $ echo frobozz > frobozz.txt /tmp/hgtest2 $ hg add frobozz.txt /tmp/hgtest2 $ hg commit -m "Added frobozz.txt" created new head In either case, the symptoms are the same: if you open foo.txt in emacs, the mode line says "Hg-1" instead of the expected "Hg-0", and if you hit C-x v g, foo.txt seems to contain "bar" instead of "foo". It's not obvious to me how to solve this properly. The following patch fixes the first case, but not the second. ("hg log --follow" would be logical, but it seems that "--follow" means something completely different if you specify a file.) diff --git a/lisp/vc-hg.el b/lisp/vc-hg.el index 91e9d68..484dc0e 100644 --- a/lisp/vc-hg.el +++ b/lisp/vc-hg.el @@ -209,7 +209,9 @@ 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))) + "log" "-l1" + "-r" ".:0" + (file-relative-name file))) ;; Some problem happened. E.g. We can't find an `hg' ;; executable. (error nil))))))) In GNU Emacs 23.1.90.1 (i686-pc-linux-gnu, GTK+ Version 2.18.1) of 2009-12-15 on linux-b2a3 Windowing system distributor `The X.Org Foundation', version 11.0.10605000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: @im=local locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: diff-auto-refine-mode: t shell-dirtrack-mode: t jabber-activity-mode: t jabber-mode-line-mode: t eldoc-mode: t show-paren-mode: t server-mode: t ido-everywhere: t icomplete-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: - n " ) C-x C-f C-x C-x 4 b f o o M-! C-g M-: M-! h g SPC i d SPC - - h e l p C-h f s t r i p n g C-g C-x 4 b ( s h e l l - c o m m - t o SPC " h g SPC i d SPC - n " ) ) C-x C-s M-! h g SPC C-g C-x C-j C-l C-x C-j C-l M-! h g SPC h e l p M-! h g SPC h e l p SPC s e e r e v i s i o n l s s C-M-k C-d M-m M-d C-d C-e . C-x C-s C-M-x C-x b f o o M-x r e v e r t y e s C-x b C-x 4 b M-! h g SPC l o g SPC - r SPC 0 : . M-! C-e C-f C-g C-g " SPC " C-x C-s C-M-x M-x r e v e r t y e s C-x v = C-x b f o o C-x v g C-x 4 b M-x r e p o r t - e m Recent messages: Quit [2 times] Saving file /home/magnus/src/emacs/lisp/vc-hg.el... Wrote /home/magnus/src/emacs/lisp/vc-hg.el vc-hg-working-revision Finding changes in /home/magnus/src/emacs/lisp/vc-hg.el...done Annotating... Redisplaying annotation...done (Spanned from 0.0 to 0.0 days old) Mark set Annotating... done Load-path shadows: ~/emacs/org-mode/lisp/org-html hides /usr/local/share/emacs/23.1.90/lisp/org/org-html ~/emacs/org-mode/lisp/org-table hides /usr/local/share/emacs/23.1.90/lisp/org/org-table ~/emacs/org-mode/lisp/org-bbdb hides /usr/local/share/emacs/23.1.90/lisp/org/org-bbdb ~/emacs/org-mode/lisp/org-mouse hides /usr/local/share/emacs/23.1.90/lisp/org/org-mouse ~/emacs/org-mode/lisp/org-rmail hides /usr/local/share/emacs/23.1.90/lisp/org/org-rmail ~/emacs/org-mode/lisp/org-compat hides /usr/local/share/emacs/23.1.90/lisp/org/org-compat ~/emacs/org-mode/lisp/org-latex hides /usr/local/share/emacs/23.1.90/lisp/org/org-latex ~/emacs/org-mode/lisp/org-gnus hides /usr/local/share/emacs/23.1.90/lisp/org/org-gnus ~/emacs/org-mode/lisp/org-habit hides /usr/local/share/emacs/23.1.90/lisp/org/org-habit ~/emacs/org-mode/lisp/org-exp hides /usr/local/share/emacs/23.1.90/lisp/org/org-exp ~/emacs/org-mode/lisp/org-src hides /usr/local/share/emacs/23.1.90/lisp/org/org-src ~/emacs/org-mode/lisp/org-plot hides /usr/local/share/emacs/23.1.90/lisp/org/org-plot ~/emacs/org-mode/lisp/org-publish hides /usr/local/share/emacs/23.1.90/lisp/org/org-publish ~/emacs/org-mode/lisp/org-bibtex hides /usr/local/share/emacs/23.1.90/lisp/org/org-bibtex ~/emacs/org-mode/lisp/org-xoxo hides /usr/local/share/emacs/23.1.90/lisp/org/org-xoxo ~/emacs/org-mode/lisp/org-remember hides /usr/local/share/emacs/23.1.90/lisp/org/org-remember ~/emacs/org-mode/lisp/org-crypt hides /usr/local/share/emacs/23.1.90/lisp/org/org-crypt ~/emacs/org-mode/lisp/org-timer hides /usr/local/share/emacs/23.1.90/lisp/org/org-timer ~/emacs/org-mode/lisp/org-vm hides /usr/local/share/emacs/23.1.90/lisp/org/org-vm ~/emacs/org-mode/lisp/org hides /usr/local/share/emacs/23.1.90/lisp/org/org ~/emacs/org-mode/lisp/org-mew hides /usr/local/share/emacs/23.1.90/lisp/org/org-mew ~/emacs/org-mode/lisp/org-archive hides /usr/local/share/emacs/23.1.90/lisp/org/org-archive ~/emacs/org-mode/lisp/org-indent hides /usr/local/share/emacs/23.1.90/lisp/org/org-indent ~/emacs/org-mode/lisp/org-agenda hides /usr/local/share/emacs/23.1.90/lisp/org/org-agenda ~/emacs/org-mode/lisp/org-exp-blocks hides /usr/local/share/emacs/23.1.90/lisp/org/org-exp-blocks ~/emacs/org-mode/lisp/org-id hides /usr/local/share/emacs/23.1.90/lisp/org/org-id ~/emacs/org-mode/lisp/org-install hides /usr/local/share/emacs/23.1.90/lisp/org/org-install ~/emacs/org-mode/lisp/org-datetree hides /usr/local/share/emacs/23.1.90/lisp/org/org-datetree ~/emacs/org-mode/lisp/org-clock hides /usr/local/share/emacs/23.1.90/lisp/org/org-clock ~/emacs/org-mode/lisp/org-w3m hides /usr/local/share/emacs/23.1.90/lisp/org/org-w3m ~/emacs/org-mode/lisp/org-irc hides /usr/local/share/emacs/23.1.90/lisp/org/org-irc ~/emacs/org-mode/lisp/org-inlinetask hides /usr/local/share/emacs/23.1.90/lisp/org/org-inlinetask ~/emacs/org-mode/lisp/org-mac-message hides /usr/local/share/emacs/23.1.90/lisp/org/org-mac-message ~/emacs/org-mode/lisp/org-list hides /usr/local/share/emacs/23.1.90/lisp/org/org-list ~/emacs/org-mode/lisp/org-colview hides /usr/local/share/emacs/23.1.90/lisp/org/org-colview ~/emacs/org-mode/lisp/org-mobile hides /usr/local/share/emacs/23.1.90/lisp/org/org-mobile ~/emacs/org-mode/lisp/org-attach hides /usr/local/share/emacs/23.1.90/lisp/org/org-attach ~/emacs/org-mode/lisp/org-wl hides /usr/local/share/emacs/23.1.90/lisp/org/org-wl ~/emacs/org-mode/lisp/org-info hides /usr/local/share/emacs/23.1.90/lisp/org/org-info ~/emacs/org-mode/lisp/org-macs hides /usr/local/share/emacs/23.1.90/lisp/org/org-macs ~/emacs/org-mode/lisp/org-mhe hides /usr/local/share/emacs/23.1.90/lisp/org/org-mhe ~/emacs/org-mode/lisp/org-jsinfo hides /usr/local/share/emacs/23.1.90/lisp/org/org-jsinfo ~/emacs/org-mode/lisp/org-freemind hides /usr/local/share/emacs/23.1.90/lisp/org/org-freemind ~/emacs/org-mode/lisp/org-icalendar hides /usr/local/share/emacs/23.1.90/lisp/org/org-icalendar ~/emacs/org-mode/lisp/org-feed hides /usr/local/share/emacs/23.1.90/lisp/org/org-feed ~/emacs/org-mode/lisp/org-footnote hides /usr/local/share/emacs/23.1.90/lisp/org/org-footnote ~/emacs/org-mode/lisp/org-protocol hides /usr/local/share/emacs/23.1.90/lisp/org/org-protocol ~/emacs/org-mode/lisp/org-ascii hides /usr/local/share/emacs/23.1.90/lisp/org/org-ascii ~/emacs/org-mode/lisp/org-docbook hides /usr/local/share/emacs/23.1.90/lisp/org/org-docbook ~/emacs/org-mode/lisp/org-faces hides /usr/local/share/emacs/23.1.90/lisp/org/org-faces ~/emacs/emms/lisp/tq hides /usr/local/share/emacs/23.1.90/lisp/emacs-lisp/tq Features: (shadow emacsbug diff-mode imenu vc-git jka-compr find-func pp em-unix pcomplete em-term term ehelp electric em-script em-prompt em-ls em-hist em-pred em-glob em-dirs em-cmpl em-basic esh-opt em-banner em-alias esh-var esh-io esh-cmd esh-ext esh-proc esh-arg esh-groups eshell esh-module esh-mode esh-util add-log log-view pcvs-util vc-annotate vc vc-dispatcher vc-hg nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok mule-util cal-move org-clock multi-isearch cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs sh-script executable tabify man cal-china lunar solar cal-dst cal-bahai cal-islam cal-hebrew holidays hol-loaddefs diary-lib diary-loaddefs cal-iso cal-menu calendar cal-loaddefs tramp-imap epa epg imap-hash tramp-gw tramp-fish tramp-smb tramp-cache tramp-ftp tramp-cmds tramp shell tramp-compat trampver descr-text help-mode view browse-url mailalias smtpmail newcomment locate bbdb-gui flow-fill gnus-cite smiley ansi-color gnus-async gnus-bcklg sort gnus-ml disp-table nndoc parse-time nnfolder utf-7 utf7 auth-source nnimap imap nndraft nnmh copyright nnml gnus-agent gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache spam spam-stat gnus-uu yenc gnus-msg goto-addr thingatpt sasl-digest hmac-md5 jabber-gmail jabber-keepalive jabber-bookmarks jabber-private jabber jabber-awesome jabber-osd jabber-wmii jabber-xmessage jabber-festival jabber-sawfish jabber-ratpoison jabber-screen jabber-socks5 jabber-ft-server jabber-si-server jabber-ft-client jabber-ft-common jabber-si-client jabber-si-common jabber-feature-neg jabber-truncate jabber-time jabber-autoaway jabber-vcard-avatars jabber-chatstates jabber-events jabber-vcard jabber-avatar jabber-activity jabber-watch jabber-modeline jabber-ahc-presence jabber-ahc jabber-version jabber-ourversion jabber-muc-nick-completion hippie-exp jabber-browse jabber-search jabber-register jabber-roster jabber-presence assoc jabber-muc jabber-newdisco jabber-widget jabber-disco jabber-chat ewoc jabber-history jabber-chatbuffer jabber-alert jabber-iq jabber-keymap jabber-core jabber-sasl sasl sasl-anonymous sasl-login sasl-plain fsm jabber-logon jabber-conn srv dns starttls tls jabber-xml xml jabber-menu eldoc org-feed org-w3m org-wl org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-exp org-exp-blocks org-agenda org-info org-gnus org-bibtex org-bbdb paren server ido icomplete time cus-start cus-load emms-playlist-sort emms-last-played emms-info-libtag emms-lastfm emms-url emms-playing-time emms-mode-line url url-proxy url-privacy url-expand url-methods url-history url-cookie url-util url-parse url-vars emms-cache emms-info-ogginfo emms-info-mp3info emms-info later-do emms-playlist-mode emms-player-vlc emms-player-mplayer emms-player-simple emms-source-playlist emms-source-file dired emms-setup emms emms-compat bbdb-gnus gnus-art mm-uu mml2015 epg-config mm-view smime dig gnus-sum nnoo gnus-group gnus-undo nnmail mail-source format-spec gnus-start gnus-spec gnus-int gnus-range message sendmail ecomplete mml mml-sec password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums gmm-utils mailheader canlock sha1 hex-util hashcash gnus-win gnus gnus-ems nnheader gnus-util netrc mail-utils mm-util mail-prsvr wid-edit bbdb-snarf mail-extr rfc822 bbdb-com warnings mailabbrev bbdb-autoloads bbdb regexp-opt timezone patmatch erl-service derived derl erlext epmd net-fsm erl wrangler erlang flymake compile comint ring w3-auto edmacro kmacro remember org-remember org-datetree org byte-opt bytecomp byte-compile org-footnote org-src org-list org-faces org-compat org-macs easymenu time-date noutline outline easy-mmode org-redmine cl cl-19 org-install uniquify advice help-fns advice-preload vc-p4 p4-lowlevel lfe-mode erlang-web-template tempo erlang-start jabber-autoloads jabber-util tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces cus-face text-properties overlay md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind system-font-setting font-render-setting gtk x-toolkit x multi-tty emacs) From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 11:10:39 2009 Received: (at 5232) by debbugs.gnu.org; 18 Dec 2009 16:10:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NLfPa-0000aE-FT for submit@debbugs.gnu.org; Fri, 18 Dec 2009 11:10:39 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NLfEj-0000QM-8B for 5232@emacsbugs.donarmstrong.com; Fri, 18 Dec 2009 10:59:25 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBHGOago023807 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Dec 2009 08:24:37 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBHGOaFw002458; Thu, 17 Dec 2009 08:24:36 -0800 (PST) Date: Thu, 17 Dec 2009 08:24:36 -0800 (PST) Message-Id: <200912171624.nBHGOaFw002458@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: (Dan Nicolaescu's message of "(unknown date)") Lines: 57 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBHGOago023807 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Debbugs-Envelope-To: 5232 X-Mailman-Approved-At: Fri, 18 Dec 2009 11:10:37 -0500 Cc: 5232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Dan Nicolaescu writes: > Magnus Henoch writes: > > > When the revision currently checked out is not the latest revision that > > touched the file in question, vc-hg-working-revision gives the wrong > > result. This can happen in two cases: you have checked out a non-head > > revision, or the file has been changed in another branch. Two test > > cases: > > > > /tmp $ mkdir hgtest > > /tmp $ cd hgtest > > /tmp/hgtest $ hg init > > /tmp/hgtest $ echo foo > foo.txt > > /tmp/hgtest $ hg add foo.txt > > /tmp/hgtest $ hg commit -m "Added foo.txt" > > /tmp/hgtest $ echo bar > foo.txt > > /tmp/hgtest $ hg commit -m "Changed foo to bar" > > /tmp/hgtest $ hg up -r 0 > > 1 files updated, 0 files merged, 0 files removed, 0 files unresolved > > > > /tmp $ mkdir hgtest2 > > /tmp $ cd hgtest2 > > /tmp/hgtest2 $ hg init > > /tmp/hgtest2 $ echo foo > foo.txt > > /tmp/hgtest2 $ hg add foo.txt > > /tmp/hgtest2 $ hg commit -m "Added foo.txt" > > /tmp/hgtest2 $ hg branch bar > > marked working directory as branch bar > > /tmp/hgtest2 $ echo bar > foo.txt > > /tmp/hgtest2 $ hg commit -m "Changed foo to bar" > > /tmp/hgtest2 $ hg update -r default > > 1 files updated, 0 files merged, 0 files removed, 0 files unresolved > > /tmp/hgtest2 $ echo frobozz > frobozz.txt > > /tmp/hgtest2 $ hg add frobozz.txt > > /tmp/hgtest2 $ hg commit -m "Added frobozz.txt" > > created new head > > > > In either case, the symptoms are the same: if you open foo.txt in emacs, > > the mode line says "Hg-1" instead of the expected "Hg-0", and if you hit > > Do you get this behavior with "emacs -Q" ? > > I can't reproduce this, I get Hg-0. And the command used to get the version: > hg log -l1 foo.txt > outputs version 0 Doh, never mind, I have my shell set to not clobber files, so the file was not overwritten. Your change seems to work fine for /tmp/hgtest/foo.txt It does not for /tmp/hgtest2/foo.txt. C-x v g quite likely does not work because it tries to annotate version "1". Not sure how to get the correct version. Can it be obtained with "log --template" ? From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 18 11:10:39 2009 Received: (at 5232) by debbugs.gnu.org; 18 Dec 2009 16:10:39 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NLfPb-0000aG-4M for submit@debbugs.gnu.org; Fri, 18 Dec 2009 11:10:39 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NLfEj-0000QM-Uj for 5232@emacsbugs.donarmstrong.com; Fri, 18 Dec 2009 10:59:26 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBHFobWf015546 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 17 Dec 2009 07:50:37 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBHFoaea002186; Thu, 17 Dec 2009 07:50:36 -0800 (PST) Date: Thu, 17 Dec 2009 07:50:36 -0800 (PST) Message-Id: <200912171550.nBHFoaea002186@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <84k4wmlu69.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 16 Dec 2009 17:12:30 +0000") Lines: 44 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBHFobWf015546 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Debbugs-Envelope-To: 5232 X-Mailman-Approved-At: Fri, 18 Dec 2009 11:10:37 -0500 Cc: 5232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Magnus Henoch writes: > When the revision currently checked out is not the latest revision that > touched the file in question, vc-hg-working-revision gives the wrong > result. This can happen in two cases: you have checked out a non-head > revision, or the file has been changed in another branch. Two test > cases: > > /tmp $ mkdir hgtest > /tmp $ cd hgtest > /tmp/hgtest $ hg init > /tmp/hgtest $ echo foo > foo.txt > /tmp/hgtest $ hg add foo.txt > /tmp/hgtest $ hg commit -m "Added foo.txt" > /tmp/hgtest $ echo bar > foo.txt > /tmp/hgtest $ hg commit -m "Changed foo to bar" > /tmp/hgtest $ hg up -r 0 > 1 files updated, 0 files merged, 0 files removed, 0 files unresolved > > /tmp $ mkdir hgtest2 > /tmp $ cd hgtest2 > /tmp/hgtest2 $ hg init > /tmp/hgtest2 $ echo foo > foo.txt > /tmp/hgtest2 $ hg add foo.txt > /tmp/hgtest2 $ hg commit -m "Added foo.txt" > /tmp/hgtest2 $ hg branch bar > marked working directory as branch bar > /tmp/hgtest2 $ echo bar > foo.txt > /tmp/hgtest2 $ hg commit -m "Changed foo to bar" > /tmp/hgtest2 $ hg update -r default > 1 files updated, 0 files merged, 0 files removed, 0 files unresolved > /tmp/hgtest2 $ echo frobozz > frobozz.txt > /tmp/hgtest2 $ hg add frobozz.txt > /tmp/hgtest2 $ hg commit -m "Added frobozz.txt" > created new head > > In either case, the symptoms are the same: if you open foo.txt in emacs, > the mode line says "Hg-1" instead of the expected "Hg-0", and if you hit Do you get this behavior with "emacs -Q" ? I can't reproduce this, I get Hg-0. And the command used to get the version: hg log -l1 foo.txt outputs version 0 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 04 00:14:14 2010 Received: (at 5232-done) by debbugs.gnu.org; 4 Jan 2010 05:14:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRfGg-0005YH-NF for submit@debbugs.gnu.org; Mon, 04 Jan 2010 00:14:14 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NRfGd-0005YA-6l for 5232-done@emacsbugs.donarmstrong.com; Mon, 04 Jan 2010 00:14:13 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o045E2Qo029175 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 3 Jan 2010 21:14:02 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o045E1Aq019172; Sun, 3 Jan 2010 21:14:01 -0800 (PST) Date: Sun, 3 Jan 2010 21:14:01 -0800 (PST) Message-Id: <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <84k4wmlu69.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 16 Dec 2009 17:12:30 +0000") Lines: 1 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o045E2Qo029175 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 5232-done Cc: 5232-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) This should be fixed now. From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 10:28:06 2010 Received: (at 5232) by debbugs.gnu.org; 6 Jan 2010 15:28:06 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSXnp-0002O0-7U for submit@debbugs.gnu.org; Wed, 06 Jan 2010 10:28:05 -0500 Received: from server88-208-246-34.live-servers.net ([88.208.246.34] helo=zimbra.erlangsystems.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSXiV-0002Kh-T0 for 5232@emacsbugs.donarmstrong.com; Wed, 06 Jan 2010 10:22:36 -0500 Received: by zimbra.erlangsystems.com (Postfix, from userid 1001) id BFE5453A008; Wed, 6 Jan 2010 15:22:29 +0000 (GMT) Received: from linux-b2a3.site (host213-123-170-251.in-addr.btopenworld.com [213.123.170.251]) by zimbra.erlangsystems.com (Postfix) with ESMTP id E6FD253A004; Wed, 6 Jan 2010 15:22:27 +0000 (GMT) X-Hashcash: 1:25:100106:5232@emacsbugs.donarmstrong.com::cDQYmZarcOJvgLX1:000000000000000000000000000000QXu0 From: Magnus Henoch To: Dan Nicolaescu Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> X-Hashcash: 1:25:100106:5232-done@emacsbugs.donarmstrong.com::72aRAa/zW0f5m8KN:0000000000000000000000001AVSs X-Hashcash: 1:25:100106:dann@ics.uci.edu::BozJxbu8a7Enq3it:4gSte Date: Wed, 06 Jan 2010 15:22:23 +0000 In-Reply-To: <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Sun, 3 Jan 2010 21:14:01 -0800 (PST)") Message-ID: <844omzw95c.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5232 X-Mailman-Approved-At: Wed, 06 Jan 2010 10:28:03 -0500 Cc: 5232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Dan Nicolaescu writes: > This should be fixed now. I still get the same result. Also, I don't see any changes to this function in CVS/Git. Am I missing something? (I'm starting to think that this should actually be fixed in Mercurial. I'll file a bug report.) Magnus --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 06 14:02:31 2010 Received: (at 5232) by debbugs.gnu.org; 6 Jan 2010 19:02:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSb9K-0004cp-Vz for submit@debbugs.gnu.org; Wed, 06 Jan 2010 14:02:31 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSb9J-0004ch-RQ for 5232@emacsbugs.donarmstrong.com; Wed, 06 Jan 2010 14:02:30 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o06J2I62022470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 6 Jan 2010 11:02:18 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o06J2Icf003429; Wed, 6 Jan 2010 11:02:18 -0800 (PST) Date: Wed, 6 Jan 2010 11:02:18 -0800 (PST) Message-Id: <201001061902.o06J2Icf003429@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> <844omzw95c.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <844omzw95c.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 06 Jan 2010 15:22:23 +0000") Lines: 13 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o06J2I62022470 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5232 Cc: 5232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Magnus Henoch writes: > Dan Nicolaescu writes: > > > This should be fixed now. > > I still get the same result. > > Also, I don't see any changes to this function in CVS/Git. Am I missing > something? We switched to bzr, so CVS is not updated anymore. Look in bzr... From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 06:56:36 2010 Received: (at 5232) by debbugs.gnu.org; 7 Jan 2010 11:56:36 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSqyi-0005Uw-CQ for submit@debbugs.gnu.org; Thu, 07 Jan 2010 06:56:36 -0500 Received: from server88-208-246-34.live-servers.net ([88.208.246.34] helo=zimbra.erlangsystems.com) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NSqyg-0005Ur-Om for 5232@emacsbugs.donarmstrong.com; Thu, 07 Jan 2010 06:56:35 -0500 Received: by zimbra.erlangsystems.com (Postfix, from userid 1001) id E976453A007; Thu, 7 Jan 2010 11:56:28 +0000 (GMT) Received: from linux-b2a3.site (host213-123-170-251.in-addr.btopenworld.com [213.123.170.251]) by zimbra.erlangsystems.com (Postfix) with ESMTP id 98A5253A004; Thu, 7 Jan 2010 11:56:27 +0000 (GMT) From: Magnus Henoch To: Dan Nicolaescu Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> <844omzw95c.fsf@linux-b2a3.site> <201001061902.o06J2Icf003429@godzilla.ics.uci.edu> X-Hashcash: 1:25:100107:5232@emacsbugs.donarmstrong.com::wSCpo1lg5GC00At7:000000000000000000000000000000J1wS X-Hashcash: 1:25:100107:dann@ics.uci.edu::QzzwHxK96yCnkNxT:0XihL Date: Thu, 07 Jan 2010 11:56:24 +0000 In-Reply-To: <201001061902.o06J2Icf003429@godzilla.ics.uci.edu> (Dan Nicolaescu's message of "Wed, 6 Jan 2010 11:02:18 -0800 (PST)") Message-ID: <84tyuy3z87.fsf@linux-b2a3.site> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5232 Cc: 5232@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Dan Nicolaescu writes: > We switched to bzr, so CVS is not updated anymore. Look in bzr... That explains it :) Works fine now, thank you. Magnus --------------------------------------------------- --------------------------------------------------- WE'VE CHANGED NAMES! Since January 1st 2010 Erlang Training and Consulting Ltd. has become ERLANG SOLUTIONS LTD. www.erlang-solutions.com From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 07 09:45:23 2010 Received: (at 5232-done) by debbugs.gnu.org; 7 Jan 2010 14:45:23 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NStc3-00079o-7d for submit@debbugs.gnu.org; Thu, 07 Jan 2010 09:45:23 -0500 Received: from paul-mcgann-v0.ics.uci.edu ([128.195.1.147]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1NStc1-00079j-J8 for 5232-done@debbugs.gnu.org; Thu, 07 Jan 2010 09:45:22 -0500 Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by paul-mcgann-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id o07EjAnN000351 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 7 Jan 2010 06:45:10 -0800 Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id o07EjA4E015994; Thu, 7 Jan 2010 06:45:10 -0800 (PST) Date: Thu, 7 Jan 2010 06:45:10 -0800 (PST) Message-Id: <201001071445.o07EjA4E015994@godzilla.ics.uci.edu> From: Dan Nicolaescu To: Magnus Henoch Subject: Re: bug#5232: 23.1.90; vc-hg-working-revision always gives latest revision in which file changed References: <84k4wmlu69.fsf@linux-b2a3.site> <201001040514.o045E1Aq019172@godzilla.ics.uci.edu> <844omzw95c.fsf@linux-b2a3.site> <201001061902.o06J2Icf003429@godzilla.ics.uci.edu> <84tyuy3z87.fsf@linux-b2a3.site> X-Debbugs-No-Ack: yes In-Reply-To: <84tyuy3z87.fsf@linux-b2a3.site> (Magnus Henoch's message of "Thu, 07 Jan 2010 11:56:24 +0000") Lines: 9 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: o07EjAnN000351 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.44, required 5, autolearn=disabled, ALL_TRUSTED -1.44) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-Spam-Status: No X-Spam-Score: -2.5 (--) X-Debbugs-Envelope-To: 5232-done Cc: 5232-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.5 (--) Magnus Henoch writes: > Dan Nicolaescu writes: > > > We switched to bzr, so CVS is not updated anymore. Look in bzr... > > That explains it :) Works fine now, thank you. Then the bug can be closed. Thanks. From unknown Sat Jun 14 03:46:48 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 05 Feb 2010 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A long time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator