Patchwork commands: add an option to display only the full id with 'hg id'

login
register
mail settings
Submitter Mathias De Maré
Date Nov. 19, 2015, 1:58 p.m.
Message ID <afb732f543249e09acfd.1447941496@waste.org>
Download mbox | patch
Permalink /patch/11516/
State Rejected
Headers show

Comments

Mathias De Maré - Nov. 19, 2015, 1:58 p.m.
# HG changeset patch
# User Mathias De Maré <mathias.demare@gmail.com>
# Date 1447866343 -3600
#      Wed Nov 18 18:05:43 2015 +0100
# Node ID afb732f543249e09acfd0438747223fbf7a4484f
# Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
commands: add an option to display only the full id with 'hg id'

'hg id --full' can display the full revision id without having to use --debug.
This avoids potential additional debug messages being printed
and is more intuitive (it's a specific option to 'hg id').
Yuya Nishihara - Nov. 19, 2015, 2:36 p.m.
On Thu, 19 Nov 2015 07:58:16 -0600, Mathias De Maré wrote:
> # HG changeset patch
> # User Mathias De Maré <mathias.demare@gmail.com>
> # Date 1447866343 -3600
> #      Wed Nov 18 18:05:43 2015 +0100
> # Node ID afb732f543249e09acfd0438747223fbf7a4484f
> # Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
> commands: add an option to display only the full id with 'hg id'
> 
> 'hg id --full' can display the full revision id without having to use --debug.
> This avoids potential additional debug messages being printed
> and is more intuitive (it's a specific option to 'hg id').
> 
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -4165,6 +4165,7 @@
>       _('identify the specified revision'), _('REV')),
>      ('n', 'num', None, _('show local revision number')),
>      ('i', 'id', None, _('show global revision id')),
> +    ('', 'full', None, _('show full global revision id')),
>      ('b', 'branch', None, _('show branch')),
>      ('t', 'tags', None, _('show tags')),
>      ('B', 'bookmarks', None, _('show bookmarks')),
> @@ -4172,7 +4173,8 @@
>      _('[-nibtB] [-r REV] [SOURCE]'),
>      optionalrepo=True)
>  def identify(ui, repo, source=None, rev=None,
> -             num=None, id=None, branch=None, tags=None, bookmarks=None, **opts):
> +             num=None, id=None, branch=None, tags=None, bookmarks=None,
> +             full=None, **opts):
>      """identify the working directory or specified revision
>  
>      Print a summary identifying the repository state at REV using one or
> @@ -4194,6 +4196,11 @@
>  
>            hg id --id > build-id.dat
>  
> +      - generate a build identifier with the full revision id
> +        for the working directory::
> +
> +          hg id --full > build-id.dat

I don't think --full is intuitive because it does two things, select --id
and enable full hash. Perhaps we should avoid bloating formatting options by
-T template.
Mathias De Maré - Nov. 19, 2015, 2:51 p.m.
On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org> wrote:

> On Thu, 19 Nov 2015 07:58:16 -0600, Mathias De Maré wrote:
> > # HG changeset patch
> > # User Mathias De Maré <mathias.demare@gmail.com>
> > # Date 1447866343 -3600
> > #      Wed Nov 18 18:05:43 2015 +0100
> > # Node ID afb732f543249e09acfd0438747223fbf7a4484f
> > # Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
> > commands: add an option to display only the full id with 'hg id'
> >
> > 'hg id --full' can display the full revision id without having to use
> --debug.
> > This avoids potential additional debug messages being printed
> > and is more intuitive (it's a specific option to 'hg id').
> >
> > diff --git a/mercurial/commands.py b/mercurial/commands.py
> > --- a/mercurial/commands.py
> > +++ b/mercurial/commands.py
> > @@ -4165,6 +4165,7 @@
> >       _('identify the specified revision'), _('REV')),
> >      ('n', 'num', None, _('show local revision number')),
> >      ('i', 'id', None, _('show global revision id')),
> > +    ('', 'full', None, _('show full global revision id')),
> >      ('b', 'branch', None, _('show branch')),
> >      ('t', 'tags', None, _('show tags')),
> >      ('B', 'bookmarks', None, _('show bookmarks')),
> > @@ -4172,7 +4173,8 @@
> >      _('[-nibtB] [-r REV] [SOURCE]'),
> >      optionalrepo=True)
> >  def identify(ui, repo, source=None, rev=None,
> > -             num=None, id=None, branch=None, tags=None, bookmarks=None,
> **opts):
> > +             num=None, id=None, branch=None, tags=None, bookmarks=None,
> > +             full=None, **opts):
> >      """identify the working directory or specified revision
> >
> >      Print a summary identifying the repository state at REV using one or
> > @@ -4194,6 +4196,11 @@
> >
> >            hg id --id > build-id.dat
> >
> > +      - generate a build identifier with the full revision id
> > +        for the working directory::
> > +
> > +          hg id --full > build-id.dat
>
> I don't think --full is intuitive because it does two things, select --id
> and enable full hash. Perhaps we should avoid bloating formatting options
> by
> -T template.
>
I thought it would be useful to have a single option for this. The
templating makes it less obvious for an average user.
I could change '--full' so it enables the full hash, but does not select
--id.
Augie Fackler - Nov. 19, 2015, 2:58 p.m.
On Thu, Nov 19, 2015 at 9:51 AM, Mathias De Maré
<mathias.demare@gmail.com> wrote:
>
> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org> wrote:
>>
>> On Thu, 19 Nov 2015 07:58:16 -0600, Mathias De Maré wrote:
>> > # HG changeset patch
>> > # User Mathias De Maré <mathias.demare@gmail.com>
>> > # Date 1447866343 -3600
>> > #      Wed Nov 18 18:05:43 2015 +0100
>> > # Node ID afb732f543249e09acfd0438747223fbf7a4484f
>> > # Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
>> > commands: add an option to display only the full id with 'hg id'
>> >
>> > 'hg id --full' can display the full revision id without having to use
>> > --debug.
>> > This avoids potential additional debug messages being printed
>> > and is more intuitive (it's a specific option to 'hg id').
>> >
>> > diff --git a/mercurial/commands.py b/mercurial/commands.py
>> > --- a/mercurial/commands.py
>> > +++ b/mercurial/commands.py
>> > @@ -4165,6 +4165,7 @@
>> >       _('identify the specified revision'), _('REV')),
>> >      ('n', 'num', None, _('show local revision number')),
>> >      ('i', 'id', None, _('show global revision id')),
>> > +    ('', 'full', None, _('show full global revision id')),
>> >      ('b', 'branch', None, _('show branch')),
>> >      ('t', 'tags', None, _('show tags')),
>> >      ('B', 'bookmarks', None, _('show bookmarks')),
>> > @@ -4172,7 +4173,8 @@
>> >      _('[-nibtB] [-r REV] [SOURCE]'),
>> >      optionalrepo=True)
>> >  def identify(ui, repo, source=None, rev=None,
>> > -             num=None, id=None, branch=None, tags=None, bookmarks=None,
>> > **opts):
>> > +             num=None, id=None, branch=None, tags=None, bookmarks=None,
>> > +             full=None, **opts):
>> >      """identify the working directory or specified revision
>> >
>> >      Print a summary identifying the repository state at REV using one
>> > or
>> > @@ -4194,6 +4196,11 @@
>> >
>> >            hg id --id > build-id.dat
>> >
>> > +      - generate a build identifier with the full revision id
>> > +        for the working directory::
>> > +
>> > +          hg id --full > build-id.dat
>>
>> I don't think --full is intuitive because it does two things, select --id
>> and enable full hash. Perhaps we should avoid bloating formatting options
>> by
>> -T template.
>
> I thought it would be useful to have a single option for this. The
> templating makes it less obvious for an average user.
> I could change '--full' so it enables the full hash, but does not select
> --id.


If we do the templating (which I'm in favor of), then we can have a
little example in the help that prints the full node id.
Pierre-Yves David - Nov. 20, 2015, 3:09 a.m.
On 11/19/2015 06:51 AM, Mathias De Maré wrote:
>
>
> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org
> <mailto:yuya@tcha.org>> wrote:
>
>     On Thu, 19 Nov 2015 07:58:16 -0600, Mathias De Maré wrote:
>      > # HG changeset patch
>      > # User Mathias De Maré <mathias.demare@gmail.com
>     <mailto:mathias.demare@gmail.com>>
>      > # Date 1447866343 -3600
>      > #      Wed Nov 18 18:05:43 2015 +0100
>      > # Node ID afb732f543249e09acfd0438747223fbf7a4484f
>      > # Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
>      > commands: add an option to display only the full id with 'hg id'
>      >
>      > 'hg id --full' can display the full revision id without having to
>     use --debug.
>      > This avoids potential additional debug messages being printed
>      > and is more intuitive (it's a specific option to 'hg id').
>      >
>      > diff --git a/mercurial/commands.py b/mercurial/commands.py
>      > --- a/mercurial/commands.py
>      > +++ b/mercurial/commands.py
>      > @@ -4165,6 +4165,7 @@
>      >       _('identify the specified revision'), _('REV')),
>      >      ('n', 'num', None, _('show local revision number')),
>      >      ('i', 'id', None, _('show global revision id')),
>      > +    ('', 'full', None, _('show full global revision id')),
>      >      ('b', 'branch', None, _('show branch')),
>      >      ('t', 'tags', None, _('show tags')),
>      >      ('B', 'bookmarks', None, _('show bookmarks')),
>      > @@ -4172,7 +4173,8 @@
>      >      _('[-nibtB] [-r REV] [SOURCE]'),
>      >      optionalrepo=True)
>      >  def identify(ui, repo, source=None, rev=None,
>      > -             num=None, id=None, branch=None, tags=None,
>     bookmarks=None, **opts):
>      > +             num=None, id=None, branch=None, tags=None,
>     bookmarks=None,
>      > +             full=None, **opts):
>      >      """identify the working directory or specified revision
>      >
>      >      Print a summary identifying the repository state at REV
>     using one or
>      > @@ -4194,6 +4196,11 @@
>      >
>      >            hg id --id > build-id.dat
>      >
>      > +      - generate a build identifier with the full revision id
>      > +        for the working directory::
>      > +
>      > +          hg id --full > build-id.dat
>
>     I don't think --full is intuitive because it does two things, select
>     --id
>     and enable full hash. Perhaps we should avoid bloating formatting
>     options by
>     -T template.
>
> I thought it would be useful to have a single option for this. The
> templating makes it less obvious for an average user.
> I could change '--full' so it enables the full hash, but does not select
> --id.

