[Top][All Lists]

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

Re: C-x v i bug

From: Martin Geisler
Subject: Re: C-x v i bug
Date: Fri, 04 Dec 2009 10:37:37 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux)

Dan Nicolaescu <address@hidden> writes:

> 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?

Right. Many people use the color extension to get better feedback from
'hg status', but if Emacs sets TERM=dumb, 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'.

> 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, for that
> it runs "hg log -l1 FILE", and parse it from the output.
> Any user settings in .hgrc should be irrelevant for this command.  Right?

Right, and it's even quite important that you disable localization (run
hg with LANGUAGE=C in the environment). Otherwise you'll end up parsing:

  % hg log -l1 README
  ├Žndring:     9586:a41f2840f9c6
  bruger:      Lee Cantey <address@hidden>
  dato:        Tue Oct 13 12:27:50 2009 -0700
  uddrag:      README: revert accidental commit

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:

  % hg log -l1 README --style=compact
  9586   a41f2840f9c6   2009-10-13 12:27 -0700   lcantey
    README: revert accidental commit

> [too bad that the status and version number are not available from a
> single command...]

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.

Martin Geisler

VIFF (Virtual Ideal Functionality Framework) brings easy and efficient
SMPC (Secure Multiparty Computation) to Python. See: http://viff.dk/.

reply via email to

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