Show More
@@ -297,10 +297,10 b' def _makelogrevset(repo, pats, opts, rev' | |||
|
297 | 297 | opts = dict(opts) |
|
298 | 298 | # follow or not follow? |
|
299 | 299 | follow = opts.get('follow') or opts.get('follow_first') |
|
300 | followfirst = opts.get('follow_first') | |
|
300 | followfirst = opts.get('follow_first') and 1 or 0 | |
|
301 | 301 | # --follow with FILE behaviour depends on revs... |
|
302 | 302 | startrev = revs[0] |
|
303 | followdescendants = len(revs) > 1 and revs[0] < revs[1] | |
|
303 | followdescendants = (len(revs) > 1 and revs[0] < revs[1]) and 1 or 0 | |
|
304 | 304 | |
|
305 | 305 | # branch and only_branch are really aliases and must be handled at |
|
306 | 306 | # the same time |
@@ -349,22 +349,13 b' def _makelogrevset(repo, pats, opts, rev' | |||
|
349 | 349 | opts['_matchfiles'] = matchargs |
|
350 | 350 | else: |
|
351 | 351 | if follow: |
|
352 |
|
|
|
353 | if pats: | |
|
354 | opts['_patsfollowfirst'] = list(pats) | |
|
355 |
|
|
|
356 | if followdescendants: | |
|
357 | opts['_fdescendants'] = str(startrev) | |
|
358 | else: | |
|
359 | opts['_fancestors'] = str(startrev) | |
|
352 | fpats = ('_patsfollow', '_patsfollowfirst') | |
|
353 | fnopats = (('_ancestors', '_fancestors'), | |
|
354 | ('_descendants', '_fdescendants')) | |
|
355 | if pats: | |
|
356 | opts[fpats[followfirst]] = list(pats) | |
|
360 | 357 | else: |
|
361 | if pats: | |
|
362 | opts['_patsfollow'] = list(pats) | |
|
363 | else: | |
|
364 | if followdescendants: | |
|
365 | opts['_descendants'] = str(startrev) | |
|
366 | else: | |
|
367 | opts['_ancestors'] = str(startrev) | |
|
358 | opts[fnopats[followdescendants][followfirst]] = str(startrev) | |
|
368 | 359 | else: |
|
369 | 360 | opts['_patslog'] = list(pats) |
|
370 | 361 |
General Comments 0
You need to be logged in to leave comments.
Login now