Subject: bug#22083: 25.0.50; hg: adding tag enhances the rev, modeline does not reflect

From: Uwe Brauer <[email-masked]>
Date: Fri, 04 Dec 2015 12:02:54 +0000

> IMO, the answer depends on 2 factors:

   >   . what the hg users expect
   >   . what can be usefully shown in the small space we can afford for
   >     this on the modeline

   > More generally, I don't see the current display as a bug, because this
   > part of the mode line shouldn't be expected to tell too much about the
   > version anyway.  Modern dVCSes are not like RCS or CVS: showing
   > something like rXX.YY is no longer possible, or meaningful.  A file
   > under Git shows me a (silly, IMO) "Git-BRANCH_NAME" string that tells
   > absolutely nothing about the current revision.  If we wanted to be
   > sure some useful revision-specific information is shown, we would need
   > to change the Git implementation to show what "git describe" returns,
   > for example.

Right this is one of the reasons I prefer HG over git (the other is
lack of keyword expansion, which might be obsolete for coding, but
useful for LaTeX files.) Anyhow pls no flamewar about it, that is just
my opinion.

   > So IMO before we discuss Uwe's request, we should decide what exactly
   > is the meaning of that string we show in the modeline.  I don't think
   > it is well defined as things stand now.

Ok I try to explain again what I find confusing:

Here is what I did

Command line
hg init
create and add file test.tex
change comit 3 times

hg log --template '{rev} {latesttag}.{latesttagdistance} {desc} {files}\n'
2 null.3 Com3 test.tex
1 null.2 Com2 test.tex
0 null.1 Com1 test.tex
hg tag -r 2 v1
hg log --template '{rev} {latesttag}.{latesttagdistance} {desc} {files}\n'
3 v1.1 Added tag v1 for changeset 649afdff7ebe .hgtags
2 v1.0 Com3 test.tex
1 null.2 Com2 test.tex
0 null.1 Com1 test.tex

hg kwexpand
in the file

$Id: test.tex,v v1.0[Hg:2] 2015/12/03 15:15:15 oub Exp oub $ 

change and commit in Emacs

\rcsInfo $Id: test.tex,v v1.2[Hg:4] 2015/12/03 15:19:49 oub Exp oub $ 

so there is now a jump from Hg2 to Hg:4 which is annoying.

Possible  solutions:

    -  The modeline string shows what «hg log» shows as a rev.

    -  The modeline string shows both rev, that is HG:rev/rev_from_hg_log

    -  The modeline string show HG:rev and the latest tag
       HG:rev/latest_tag
       however as already noted the modeline is tiny and should not be
       overloaded.

Uwe