mercurial/changelog.py
changeset 42300 278dcb24e535
parent 42142 5382d8f8530b
child 42301 2a7109cc5a28
--- a/mercurial/changelog.py	Mon May 13 14:19:36 2019 -0400
+++ b/mercurial/changelog.py	Tue Apr 23 13:29:13 2019 -0700
@@ -591,11 +591,11 @@
             elif branch in (".", "null", "tip"):
                 raise error.StorageError(_('the name \'%s\' is reserved')
                                          % branch)
-        if (p1copies or p2copies) and extra is None:
+        if (p1copies is not None or p2copies is not None) and extra is None:
             extra = {}
-        if p1copies:
+        if p1copies is not None:
             extra['p1copies'] = encodecopies(p1copies)
-        if p2copies:
+        if p2copies is not None:
             extra['p2copies'] = encodecopies(p2copies)
 
         if extra: