Show More
@@ -257,6 +257,7 b' def revset(pats, opts):' | |||||
257 | 'prune': (2, 'not ($ or ancestors($))'), |
|
257 | 'prune': (2, 'not ($ or ancestors($))'), | |
258 | 'user': (2, 'user($)'), |
|
258 | 'user': (2, 'user($)'), | |
259 | } |
|
259 | } | |
|
260 | optrevset = [] | |||
260 | revset = [] |
|
261 | revset = [] | |
261 | for op, val in opts.iteritems(): |
|
262 | for op, val in opts.iteritems(): | |
262 | if not val: |
|
263 | if not val: | |
@@ -269,17 +270,24 b' def revset(pats, opts):' | |||||
269 | arity, revop = opt2revset[op] |
|
270 | arity, revop = opt2revset[op] | |
270 | revop = revop.replace('$', '%(val)r') |
|
271 | revop = revop.replace('$', '%(val)r') | |
271 | if arity == 0: |
|
272 | if arity == 0: | |
272 | revset.append(revop) |
|
273 | optrevset.append(revop) | |
273 | elif arity == 1: |
|
274 | elif arity == 1: | |
274 | revset.append(revop % {'val': val}) |
|
275 | optrevset.append(revop % {'val': val}) | |
275 | else: |
|
276 | else: | |
276 | for f in val: |
|
277 | for f in val: | |
277 | revset.append(revop % {'val': f}) |
|
278 | optrevset.append(revop % {'val': f}) | |
278 |
|
279 | |||
279 | for path in pats: |
|
280 | for path in pats: | |
280 | revset.append('file(%r)' % path) |
|
281 | optrevset.append('file(%r)' % path) | |
281 |
|
282 | |||
282 | revset = ' and '.join(revset) or 'all()' |
|
283 | if revset or optrevset: | |
|
284 | if revset: | |||
|
285 | revset = ['(' + ' or '.join(revset) + ')'] | |||
|
286 | if optrevset: | |||
|
287 | revset.append('(' + ' and '.join(optrevset) + ')') | |||
|
288 | revset = ' and '.join(revset) | |||
|
289 | else: | |||
|
290 | revset = 'all()' | |||
283 | # we want reverted revset to build graph |
|
291 | # we want reverted revset to build graph | |
284 | revset = 'reverse(%s)' % revset |
|
292 | revset = 'reverse(%s)' % revset | |
285 | if opts['limit']: |
|
293 | if opts['limit']: |
@@ -1319,12 +1319,13 b' File + limit + -ra:b, b < tip:' | |||||
1319 | file(File) + limit + -ra:b, b < tip: |
|
1319 | file(File) + limit + -ra:b, b < tip: | |
1320 |
|
1320 | |||
1321 | $ hg glog -l1 -r32:34 -r 'file("a")' |
|
1321 | $ hg glog -l1 -r32:34 -r 'file("a")' | |
1322 |
o changeset: 3 |
|
1322 | o changeset: 31:621d83e11f67 | |
1323 |
| parent: |
|
1323 | |\ parent: 21:d42a756af44d | |
1324 | | user: test |
|
1324 | | | parent: 30:6e11cd4b648f | |
1325 | | date: Thu Jan 01 00:00:34 1970 +0000 |
|
1325 | | | user: test | |
1326 | | summary: (34) head |
|
1326 | | | date: Thu Jan 01 00:00:31 1970 +0000 | |
1327 | | |
|
1327 | | | summary: (31) expand | |
|
1328 | | | | |||
1328 |
|
1329 | |||
1329 | limit(file(File) and a::b), b < tip: |
|
1330 | limit(file(File) and a::b), b < tip: | |
1330 |
|
1331 | |||
@@ -1453,3 +1454,11 b' Test log -G options' | |||||
1453 | $ hg log -G --follow a |
|
1454 | $ hg log -G --follow a | |
1454 | abort: -G/--graph option is incompatible with --follow with file argument |
|
1455 | abort: -G/--graph option is incompatible with --follow with file argument | |
1455 | [255] |
|
1456 | [255] | |
|
1457 | ||||
|
1458 | Test multiple revision specifications are correctly handled | |||
|
1459 | ||||
|
1460 | $ hg log -G -r 27 -r 25 --branch default --template '{rev}\n' | |||
|
1461 | o 25 | |||
|
1462 | |\ | |||
|
1463 | +---o 27 | |||
|
1464 | | | |
General Comments 0
You need to be logged in to leave comments.
Login now