Mercurial > public > mercurial-scm > hg-stable
diff mercurial/manifest.py @ 2857:18cf5349a361
Fix some bugs introduced during the manifest refactoring
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 12 Aug 2006 08:53:23 -0300 |
parents | e3fb4223e750 |
children | 345bac2bc4ec |
line wrap: on
line diff
--- a/mercurial/manifest.py Sat Aug 12 09:24:04 2006 -0300 +++ b/mercurial/manifest.py Sat Aug 12 08:53:23 2006 -0300 @@ -11,7 +11,9 @@ demandload(globals(), "array bisect struct") class manifestdict(dict): - def __init__(self, mapping={}, flags={}): + def __init__(self, mapping=None, flags=None): + if mapping is None: mapping = {} + if flags is None: flags = {} dict.__init__(self, mapping) self._flags = flags def flags(self, f): @@ -27,8 +29,9 @@ fl = entry[40:-1] if fl: self._flags[f] = fl def set(self, f, execf=False, linkf=False): - if execf: self._flags[f] = "x" - if linkf: self._flags[f] = "x" + if linkf: self._flags[f] = "l" + elif execf: self._flags[f] = "x" + else: self._flags[f] = "" def copy(self): return manifestdict(dict.copy(self), dict.copy(self._flags))