From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel,gmane.comp.version-control.mercurial.devel Subject: Re: C-x v i bug Date: Fri, 18 Dec 2009 07:54:51 -0800 (PST) Message-ID: <200912181554.nBIFspNS017334@godzilla.ics.uci.edu> References: <200912031604.nB3G4nU1026058@godzilla.ics.uci.edu> <200912031828.nB3IS3xQ027198@godzilla.ics.uci.edu> <87638naci6.fsf@hbox.dyndns.org> <1B794147-1B60-4F5B-A972-09C73F8ECB6E@gmail.com> <200912040534.nB45YkG6002638@godzilla.ics.uci.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1261151814 6090 80.91.229.12 (18 Dec 2009 15:56:54 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Dec 2009 15:56:54 +0000 (UTC) Cc: Neal Becker , mercurial-devel@selenic.com, emacs-devel@gnu.org To: Martin Geisler Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Dec 18 16:56:47 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NLfC9-0006x9-3z for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2009 16:56:45 +0100 Original-Received: from localhost ([127.0.0.1]:35307 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLfC9-0006U8-7i for ged-emacs-devel@m.gmane.org; Fri, 18 Dec 2009 10:56:45 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NLfC1-0006Om-Gj for emacs-devel@gnu.org; Fri, 18 Dec 2009 10:56:37 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NLfBw-0006EN-9u for emacs-devel@gnu.org; Fri, 18 Dec 2009 10:56:36 -0500 Original-Received: from [199.232.76.173] (port=56412 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NLfBw-0006Du-3X for emacs-devel@gnu.org; Fri, 18 Dec 2009 10:56:32 -0500 Original-Received: from colin-baker-v0.ics.uci.edu ([128.195.1.153]:54182) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NLfBv-0000dv-Af for emacs-devel@gnu.org; Fri, 18 Dec 2009 10:56:31 -0500 Original-Received: from godzilla.ics.uci.edu (godzilla.ics.uci.edu [128.195.10.101]) by colin-baker-v0.ics.uci.edu (8.13.8/8.13.8) with ESMTP id nBIFspfg024638 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 18 Dec 2009 07:54:51 -0800 Original-Received: (from dann@localhost) by godzilla.ics.uci.edu (8.13.8+Sun/8.13.6/Submit) id nBIFspNS017334; Fri, 18 Dec 2009 07:54:51 -0800 (PST) In-Reply-To: (Martin Geisler's message of "Fri, 04 Dec 2009 10:37:37 +0100") Original-Lines: 81 X-ICS-MailScanner-Information: Please send mail to helpdesk@ics.uci.edu or more information X-ICS-MailScanner-ID: nBIFspfg024638 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=0.561, required 5, autolearn=disabled, ALL_TRUSTED -1.44, GAPPY_SUBJECT 2.00) X-ICS-MailScanner-From: dann@godzilla.ics.uci.edu X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:118715 gmane.comp.version-control.mercurial.devel:27656 Archived-At: Martin Geisler writes: > Dan Nicolaescu writes: >=20 > > Let's first talk about the original problem that started this > > discussion. > > > > When a file in a directory that is under mercurial control is opened > > in emacs, emacs runs "hg status FILE" so that it knows if it's > > registered or not, if it's modified, etc. > > > > Any user settings in .hgrc should be irrelevant to the above. Right? >=20 > Right. Many people use the color extension to get better feedback from > 'hg status', but if Emacs sets TERM=3Ddumb, then the extension will > disable itself. I'm just mentioning color to say that there are useful > extensions out there that modify even basic commands like 'hg status'. >=20 > > It's desirable that this is as fast as possible, so processing .hgrc, > > initializing plugins will just waste time. > > After that emacs will want to know the version number for the file, f= or that > > it runs "hg log -l1 FILE", and parse it from the output. > > Any user settings in .hgrc should be irrelevant for this command. Ri= ght? >=20 > Right, and it's even quite important that you disable localization (run > hg with LANGUAGE=3DC in the environment). Otherwise you'll end up parsi= ng: >=20 > % hg log -l1 README > =C3=A6ndring: 9586:a41f2840f9c6 > bruger: Lee Cantey > dato: Tue Oct 13 12:27:50 2009 -0700 > uddrag: README: revert accidental commit >=20 > The user could also very well have installed a different default style > by setting ui.style. On the command line it's done line this: Thank you, this was very useful in taking care of some issues in emacs. > % hg log -l1 README --style=3Dcompact > 9586 a41f2840f9c6 2009-10-13 12:27 -0700 lcantey > README: revert accidental commit >=20 > > [too bad that the status and version number are not available from a > > single command...] >=20 > Well, you know, files don't really have a version number with modern > version control systems. The entire tree has a version number... You can > of course ask about when a file was last touched, but I think that > information is getting more and more irrelevant these days. In emacs the generic Version Control layer needs a version number in some c= ase. Here's an example from a bug report: cd /tmp mkdir hgtest2 cd hgtest2 hg init echo foo > foo.txt hg add foo.txt hg commit -m "Added foo.txt" hg branch bar echo bar > foo.txt hg commit -m "Changed foo to bar" hg update -r default echo frobozz > frobozz.txt hg add frobozz.txt hg commit -m "Added frobozz.txt" now open the file mkdir /tmp/hgtest2/foo.txt and ask to see the annotated version, emacs does that by running hg annotate -r REVISION foo.txt How can REVISION be obtained in this case? It should be "0", but hg log -l1 foo.txt does not show that... Thanks! =20=20