Show More
@@ -224,13 +224,18 b' def revset(pats, opts):' | |||||
224 | """Return revset str built of revisions, log options and file patterns. |
|
224 | """Return revset str built of revisions, log options and file patterns. | |
225 | """ |
|
225 | """ | |
226 | opt2revset = dict(only_merges='merge()', |
|
226 | opt2revset = dict(only_merges='merge()', | |
227 | only_branch='branch', |
|
227 | only_branch='branch($)', | |
228 | no_merges='not merge()', |
|
228 | no_merges='not merge()', | |
229 | include='file', |
|
229 | include='file($)', | |
230 | exclude='not file', |
|
230 | exclude='not file($)', | |
231 |
prune='not |
|
231 | prune='not ($ or ancestors($))', | |
|
232 | user='user($)', | |||
|
233 | branch='branch($)', | |||
|
234 | keyword='keyword($)', | |||
232 | follow='follow()', |
|
235 | follow='follow()', | |
233 | removed='removes("*")') |
|
236 | removed='removes("*")') | |
|
237 | opt2revset = dict((k, v.replace('$', '%(val)r')) | |||
|
238 | for k,v in opt2revset.iteritems()) | |||
234 | revset = [] |
|
239 | revset = [] | |
235 | for op, val in opts.iteritems(): |
|
240 | for op, val in opts.iteritems(): | |
236 | if not val: |
|
241 | if not val: | |
@@ -243,7 +248,7 b' def revset(pats, opts):' | |||||
243 | elif op in ('include', 'exclude', 'user', 'branch', 'keyword', |
|
248 | elif op in ('include', 'exclude', 'user', 'branch', 'keyword', | |
244 | 'prune', 'only_branch'): |
|
249 | 'prune', 'only_branch'): | |
245 | for f in val: |
|
250 | for f in val: | |
246 |
revset.append( |
|
251 | revset.append(revop % {'val': f}) | |
247 | elif op == 'rev': |
|
252 | elif op == 'rev': | |
248 | revset.extend(val) |
|
253 | revset.extend(val) | |
249 |
|
254 |
@@ -1416,3 +1416,12 b' Test log -G options' | |||||
1416 | $ hg log -G -d 'brace ) in a date' |
|
1416 | $ hg log -G -d 'brace ) in a date' | |
1417 | abort: invalid date: 'brace ) in a date' |
|
1417 | abort: invalid date: 'brace ) in a date' | |
1418 | [255] |
|
1418 | [255] | |
|
1419 | $ hg log -G -P 32 --template '{rev}\n' | |||
|
1420 | @ 36 | |||
|
1421 | | | |||
|
1422 | o 35 | |||
|
1423 | | | |||
|
1424 | o 34 | |||
|
1425 | | | |||
|
1426 | | o 33 | |||
|
1427 | | | |
General Comments 0
You need to be logged in to leave comments.
Login now