Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 29216:ead25aa27a43
py3: convert to next() function
next(..) was introduced in py2.6 and .next() is not available in py3
https://docs.python.org/2/library/functions.html#next
author | timeless <timeless@mozdev.org> |
---|---|
date | Mon, 16 May 2016 21:30:53 +0000 |
parents | d115cbf5980b |
children | 14eee72c8d52 |
comparison
equal
deleted
inserted
replaced
29215:f5983805574e | 29216:ead25aa27a43 |
---|---|
1996 followfirst = 1 | 1996 followfirst = 1 |
1997 else: | 1997 else: |
1998 followfirst = 0 | 1998 followfirst = 0 |
1999 # --follow with FILE behavior depends on revs... | 1999 # --follow with FILE behavior depends on revs... |
2000 it = iter(revs) | 2000 it = iter(revs) |
2001 startrev = it.next() | 2001 startrev = next(it) |
2002 followdescendants = startrev < next(it, startrev) | 2002 followdescendants = startrev < next(it, startrev) |
2003 | 2003 |
2004 # branch and only_branch are really aliases and must be handled at | 2004 # branch and only_branch are really aliases and must be handled at |
2005 # the same time | 2005 # the same time |
2006 opts['branch'] = opts.get('branch', []) + opts.get('only_branch', []) | 2006 opts['branch'] = opts.get('branch', []) + opts.get('only_branch', []) |