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

login
register
mail settings
Submitter Martin von Zweigbergk
Date April 11, 2015, 6:30 a.m.
Message ID <b3d7cc4e97b6e0b3a7f5.1428733843@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/8609/
State Accepted
Headers show

Comments

Martin von Zweigbergk - April 11, 2015, 6:30 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@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).

Patch

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