Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mercurial: How to make HG LOG to show trivial parent?

According to HG manual:

By default this command prints revision number and changeset id, tags, non-trivial parents, user, date and time, and a summary for each commit. When the -v/--verbose switch is used, the list of changed files and full commit message are shown.

I have tried hg log -v but still it does not show the trivial parents.

like image 997
TN. Avatar asked Mar 03 '10 14:03

TN.


3 Answers

You can use the --debug option.

$ hg log --template '{parents}\n' --debug
12:49f2f93d2efdd41c9ffb9dccf4d451e2d8bfbc5f -1:0000000000000000000000000000000000000000 
7:012b1bb5d99549a5a7c1a280755fa6336c0b472a -1:0000000000000000000000000000000000000000 
10:d6dc52582cfaa0e8be17a5b9da61b55692353afc 11:8ee9fa792548fc30669a34cf39fcc7185aabaa19 
8:d589ca45072469148f833f38918861e8de406e64 -1:0000000000000000000000000000000000000000 
like image 194
vsh Avatar answered Nov 15 '22 11:11

vsh


You can see them visually in 'hg log -G' once you've turned on the Graphlog Extension.

In this context "trivial" just means "is the current revision number minus one", so in a situation like this:

o  changeset:   1440:fe26f69d4b84
|  user:        [email protected]
|  date:        Fri Jul 18 12:11:58 2008 -0400
|  summary:     Typo in last commit.
|
o  changeset:   1439:74cbef36b62f
|  user:        [email protected]
|  date:        Fri Jul 18 12:10:23 2008 -0400
|  summary:     Fix bug in JobWrapper.get_input_fnames(), used by pbs runner, when an input dataset was optional and left empty.
|
o  changeset:   1438:1e111ebb2664
|  user:        James Taylor <[email protected]>
|  date:        Thu Jul 17 22:14:40 2008 -0400
|  summary:     Workflows (owned and shared) can now be added to the tool menu.
|
o    changeset:   1437:4a4de494fbf6
|\   parent:      1436:37a7f508eb30
| |  parent:      1431:8b83b7250224
| |  user:        James Taylor <[email protected]>
| |  date:        Thu Jul 17 20:42:00 2008 -0400
| |  summary:     Merge.
| |
| o  changeset:   1436:37a7f508eb30
| |  user:        James Taylor <[email protected]>
| |  date:        Thu Jul 17 20:40:20 2008 -0400
| |  summary:     Allow loading a specific controller/action in the root middle frame, and use
| |
| o  changeset:   1435:96e1cda02414
| |  user:        James Taylor <[email protected]>
| |  date:        Thu Jul 17 20:16:13 2008 -0400
| |  summary:     Fix for scroll panel when dropping while still overlapping the edge.
| |

A parent list is only shown for 1437 because for the rest have a single parent that is revision number minus one.

like image 33
Ry4an Brase Avatar answered Nov 15 '22 10:11

Ry4an Brase


The template keyword parents is empty when the only parent is the next node

hg log --template "{parents}\n" -l 20

like image 28
Bas Smit Avatar answered Nov 15 '22 12:11

Bas Smit