comparison mercurial/manifest.py @ 24700:32b268cbff00

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).
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 10 Apr 2015 18:13:01 -0700
parents b3d78d82d84c
children 03ee576784e6
comparison
equal deleted inserted replaced
24699:64cd23a1bc13 24700:32b268cbff00
268 for fn in match.files(): 268 for fn in match.files():
269 if fn in lm: 269 if fn in lm:
270 m._lm[fn] = lm[fn] 270 m._lm[fn] = lm[fn]
271 return m 271 return m
272 272
273 m = manifestdict('') 273 m = manifestdict()
274 m._lm = self._lm.filtercopy(match) 274 m._lm = self._lm.filtercopy(match)
275 return m 275 return m
276 276
277 def diff(self, m2, clean=False): 277 def diff(self, m2, clean=False):
278 '''Finds changes between the current manifest and m2. 278 '''Finds changes between the current manifest and m2.
305 return self._lm[key][1] 305 return self._lm[key][1]
306 except KeyError: 306 except KeyError:
307 return default 307 return default
308 308
309 def copy(self): 309 def copy(self):
310 c = manifestdict('') 310 c = manifestdict()
311 c._lm = self._lm.copy() 311 c._lm = self._lm.copy()
312 return c 312 return c
313 313
314 def iteritems(self): 314 def iteritems(self):
315 return (x[:2] for x in self._lm.iterentries()) 315 return (x[:2] for x in self._lm.iterentries())