changeset 2942:10194206acc7

uncommit: pre-indent a block in if-True The block will be moved in if-else in next patch.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 05 Sep 2017 14:35:00 +0530
parents b0458b9e1b47
children 25576132cb30
files hgext3rd/evolve/cmdrewrite.py
diffstat 1 files changed, 19 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/cmdrewrite.py	Thu Sep 14 17:23:24 2017 +0530
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Sep 05 14:35:00 2017 +0530
@@ -197,26 +197,27 @@
     ctx = repo['.']
     ds = repo.dirstate
     copies = dict(ds.copies())
-    m, a, r = repo.status(oldctx.p1(), oldctx, match=match)[:3]
-    for f in m:
-        if ds[f] == 'r':
-            # modified + removed -> removed
-            continue
-        ds.normallookup(f)
+    if True:
+        m, a, r = repo.status(oldctx.p1(), oldctx, match=match)[:3]
+        for f in m:
+            if ds[f] == 'r':
+                # modified + removed -> removed
+                continue
+            ds.normallookup(f)
 
-    for f in a:
-        if ds[f] == 'r':
-            # added + removed -> unknown
-            ds.drop(f)
-        elif ds[f] != 'a':
-            ds.add(f)
+        for f in a:
+            if ds[f] == 'r':
+                # added + removed -> unknown
+                ds.drop(f)
+            elif ds[f] != 'a':
+                ds.add(f)
 
-    for f in r:
-        if ds[f] == 'a':
-            # removed + added -> normal
-            ds.normallookup(f)
-        elif ds[f] != 'r':
-            ds.remove(f)
+        for f in r:
+            if ds[f] == 'a':
+                # removed + added -> normal
+                ds.normallookup(f)
+            elif ds[f] != 'r':
+                ds.remove(f)
 
     # Merge old parent and old working dir copies
     oldcopies = {}