[PATCH 4 of 6 V2] rebase: remove "if True"
Jun Wu
quark at fb.com
Fri Jul 7 22:11:27 EDT 2017
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1499479383 25200
# Fri Jul 07 19:03:03 2017 -0700
# Node ID 46beedf52f30bb4ff4a9077c5b1868b45cddcbe6
# Parent 4058f9bd7f385f065a9e91f6443bd2c30f9e8424
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 46beedf52f30
rebase: remove "if True"
The "if True" block was to make the last patch easier to review. This patch
removes "if True" and unindents the block.
diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1295,15 +1295,14 @@ def clearrebased(ui, repo, state, skippe
tonode = repo.changelog.node
mapping = {}
- if True:
- for rev, newrev in sorted(state.items()):
- if newrev >= 0 and newrev != rev:
- if rev in skipped:
- succs = ()
- elif collapsedas is not None:
- succs = (collapsedas,)
- else:
- succs = (tonode(newrev),)
- mapping[tonode(rev)] = succs
- scmutil.cleanupnodes(repo, mapping, 'rebase')
+ for rev, newrev in sorted(state.items()):
+ if newrev >= 0 and newrev != rev:
+ if rev in skipped:
+ succs = ()
+ elif collapsedas is not None:
+ succs = (collapsedas,)
+ else:
+ succs = (tonode(newrev),)
+ mapping[tonode(rev)] = succs
+ scmutil.cleanupnodes(repo, mapping, 'rebase')
def pullrebase(orig, ui, repo, *args, **opts):
More information about the Mercurial-devel
mailing list