##// END OF EJS Templates
manifest: make copy logic local to copy()...
Martin von Zweigbergk -
r24146:dd8c891d default
parent child Browse files
Show More
@@ -10,13 +10,8 b' import mdiff, parsers, error, revlog, ut'
10 10 import array, struct
11 11
12 12 class manifestdict(dict):
13 def __init__(self, mapping=None, flags=None):
14 if mapping is None:
15 mapping = {}
16 if flags is None:
17 flags = {}
18 dict.__init__(self, mapping)
19 self._flags = flags
13 def __init__(self):
14 self._flags = {}
20 15 def __setitem__(self, k, v):
21 16 assert v is not None
22 17 dict.__setitem__(self, k, v)
@@ -26,7 +21,10 b' class manifestdict(dict):'
26 21 """Set the flags (symlink, executable) for path f."""
27 22 self._flags[f] = flags
28 23 def copy(self):
29 return manifestdict(self, dict.copy(self._flags))
24 copy = manifestdict()
25 dict.__init__(copy, self)
26 copy._flags = dict.copy(self._flags)
27 return copy
30 28 def intersectfiles(self, files):
31 29 '''make a new manifestdict with the intersection of self with files
32 30
General Comments 0
You need to be logged in to leave comments. Login now