mercurial/cmdutil.py
changeset 20756 e7833e63bb42
parent 20755 cfd03c069e08
child 20757 3813a1dd9eb9
equal deleted inserted replaced
20755:cfd03c069e08 20756:e7833e63bb42
  1513     opts = dict(opts)
  1513     opts = dict(opts)
  1514     # follow or not follow?
  1514     # follow or not follow?
  1515     follow = opts.get('follow') or opts.get('follow_first')
  1515     follow = opts.get('follow') or opts.get('follow_first')
  1516     followfirst = opts.get('follow_first') and 1 or 0
  1516     followfirst = opts.get('follow_first') and 1 or 0
  1517     # --follow with FILE behaviour depends on revs...
  1517     # --follow with FILE behaviour depends on revs...
  1518     startrev = revs[0]
  1518     it = iter(revs)
  1519     followdescendants = (len(revs) > 1 and revs[0] < revs[1]) and 1 or 0
  1519     startrev = it.next()
       
  1520     try:
       
  1521         followdescendants = startrev < it.next()
       
  1522     except (StopIteration):
       
  1523         followdescendants = False
  1520 
  1524 
  1521     # branch and only_branch are really aliases and must be handled at
  1525     # branch and only_branch are really aliases and must be handled at
  1522     # the same time
  1526     # the same time
  1523     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
  1527     opts['branch'] = opts.get('branch', []) + opts.get('only_branch', [])
  1524     opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]
  1528     opts['branch'] = [repo.lookupbranch(b) for b in opts['branch']]