equal
deleted
inserted
replaced
81 > fi |
81 > fi |
82 > echo $rev > a |
82 > echo $rev > a |
83 > hg commit -Aqd "$rev 0" -m "($rev) $msg" |
83 > hg commit -Aqd "$rev 0" -m "($rev) $msg" |
84 > } |
84 > } |
85 |
85 |
|
86 $ cat > printrevset.py <<EOF |
|
87 > from mercurial import extensions, revset, commands |
|
88 > from hgext import graphlog |
|
89 > |
|
90 > def uisetup(ui): |
|
91 > def printrevset(orig, ui, repo, *pats, **opts): |
|
92 > if opts.get('print_revset'): |
|
93 > expr = graphlog.revset(pats, opts) |
|
94 > tree = revset.parse(expr)[0] |
|
95 > ui.write(tree, "\n") |
|
96 > return 0 |
|
97 > return orig(ui, repo, *pats, **opts) |
|
98 > entry = extensions.wrapcommand(commands.table, 'log', printrevset) |
|
99 > entry[1].append(('', 'print-revset', False, |
|
100 > 'print generated revset and exit (DEPRECATED)')) |
|
101 > EOF |
|
102 |
86 $ echo "[extensions]" >> $HGRCPATH |
103 $ echo "[extensions]" >> $HGRCPATH |
87 $ echo "graphlog=" >> $HGRCPATH |
104 $ echo "graphlog=" >> $HGRCPATH |
|
105 $ echo "printrevset=`pwd`/printrevset.py" >> $HGRCPATH |
88 |
106 |
89 $ hg init repo |
107 $ hg init repo |
90 $ cd repo |
108 $ cd repo |
91 |
109 |
92 Empty repo: |
110 Empty repo: |
1398 |
1416 |
1399 $ hg log -G -u 'something nice' |
1417 $ hg log -G -u 'something nice' |
1400 $ hg log -G -b 'something nice' |
1418 $ hg log -G -b 'something nice' |
1401 abort: unknown revision 'something nice'! |
1419 abort: unknown revision 'something nice'! |
1402 [255] |
1420 [255] |
1403 $ hg log -G -k 'something nice' |
1421 $ hg log -G --print-revset -k 'something' -k 'nice' |
|
1422 ('group', ('and', ('func', ('symbol', 'keyword'), ('string', 'something')), ('func', ('symbol', 'keyword'), ('string', 'nice')))) |
1404 $ hg log -G --only-branch 'something nice' |
1423 $ hg log -G --only-branch 'something nice' |
1405 abort: unknown revision 'something nice'! |
1424 abort: unknown revision 'something nice'! |
1406 [255] |
1425 [255] |
1407 $ hg log -G --include 'some file' --exclude 'another file' |
1426 $ hg log -G --include 'some file' --exclude 'another file' |
1408 $ hg log -G --follow --template 'nodetag {rev}\n' | grep nodetag | wc -l |
1427 $ hg log -G --follow --template 'nodetag {rev}\n' | grep nodetag | wc -l |