Mercurial > hg-stable
diff hgext/rebase.py @ 16866:91f3ac205816
revlog: ancestors(*revs) becomes ancestors(revs) (API)
Accepting a variable number of arguments as the old API did is
deeply ugly, particularly as it means the API can't be extended
with new arguments. Partly as a result, we have at least three
different implementations of the same ancestors algorithm (!?).
Most callers were forced to call ancestors(*somelist), adding to
both inefficiency and ugliness.
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 01 Jun 2012 12:37:18 -0700 |
parents | 38caf405d010 |
children | 1093ad1e8903 |
line wrap: on
line diff
--- a/hgext/rebase.py Tue May 29 23:26:55 2012 +0200 +++ b/hgext/rebase.py Fri Jun 01 12:37:18 2012 -0700 @@ -224,7 +224,7 @@ else: originalwd, target, state = result if collapsef: - targetancestors = set(repo.changelog.ancestors(target)) + targetancestors = set(repo.changelog.ancestors([target])) targetancestors.add(target) external = checkexternal(repo, state, targetancestors) @@ -243,7 +243,7 @@ # Rebase if not targetancestors: - targetancestors = set(repo.changelog.ancestors(target)) + targetancestors = set(repo.changelog.ancestors([target])) targetancestors.add(target) # Keep track of the current bookmarks in order to reset them later