I'm in favor of keeping this at the templating level.

My reasoning is that average user probably do not need the full hash. 
People who need the full hash are probably doing scripting and should 
learn about the templating language.

We could make templating more discoverable. I like Augie proposal of 
pointing to it from `hg help id` with an example.
Mathias De Maré - Nov. 22, 2015, 8:24 a.m.
On Fri, Nov 20, 2015 at 4:09 AM, Pierre-Yves David <
pierre-yves.david@ens-lyon.org> wrote:

>
>
> On 11/19/2015 06:51 AM, Mathias De Maré wrote:
>
>>
>>
>> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org
>> <mailto:yuya@tcha.org>> wrote:
>>
>>     On Thu, 19 Nov 2015 07:58:16 -0600, Mathias De Maré wrote:
>>      > # HG changeset patch
>>      > # User Mathias De Maré <mathias.demare@gmail.com
>>     <mailto:mathias.demare@gmail.com>>
>>
>>      > # Date 1447866343 -3600
>>      > #      Wed Nov 18 18:05:43 2015 +0100
>>      > # Node ID afb732f543249e09acfd0438747223fbf7a4484f
>>      > # Parent  53c668dc6b1601c8bda5098df4e33030dbdb454d
>>      > commands: add an option to display only the full id with 'hg id'
>>      >
>>      > 'hg id --full' can display the full revision id without having to
>>     use --debug.
>>      > This avoids potential additional debug messages being printed
>>      > and is more intuitive (it's a specific option to 'hg id').
>>      >
>>      > diff --git a/mercurial/commands.py b/mercurial/commands.py
>>      > --- a/mercurial/commands.py
>>      > +++ b/mercurial/commands.py
>>      > @@ -4165,6 +4165,7 @@
>>      >       _('identify the specified revision'), _('REV')),
>>      >      ('n', 'num', None, _('show local revision number')),
>>      >      ('i', 'id', None, _('show global revision id')),
>>      > +    ('', 'full', None, _('show full global revision id')),
>>      >      ('b', 'branch', None, _('show branch')),
>>      >      ('t', 'tags', None, _('show tags')),
>>      >      ('B', 'bookmarks', None, _('show bookmarks')),
>>      > @@ -4172,7 +4173,8 @@
>>      >      _('[-nibtB] [-r REV] [SOURCE]'),
>>      >      optionalrepo=True)
>>      >  def identify(ui, repo, source=None, rev=None,
>>      > -             num=None, id=None, branch=None, tags=None,
>>     bookmarks=None, **opts):
>>      > +             num=None, id=None, branch=None, tags=None,
>>     bookmarks=None,
>>      > +             full=None, **opts):
>>      >      """identify the working directory or specified revision
>>      >
>>      >      Print a summary identifying the repository state at REV
>>     using one or
>>      > @@ -4194,6 +4196,11 @@
>>      >
>>      >            hg id --id > build-id.dat
>>      >
>>      > +      - generate a build identifier with the full revision id
>>      > +        for the working directory::
>>      > +
>>      > +          hg id --full > build-id.dat
>>
>>     I don't think --full is intuitive because it does two things, select
>>     --id
>>     and enable full hash. Perhaps we should avoid bloating formatting
>>     options by
>>     -T template.
>>
>> I thought it would be useful to have a single option for this. The
>> templating makes it less obvious for an average user.
>> I could change '--full' so it enables the full hash, but does not select
>> --id.
>>
>
> I'm in favor of keeping this at the templating level.
>
Would this be the full templating system also used for log?
Just to clarify (since this will make 'hg id' a lot more advanced).
Yuya Nishihara - Nov. 22, 2015, 4:08 p.m.
On Sun, 22 Nov 2015 09:24:38 +0100, Mathias De Maré wrote:
> On Fri, Nov 20, 2015 at 4:09 AM, Pierre-Yves David <
> pierre-yves.david@ens-lyon.org> wrote:
> > On 11/19/2015 06:51 AM, Mathias De Maré wrote:
> >> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org
> >>     I don't think --full is intuitive because it does two things, select
> >>     --id
> >>     and enable full hash. Perhaps we should avoid bloating formatting
> >>     options by
> >>     -T template.
> >>
> >> I thought it would be useful to have a single option for this. The
> >> templating makes it less obvious for an average user.
> >> I could change '--full' so it enables the full hash, but does not select
> >> --id.
> >>
> >
> > I'm in favor of keeping this at the templating level.
> >
> Would this be the full templating system also used for log?
> Just to clarify (since this will make 'hg id' a lot more advanced).

It will use ui.formatter(), but I think it won't be simple.
Pierre-Yves David - Nov. 23, 2015, 5:13 a.m.
On 11/22/2015 08:08 AM, Yuya Nishihara wrote:
> On Sun, 22 Nov 2015 09:24:38 +0100, Mathias De Maré wrote:
>> On Fri, Nov 20, 2015 at 4:09 AM, Pierre-Yves David <
>> pierre-yves.david@ens-lyon.org> wrote:
>>> On 11/19/2015 06:51 AM, Mathias De Maré wrote:
>>>> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org
>>>>      I don't think --full is intuitive because it does two things, select
>>>>      --id
>>>>      and enable full hash. Perhaps we should avoid bloating formatting
>>>>      options by
>>>>      -T template.
>>>>
>>>> I thought it would be useful to have a single option for this. The
>>>> templating makes it less obvious for an average user.
>>>> I could change '--full' so it enables the full hash, but does not select
>>>> --id.
>>>>
>>>
>>> I'm in favor of keeping this at the templating level.
>>>
>> Would this be the full templating system also used for log?
>> Just to clarify (since this will make 'hg id' a lot more advanced).
>
> It will use ui.formatter(), but I think it won't be simple.

I'm thinking about pointing people from `hg id -r x --debug`
to `hg log -T {node} -r x`

We probably can't really introduces templater support for `hg id`. This 
is one of this antediluvian command with a strange contract. `hg id` can 
be used on a remote repository (to know the hash of various name there). 
In the remote case we do not have any infrastructure to build changectx 
and feed them to the templater.

(Well we could make stuff work for the local case, but meh)

Pointing at hg log -T and hg summary is probably a better experience for 
current `hg id` user.
Matt Harbison - Nov. 24, 2015, 2:32 a.m.
On Mon, 23 Nov 2015 00:13:27 -0500, Pierre-Yves David  
<pierre-yves.david@ens-lyon.org> wrote:

>
>
> On 11/22/2015 08:08 AM, Yuya Nishihara wrote:
>> On Sun, 22 Nov 2015 09:24:38 +0100, Mathias De Maré wrote:
>>> On Fri, Nov 20, 2015 at 4:09 AM, Pierre-Yves David <
>>> pierre-yves.david@ens-lyon.org> wrote:
>>>> On 11/19/2015 06:51 AM, Mathias De Maré wrote:
>>>>> On Thu, Nov 19, 2015 at 3:36 PM, Yuya Nishihara <yuya@tcha.org
>>>>>      I don't think --full is intuitive because it does two things,  
>>>>> select
>>>>>      --id
>>>>>      and enable full hash. Perhaps we should avoid bloating  
>>>>> formatting
>>>>>      options by
>>>>>      -T template.
>>>>>
>>>>> I thought it would be useful to have a single option for this. The
>>>>> templating makes it less obvious for an average user.
>>>>> I could change '--full' so it enables the full hash, but does not  
>>>>> select
>>>>> --id.
>>>>>
>>>>
>>>> I'm in favor of keeping this at the templating level.
>>>>
>>> Would this be the full templating system also used for log?
>>> Just to clarify (since this will make 'hg id' a lot more advanced).
>>
>> It will use ui.formatter(), but I think it won't be simple.
>
> I'm thinking about pointing people from `hg id -r x --debug`
> to `hg log -T {node} -r x`
>
> We probably can't really introduces templater support for `hg id`. This  
> is one of this antediluvian command with a strange contract. `hg id` can  
> be used on a remote repository (to know the hash of various name there).  
> In the remote case we do not have any infrastructure to build changectx  
> and feed them to the templater.
>
> (Well we could make stuff work for the local case, but meh)
>
> Pointing at hg log -T and hg summary is probably a better experience for  
> current `hg id` user.

The only thing I missed using log instead of id is the '+' when dirty.   
Yuya's workaround [1] was good enough for me because it was scripted and  
forgotten about, but it's definitely way more obscure than `hg id -i  
--debug`.  I had a patch for a dirty keyword [2], but that obviously only  
applies to wdir(), so it wasn't taken.

[1] https://selenic.com/pipermail/mercurial-devel/2015-June/071588.html
[2] https://selenic.com/pipermail/mercurial-devel/2015-June/071472.html

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4165,6 +4165,7 @@ 
      _('identify the specified revision'), _('REV')),
     ('n', 'num', None, _('show local revision number')),
     ('i', 'id', None, _('show global revision id')),
+    ('', 'full', None, _('show full global revision id')),
     ('b', 'branch', None, _('show branch')),
     ('t', 'tags', None, _('show tags')),
     ('B', 'bookmarks', None, _('show bookmarks')),
@@ -4172,7 +4173,8 @@ 
     _('[-nibtB] [-r REV] [SOURCE]'),
     optionalrepo=True)
 def identify(ui, repo, source=None, rev=None,
-             num=None, id=None, branch=None, tags=None, bookmarks=None, **opts):
+             num=None, id=None, branch=None, tags=None, bookmarks=None,
+             full=None, **opts):
     """identify the working directory or specified revision
 
     Print a summary identifying the repository state at REV using one or
