Mercurial > public > mercurial-scm > hg-stable
diff hgext/rebase.py @ 27167:3fe8cb40c9c5
commands: inline definition of localrepo.parents() and drop the method (API)
localrepo.parents() has relatively few users, and most of those were
actually implicitly looking at the wctx, which is now made explicit
via repo[None].
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 11 Nov 2015 20:07:15 -0500 |
parents | 88fde8db5307 |
children | 40a2f972f26d |
line wrap: on
line diff
--- a/hgext/rebase.py Wed Nov 11 20:02:05 2015 -0500 +++ b/hgext/rebase.py Wed Nov 11 20:07:15 2015 -0500 @@ -441,7 +441,7 @@ targetancestors) storestatus(repo, originalwd, target, state, collapsef, keepf, keepbranchesf, external, activebookmark) - if len(repo.parents()) == 2: + if len(repo[None].parents()) == 2: repo.ui.debug('resuming interrupted rebase\n') else: try: @@ -930,7 +930,7 @@ def needupdate(repo, state): '''check whether we should `update --clean` away from a merge, or if somehow the working dir got forcibly updated, e.g. by older hg''' - parents = [p.rev() for p in repo.parents()] + parents = [p.rev() for p in repo[None].parents()] # Are we in a merge state at all? if len(parents) < 2: