[PATCH 1 of 2] manifestdict: drop empty-string argument when creating empty manifest

Martin von Zweigbergk martinvonz at google.com
Sat Apr 11 06:30:43 UTC 2015


# HG changeset patch
# User Martin von Zweigbergk <martinvonz at google.com>
# Date 1428714781 25200
#      Fri Apr 10 18:13:01 2015 -0700
# Node ID b3d7cc4e97b6e0b3a7f5b7c33db7be1b115e1927
# Parent  553dc2b094d9e1eb2f66ba8f1ec36ecb55cf9d64
manifestdict: drop empty-string argument when creating empty manifest

manifestdict() creates an empty manifestdict, so let's consistently
use that instead of explicitly parsing an empty string (which does
result in an empty manifest).

diff -r 553dc2b094d9 -r b3d7cc4e97b6 mercurial/manifest.py
--- a/mercurial/manifest.py	Fri Apr 10 15:41:33 2015 -0400
+++ b/mercurial/manifest.py	Fri Apr 10 18:13:01 2015 -0700
@@ -270,7 +270,7 @@
                     m._lm[fn] = lm[fn]
             return m
 
-        m = manifestdict('')
+        m = manifestdict()
         m._lm = self._lm.filtercopy(match)
         return m
 
@@ -307,7 +307,7 @@
             return default
 
     def copy(self):
-        c = manifestdict('')
+        c = manifestdict()
         c._lm = self._lm.copy()
         return c
 


More information about the Mercurial-devel mailing list