@@ -4194,6 +4196,11 @@ 
 
           hg id --id > build-id.dat
 
+      - generate a build identifier with the full revision id
+        for the working directory::
+
+          hg id --full > build-id.dat
+
       - find the revision corresponding to a tag::
 
           hg id -n -r 1.3
@@ -4209,11 +4216,11 @@ 
         raise error.Abort(_("there is no Mercurial repository here "
                            "(.hg not found)"))
 
-    if ui.debugflag:
+    if ui.debugflag or full:
         hexfunc = hex
     else:
         hexfunc = short
-    default = not (num or id or branch or tags or bookmarks)
+    default = not (num or id or full or branch or tags or bookmarks)
     output = []
     revs = []
 
@@ -4264,18 +4271,18 @@ 
                 taglist.extend(p.tags())
 
             changed = ""
-            if default or id or num:
+            if default or id or full or num:
                 if (any(repo.status())
                     or any(ctx.sub(s).dirty() for s in ctx.substate)):
                     changed = '+'
-            if default or id:
+            if default or id or full:
                 output = ["%s%s" %
                   ('+'.join([hexfunc(p.node()) for p in parents]), changed)]
             if num:
                 output.append("%s%s" %
                   ('+'.join([str(p.rev()) for p in parents]), changed))
         else:
