changeset 22906:75d0edb68b41

rebase: fix some weird mixed-case naming
author Matt Mackall <mpm@selenic.com>
date Mon, 13 Oct 2014 18:00:39 -0500
parents 63e889cc610d
children a337f4b9b99d
files hgext/rebase.py
diffstat 1 files changed, 19 insertions(+), 19 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Mon Oct 13 17:55:45 2014 -0500
+++ b/hgext/rebase.py	Mon Oct 13 18:00:39 2014 -0500
@@ -611,40 +611,40 @@
     parents = repo[rev].parents()
     p1 = p2 = nullrev
 
-    P1n = parents[0].rev()
-    if P1n in targetancestors:
+    p1n = parents[0].rev()
+    if p1n in targetancestors:
         p1 = target
-    elif P1n in state:
-        if state[P1n] == nullmerge:
+    elif p1n in state:
+        if state[p1n] == nullmerge:
             p1 = target
-        elif state[P1n] == revignored:
-            p1 = nearestrebased(repo, P1n, state)
+        elif state[p1n] == revignored:
+            p1 = nearestrebased(repo, p1n, state)
             if p1 is None:
                 p1 = target
         else:
-            p1 = state[P1n]
-    else: # P1n external
+            p1 = state[p1n]
+    else: # p1n external
         p1 = target
-        p2 = P1n
+        p2 = p1n
 
     if len(parents) == 2 and parents[1].rev() not in targetancestors:
-        P2n = parents[1].rev()
+        p2n = parents[1].rev()
         # interesting second parent
-        if P2n in state:
-            if p1 == target: # P1n in targetancestors or external
-                p1 = state[P2n]
-            elif state[P2n] == revignored:
-                p2 = nearestrebased(repo, P2n, state)
+        if p2n in state:
+            if p1 == target: # p1n in targetancestors or external
+                p1 = state[p2n]
+            elif state[p2n] == revignored:
+                p2 = nearestrebased(repo, p2n, state)
                 if p2 is None:
                     # no ancestors rebased yet, detach
                     p2 = target
             else:
-                p2 = state[P2n]
-        else: # P2n external
-            if p2 != nullrev: # P1n external too => rev is a merged revision
+                p2 = state[p2n]
+        else: # p2n external
+            if p2 != nullrev: # p1n external too => rev is a merged revision
                 raise util.Abort(_('cannot use revision %d as base, result '
                         'would have 3 parents') % rev)
-            p2 = P2n
+            p2 = p2n
     repo.ui.debug(" future parents are %d and %d\n" %
                             (repo[p1].rev(), repo[p2].rev()))
     return p1, p2