##// END OF EJS Templates
manifest: transpose pair of pairs from diff()...
Martin von Zweigbergk -
r22966:ff93aa00 default
parent child Browse files
Show More
@@ -42,7 +42,7 b' class manifestdict(dict):'
42 def diff(self, m2):
42 def diff(self, m2):
43 '''Finds changes between the current manifest and m2. The result is
43 '''Finds changes between the current manifest and m2. The result is
44 returned as a dict with filename as key and values of the form
44 returned as a dict with filename as key and values of the form
45 ((n1,n2),(fl1,fl2)), where n1/n2 is the nodeid in the current/other
45 ((n1,fl1),(n2,fl2)), where n1/n2 is the nodeid in the current/other
46 manifest and fl1/fl2 is the flag in the current/other manifest. Where
46 manifest and fl1/fl2 is the flag in the current/other manifest. Where
47 the file does not exist, the nodeid will be None and the flags will be
47 the file does not exist, the nodeid will be None and the flags will be
48 the empty string.'''
48 the empty string.'''
@@ -55,12 +55,12 b' class manifestdict(dict):'
55 if n2 is None:
55 if n2 is None:
56 fl2 = ''
56 fl2 = ''
57 if n1 != n2 or fl1 != fl2:
57 if n1 != n2 or fl1 != fl2:
58 diff[fn] = ((n1, n2), (fl1, fl2))
58 diff[fn] = ((n1, fl1), (n2, fl2))
59
59
60 for fn, n2 in m2.iteritems():
60 for fn, n2 in m2.iteritems():
61 if fn not in self:
61 if fn not in self:
62 fl2 = m2._flags.get(fn, '')
62 fl2 = m2._flags.get(fn, '')
63 diff[fn] = ((None, n2), ('', fl2))
63 diff[fn] = ((None, ''), (n2, fl2))
64
64
65 return diff
65 return diff
66
66
@@ -424,7 +424,7 b' def manifestmerge(repo, wctx, p2, pa, br'
424 # Compare manifests
424 # Compare manifests
425 diff = m1.diff(m2)
425 diff = m1.diff(m2)
426
426
427 for f, ((n1, n2), (fl1, fl2)) in diff.iteritems():
427 for f, ((n1, fl1), (n2, fl2)) in diff.iteritems():
428 if partial and not partial(f):
428 if partial and not partial(f):
429 continue
429 continue
430 if n1 and n2:
430 if n1 and n2:
General Comments 0
You need to be logged in to leave comments. Login now