-            if default or id:
+            if default or id or full:
                 output = [hexfunc(ctx.node())]
             if num:
                 output.append(str(ctx.rev()))
diff --git a/tests/test-completion.t b/tests/test-completion.t
--- a/tests/test-completion.t
+++ b/tests/test-completion.t
@@ -277,7 +277,7 @@ 
   grep: print0, all, text, follow, ignore-case, files-with-matches, line-number, rev, user, date, include, exclude
   heads: rev, topo, active, closed, style, template
   help: extension, command, keyword
-  identify: rev, num, id, branch, tags, bookmarks, ssh, remotecmd, insecure
+  identify: rev, num, id, full, branch, tags, bookmarks, ssh, remotecmd, insecure
   import: strip, base, edit, force, no-commit, bypass, partial, exact, prefix, import-branch, message, logfile, date, user, similarity
   incoming: force, newest-first, bundle, rev, bookmarks, branch, patch, git, limit, no-merges, stat, graph, style, template, ssh, remotecmd, insecure, subrepos
   locate: rev, print0, fullpath, include, exclude
diff --git a/tests/test-hook.t b/tests/test-hook.t
--- a/tests/test-hook.t
+++ b/tests/test-hook.t
@@ -101,7 +101,7 @@ 
 test generic hooks
 
   $ hg id
-  pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[]
+  pre-identify hook: HG_ARGS=id HG_OPTS={'bookmarks': None, 'branch': None, 'full': None, 'id': None, 'insecure': None, 'num': None, 'remotecmd': '', 'rev': '', 'ssh': '', 'tags': None} HG_PATS=[]
   abort: pre-identify hook exited with status 1
   [255]
   $ hg cat b
diff --git a/tests/test-identify.t b/tests/test-identify.t
--- a/tests/test-identify.t
+++ b/tests/test-identify.t
@@ -35,6 +35,8 @@ 
   cb9a9f314b8b tip
   $ hg id -n
   0
+  $ hg id --full
+  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
   $ hg id -t
   tip
   $ hg id -b
@@ -43,12 +45,16 @@ 
   cb9a9f314b8b
   $ hg id -n -t -b -i
   cb9a9f314b8b 0 default tip
+  $ hg id -n --full -t -b -i
+  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b 0 default tip
 
 with modifications
 
   $ echo b > a
   $ hg id -n -t -b -i
   cb9a9f314b8b+ 0+ default tip
+  $ hg id -n --full -t -b -i
+  cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b+ 0+ default tip
 
 other local repo