changeset 32870:b441296f8e9c

changegroup: rename "dh" to the clearer "deltaheads" We have a lot of frequently used abbreviations, but this is not one of them.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Jun 2017 13:47:54 -0700
parents 5281129eb92c
children 6fa245f80b6f
files mercurial/changegroup.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Thu Jun 15 13:42:41 2017 -0700
+++ b/mercurial/changegroup.py	Thu Jun 15 13:47:54 2017 -0700
@@ -349,16 +349,16 @@
                 revisions += newrevs
                 files += newfiles
 
-                dh = 0
+                deltaheads = 0
                 if oldheads:
                     heads = cl.heads()
-                    dh = len(heads) - len(oldheads)
+                    deltaheads = len(heads) - len(oldheads)
                     for h in heads:
                         if h not in oldheads and repo[h].closesbranch():
-                            dh -= 1
+                            deltaheads -= 1
                 htext = ""
-                if dh:
-                    htext = _(" (%+d heads)") % dh
+                if deltaheads:
+                    htext = _(" (%+d heads)") % deltaheads
 
                 repo.ui.status(_("added %d changesets"
                                  " with %d changes to %d files%s\n")
@@ -429,10 +429,10 @@
         finally:
             repo.ui.flush()
         # never return 0 here:
-        if dh < 0:
-            return dh - 1
+        if deltaheads < 0:
+            return deltaheads - 1
         else:
-            return dh + 1
+            return deltaheads + 1
 
 class cg2unpacker(cg1unpacker):
     """Unpacker for cg2 streams.