[issue1435] {parents} should be more useful without --debug
Jesse Glick
mercurial-bugs at selenic.com
Fri Dec 12 13:11:06 CST 2008
New submission from Jesse Glick <jesse.glick at sun.com>:
Compare:
hg$ hg log --template '{node} {parents}\n' -l10
09508f8e2fa40362bd4d89a3dee714584ecc17f6
16905fc2690f744eeb009b872ca7cd6bf2f93027
732c54abd592d31e3e9cea8ba043321518c52c88 7497:f598df061fec 7500:ab3fb222b345
ab3fb222b3459c904810dfbade689b740c763297 7496:0a27d0db256d 7499:613f3c88a388
613f3c88a388e91b93feb7e02f9a1a9c068b7b48
64840fcb79e1f6b374d25612f06d8632d8f4884b 7476:6644c111f9e9
f598df061fec03e360d1adcb51f9da2e981c3ae5 7495:90487273f59c 7496:0a27d0db256d
0a27d0db256d995fb386509ceff3901509e511b4 7494:85dc88630beb
90487273f59c7a6242529ecc71793e1414c23cf8 7493:518afef5e350 7494:85dc88630beb
85dc88630beb98ea5bc6df7f0aecb1e4273e5e0a 7476:6644c111f9e9
hg$ hg log --template '{node} {parents}\n' -l10 --debug
09508f8e2fa40362bd4d89a3dee714584ecc17f6
7502:16905fc2690f744eeb009b872ca7cd6bf2f93027
-1:0000000000000000000000000000000000000000
16905fc2690f744eeb009b872ca7cd6bf2f93027
7501:732c54abd592d31e3e9cea8ba043321518c52c88
-1:0000000000000000000000000000000000000000
732c54abd592d31e3e9cea8ba043321518c52c88
7497:f598df061fec03e360d1adcb51f9da2e981c3ae5
7500:ab3fb222b3459c904810dfbade689b740c763297
ab3fb222b3459c904810dfbade689b740c763297
7496:0a27d0db256d995fb386509ceff3901509e511b4
7499:613f3c88a388e91b93feb7e02f9a1a9c068b7b48
613f3c88a388e91b93feb7e02f9a1a9c068b7b48
7498:64840fcb79e1f6b374d25612f06d8632d8f4884b
-1:0000000000000000000000000000000000000000
64840fcb79e1f6b374d25612f06d8632d8f4884b
7476:6644c111f9e9baee1cd98493428914e2e71a282e
-1:0000000000000000000000000000000000000000
f598df061fec03e360d1adcb51f9da2e981c3ae5
7495:90487273f59c7a6242529ecc71793e1414c23cf8
7496:0a27d0db256d995fb386509ceff3901509e511b4
0a27d0db256d995fb386509ceff3901509e511b4
7494:85dc88630beb98ea5bc6df7f0aecb1e4273e5e0a
-1:0000000000000000000000000000000000000000
90487273f59c7a6242529ecc71793e1414c23cf8
7493:518afef5e35007a050f6b0d9e89d99afd97740e8
7494:85dc88630beb98ea5bc6df7f0aecb1e4273e5e0a
85dc88630beb98ea5bc6df7f0aecb1e4273e5e0a
7476:6644c111f9e9baee1cd98493428914e2e71a282e
-1:0000000000000000000000000000000000000000
First of all, it is rather disconcerting that template output would vary
depending on the --debug flag.
Secondly, any kind of automated process which reads Hg log output looking for
parent lists is going to want the more verbose output that explicitly lists each
parent. Currently you need to add --debug, which is weird, and is likely to make
performance of the command as a whole worse.
Both the NetBeans Hg support, and the Hg plugin for the Hudson CI engine, have
at times passed --debug to hg log for this reason.
For compatibility it is probably impossible to change how {parents} works now.
But a new and better keyword could be introduced, e.g. {bothparents}, which
would work like {parents} does when --debug is passed, regardless of verbosity
level. Optionally template filters could be added, e.g.
{bothparents} -> 7476:6644c111f9e9baee1cd98493428914e2e71a282e
-1:0000000000000000000000000000000000000000
{bothparents|short} -> 7476:6644c111f9e9 -1:000000000000
{bothparents|norev} -> 6644c111f9e9baee1cd98493428914e2e71a282e
0000000000000000000000000000000000000000
{bothparents|skipnull} -> 6644c111f9e9baee1cd98493428914e2e71a282e
etc., though for the purpose of programs processing log output such filters
would be unnecessary.
----------
messages: 8182
nosy: jglick
priority: bug
status: unread
title: {parents} should be more useful without --debug
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1435>
____________________________________________________
More information about the Mercurial-devel
mailing list