obslog: use plural name "effects" for list of all effects
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 07 Nov 2019 15:00:57 -0800
changeset 4939 7aba58dc4b73
parent 4938 d8033f75a52e
child 4940 93c89814a5d8
obslog: use plural name "effects" for list of all effects Same reasoning as the previous patch, but here the singular was used for the list instead. This patch also renames the variable that represents the list of effects to plural "effects" to reduce confusion.
hgext3rd/evolve/obshistory.py
tests/test-evolve-cycles.t
tests/test-evolve-obshistory-amend-then-fold.t
tests/test-evolve-obshistory-amend.t
tests/test-evolve-obshistory-content-divergent.t
tests/test-evolve-obshistory-fold.t
tests/test-evolve-obshistory-lots-of-splits.t
tests/test-evolve-obshistory-phase-divergent.t
tests/test-evolve-obshistory-split.t
--- a/hgext3rd/evolve/obshistory.py	Thu Nov 07 13:21:20 2019 -0800
+++ b/hgext3rd/evolve/obshistory.py	Thu Nov 07 15:00:57 2019 -0800
@@ -521,27 +521,27 @@
         except ValueError:
             effectflag = None
     if effectflag:
-        effect = []
+        effects = []
 
         # XXX should be a dict
         if effectflag & DESCCHANGED:
-            effect.append(b'description')
+            effects.append(b'description')
         if effectflag & METACHANGED:
-            effect.append(b'meta')
+            effects.append(b'meta')
         if effectflag & USERCHANGED:
-            effect.append(b'user')
+            effects.append(b'user')
         if effectflag & DATECHANGED:
-            effect.append(b'date')
+            effects.append(b'date')
         if effectflag & BRANCHCHANGED:
-            effect.append(b'branch')
+            effects.append(b'branch')
         if effectflag & PARENTCHANGED:
-            effect.append(b'parent')
+            effects.append(b'parent')
         if effectflag & DIFFCHANGED:
-            effect.append(b'content')
+            effects.append(b'content')
 
-        if effect:
-            fmteffect = fm.formatlist(effect, b'effect', sep=b', ')
-            fm.write(b'effect', b'(%s)', fmteffect)
+        if effects:
+            fmteffect = fm.formatlist(effects, b'effect', sep=b', ')
+            fm.write(b'effects', b'(%s)', fmteffect)
 
     if len(succnodes) > 0:
         fm.plain(b' as ')
@@ -649,27 +649,27 @@
             effectflag |= int(ef)
 
     if effectflag:
-        effect = []
+        effects = []
 
         # XXX should be a dict
         if effectflag & DESCCHANGED:
-            effect.append(b'description')
+            effects.append(b'description')
         if effectflag & METACHANGED:
-            effect.append(b'meta')
+            effects.append(b'meta')
         if effectflag & USERCHANGED:
-            effect.append(b'user')
+            effects.append(b'user')
         if effectflag & DATECHANGED:
-            effect.append(b'date')
+            effects.append(b'date')
         if effectflag & BRANCHCHANGED:
-            effect.append(b'branch')
+            effects.append(b'branch')
         if effectflag & PARENTCHANGED:
-            effect.append(b'parent')
+            effects.append(b'parent')
         if effectflag & DIFFCHANGED:
-            effect.append(b'content')
+            effects.append(b'content')
 
-        if effect:
-            fmteffect = fm.formatlist(effect, b'effect', sep=b', ')
-            fm.write(b'effect', b'(%s)', fmteffect)
+        if effects:
+            fmteffect = fm.formatlist(effects, b'effect', sep=b', ')
+            fm.write(b'effects', b'(%s)', fmteffect)
 
     if len(succnodes) > 0:
         fm.plain(b' as ')
--- a/tests/test-evolve-cycles.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-cycles.t	Thu Nov 07 15:00:57 2019 -0800
@@ -300,7 +300,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
@@ -323,7 +323,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
@@ -346,7 +346,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
@@ -369,7 +369,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
@@ -393,7 +393,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
@@ -416,7 +416,7 @@
                       *, (glob)
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
--- a/tests/test-evolve-obshistory-amend-then-fold.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-amend-then-fold.t	Thu Nov 07 15:00:57 2019 -0800
@@ -162,7 +162,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       *, (glob)
                       *, (glob)
                       "content"
@@ -185,7 +185,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
@@ -206,7 +206,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "content"
                   ],
--- a/tests/test-evolve-obshistory-amend.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-amend.t	Thu Nov 07 15:00:57 2019 -0800
@@ -137,7 +137,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "content"
                   ],
@@ -182,7 +182,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       *, (glob)
                       "content"
                   ],
--- a/tests/test-evolve-obshistory-content-divergent.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-content-divergent.t	Thu Nov 07 15:00:57 2019 -0800
@@ -129,7 +129,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
@@ -144,7 +144,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
@@ -293,7 +293,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
@@ -308,7 +308,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
--- a/tests/test-evolve-obshistory-fold.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-fold.t	Thu Nov 07 15:00:57 2019 -0800
@@ -182,7 +182,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "content"
                   ],
@@ -204,7 +204,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description",
                       "parent",
                       "content"
--- a/tests/test-evolve-obshistory-lots-of-splits.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-lots-of-splits.t	Thu Nov 07 15:00:57 2019 -0800
@@ -201,7 +201,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "parent",
                       "content"
                   ],
@@ -241,7 +241,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "parent",
                       "content"
                   ],
--- a/tests/test-evolve-obshistory-phase-divergent.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-phase-divergent.t	Thu Nov 07 15:00:57 2019 -0800
@@ -102,7 +102,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
@@ -205,7 +205,7 @@
                       0,
                       0
                   ],
-                  "effect": [
+                  "effects": [
                       "description"
                   ],
                   "operation": "amend",
--- a/tests/test-evolve-obshistory-split.t	Thu Nov 07 13:21:20 2019 -0800
+++ b/tests/test-evolve-obshistory-split.t	Thu Nov 07 15:00:57 2019 -0800
@@ -119,7 +119,7 @@
                       *, (glob)
                       0 (glob)
                   ],
-                  "effect": [
+                  "effects": [
                       "parent",
                       "content"
                   ],