trydiff: rename 'op' to make it more specific
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 16 Jan 2015 15:09:21 -0800
changeset 24055 7f4e6b5fce03
parent 24054 fdf7794be41d
child 24056 ae453d166d51
trydiff: rename 'op' to make it more specific Rename the 'op' variable that can take values None/'copy'/'rename' to 'copyop' to make it a little more specific.
mercurial/patch.py
--- a/mercurial/patch.py	Fri Feb 06 15:52:55 2015 +0800
+++ b/mercurial/patch.py	Fri Jan 16 15:09:21 2015 -0800
@@ -1777,7 +1777,7 @@
         content1 = None
         content2 = None
         binarydiff = False
-        op = None
+        copyop = None
         if f not in addedset:
             content1 = getfilectx(f, ctx1).data()
         if f not in removedset:
@@ -1791,10 +1791,10 @@
                         f1 = copy[f]
                         flag1 = ctx1.flags(f1)
                         if f1 in removedset and f1 not in gone:
-                            op = 'rename'
+                            copyop = 'rename'
                             gone.add(f1)
                         else:
-                            op = 'copy'
+                            copyop = 'copy'
                         content1 = getfilectx(f1, ctx1).data()
                     else:
                         losedatafn(f)
@@ -1847,9 +1847,9 @@
                 if mode1 != mode2:
                     header.append('old mode %s' % mode1)
                     header.append('new mode %s' % mode2)
-                if op is not None:
-                    header.append('%s from %s' % (op, path1))
-                    header.append('%s to %s' % (op, path2))
+                if copyop is not None:
+                    header.append('%s from %s' % (copyop, path1))
+                    header.append('%s to %s' % (copyop, path2))
         elif revs and not repo.ui.quiet:
             header.append(diffline(path1, revs))