Show More
@@ -98,21 +98,23 b' o (0) root' | |||||
98 | > return cmdutil._makelogrevset(repo, pats, opts, revs)[0] |
|
98 | > return cmdutil._makelogrevset(repo, pats, opts, revs)[0] | |
99 | > |
|
99 | > | |
100 | > def uisetup(ui): |
|
100 | > def uisetup(ui): | |
101 |
> def printrevset(orig, |
|
101 | > def printrevset(orig, repo, pats, opts): | |
|
102 | > revs, filematcher = orig(repo, pats, opts) | |||
102 | > if opts.get('print_revset'): |
|
103 | > if opts.get('print_revset'): | |
103 | > revs = cmdutil.getlogrevs(repo, pats, opts)[0] |
|
|||
104 | > expr = logrevset(repo, pats, opts) |
|
104 | > expr = logrevset(repo, pats, opts) | |
105 | > if expr: |
|
105 | > if expr: | |
106 | > tree = revsetlang.parse(expr) |
|
106 | > tree = revsetlang.parse(expr) | |
107 | > tree = revsetlang.analyze(tree) |
|
107 | > tree = revsetlang.analyze(tree) | |
108 | > else: |
|
108 | > else: | |
109 | > tree = [] |
|
109 | > tree = [] | |
|
110 | > ui = repo.ui | |||
110 | > ui.write('%r\n' % (opts.get('rev', []),)) |
|
111 | > ui.write('%r\n' % (opts.get('rev', []),)) | |
111 | > ui.write(revsetlang.prettyformat(tree) + '\n') |
|
112 | > ui.write(revsetlang.prettyformat(tree) + '\n') | |
112 | > ui.write(smartset.prettyformat(revs) + '\n') |
|
113 | > ui.write(smartset.prettyformat(revs) + '\n') | |
113 | > return 0 |
|
114 | > revs = smartset.baseset() # display no revisions | |
114 | > return orig(ui, repo, *pats, **opts) |
|
115 | > return revs, filematcher | |
115 |
> |
|
116 | > extensions.wrapfunction(cmdutil, 'getlogrevs', printrevset) | |
|
117 | > aliases, entry = cmdutil.findcmd('log', commands.table) | |||
116 | > entry[1].append(('', 'print-revset', False, |
|
118 | > entry[1].append(('', 'print-revset', False, | |
117 | > 'print generated revset and exit (DEPRECATED)')) |
|
119 | > 'print generated revset and exit (DEPRECATED)')) | |
118 | > EOF |
|
120 | > EOF | |
@@ -2304,15 +2306,9 b' changessincelatesttag with no prior tag' | |||||
2304 | -f |
|
2306 | -f | |
2305 | +g |
|
2307 | +g | |
2306 | $ testlog --follow -r6 -r8 -r5 -r7 -r4 |
|
2308 | $ testlog --follow -r6 -r8 -r5 -r7 -r4 | |
2307 | ['6', '8', '5', '7', '4'] |
|
2309 | ['reverse(::(((6) or (8)) or ((5) or ((7) or (4)))))'] | |
2308 | (func |
|
2310 | [] | |
2309 | (symbol 'descendants') |
|
2311 | <generatorsetdesc-> | |
2310 | (func |
|
|||
2311 | (symbol 'rev') |
|
|||
2312 | (symbol '6'))) |
|
|||
2313 | <filteredset |
|
|||
2314 | <baseset- [4, 5, 6, 7, 8]>, |
|
|||
2315 | <generatorsetasc+>> |
|
|||
2316 |
|
2312 | |||
2317 | Test --follow-first and forward --rev |
|
2313 | Test --follow-first and forward --rev | |
2318 |
|
2314 | |||
@@ -2337,15 +2333,9 b' Test --follow-first and forward --rev' | |||||
2337 | Test --follow and backward --rev |
|
2333 | Test --follow and backward --rev | |
2338 |
|
2334 | |||
2339 | $ testlog --follow -r6 -r5 -r7 -r8 -r4 |
|
2335 | $ testlog --follow -r6 -r5 -r7 -r8 -r4 | |
2340 | ['6', '5', '7', '8', '4'] |
|
2336 | ['reverse(::(((6) or (5)) or ((7) or ((8) or (4)))))'] | |
2341 | (func |
|
2337 | [] | |
2342 | (symbol 'ancestors') |
|
2338 | <generatorsetdesc-> | |
2343 | (func |
|
|||
2344 | (symbol 'rev') |
|
|||
2345 | (symbol '6'))) |
|
|||
2346 | <filteredset |
|
|||
2347 | <baseset- [4, 5, 6, 7, 8]>, |
|
|||
2348 | <generatorsetdesc+>> |
|
|||
2349 |
|
2339 | |||
2350 | Test --follow-first and backward --rev |
|
2340 | Test --follow-first and backward --rev | |
2351 |
|
2341 |
General Comments 0
You need to be logged in to leave comments.
Login now