277 are not passed filematcher is None. Otherwise it is a callable |
277 are not passed filematcher is None. Otherwise it is a callable |
278 taking a revision number and returning a match objects filtering |
278 taking a revision number and returning a match objects filtering |
279 the files to be detailed when displaying the revision. |
279 the files to be detailed when displaying the revision. |
280 """ |
280 """ |
281 opt2revset = { |
281 opt2revset = { |
282 'follow_first': ('_followfirst()', None), |
|
283 'no_merges': ('not merge()', None), |
282 'no_merges': ('not merge()', None), |
284 'only_merges': ('merge()', None), |
283 'only_merges': ('merge()', None), |
285 '_ancestors': ('ancestors(%(val)s)', None), |
284 '_ancestors': ('ancestors(%(val)s)', None), |
|
285 '_fancestors': ('_firstancestors(%(val)s)', None), |
286 '_descendants': ('descendants(%(val)s)', None), |
286 '_descendants': ('descendants(%(val)s)', None), |
|
287 '_fdescendants': ('_firstdescendants(%(val)s)', None), |
287 '_matchfiles': ('_matchfiles(%(val)s)', None), |
288 '_matchfiles': ('_matchfiles(%(val)s)', None), |
288 'date': ('date(%(val)r)', None), |
289 'date': ('date(%(val)r)', None), |
289 'branch': ('branch(%(val)r)', ' or '), |
290 'branch': ('branch(%(val)r)', ' or '), |
290 '_patslog': ('filelog(%(val)r)', ' or '), |
291 '_patslog': ('filelog(%(val)r)', ' or '), |
291 '_patsfollow': ('follow(%(val)r)', ' or '), |
292 '_patsfollow': ('follow(%(val)r)', ' or '), |
297 |
298 |
298 opts = dict(opts) |
299 opts = dict(opts) |
299 # follow or not follow? |
300 # follow or not follow? |
300 follow = opts.get('follow') or opts.get('follow_first') |
301 follow = opts.get('follow') or opts.get('follow_first') |
301 followfirst = opts.get('follow_first') |
302 followfirst = opts.get('follow_first') |
302 if 'follow_first' in opts: |
|
303 del opts['follow_first'] |
|
304 # --follow with FILE behaviour depends on revs... |
303 # --follow with FILE behaviour depends on revs... |
305 startrev = revs[0] |
304 startrev = revs[0] |
306 followdescendants = len(revs) > 1 and revs[0] < revs[1] |
305 followdescendants = len(revs) > 1 and revs[0] < revs[1] |
307 |
306 |
308 # branch and only_branch are really aliases and must be handled at |
307 # branch and only_branch are really aliases and must be handled at |