Show More
@@ -1135,7 +1135,10 b' class treemanifest(object):' | |||||
1135 | return m1.diff(m2, clean=clean) |
|
1135 | return m1.diff(m2, clean=clean) | |
1136 | result = {} |
|
1136 | result = {} | |
1137 | emptytree = treemanifest() |
|
1137 | emptytree = treemanifest() | |
1138 | def _diff(t1, t2): |
|
1138 | ||
|
1139 | def _iterativediff(t1, t2, stack): | |||
|
1140 | """compares two tree manifests and append new tree-manifests which | |||
|
1141 | needs to be compared to stack""" | |||
1139 | if t1._node == t2._node and not t1._dirty and not t2._dirty: |
|
1142 | if t1._node == t2._node and not t1._dirty and not t2._dirty: | |
1140 | return |
|
1143 | return | |
1141 | t1._load() |
|
1144 | t1._load() | |
@@ -1144,11 +1147,11 b' class treemanifest(object):' | |||||
1144 |
|
1147 | |||
1145 | for d, m1 in t1._dirs.iteritems(): |
|
1148 | for d, m1 in t1._dirs.iteritems(): | |
1146 | m2 = t2._dirs.get(d, emptytree) |
|
1149 | m2 = t2._dirs.get(d, emptytree) | |
1147 |
|
|
1150 | stack.append((m1, m2)) | |
1148 |
|
1151 | |||
1149 | for d, m2 in t2._dirs.iteritems(): |
|
1152 | for d, m2 in t2._dirs.iteritems(): | |
1150 | if d not in t1._dirs: |
|
1153 | if d not in t1._dirs: | |
1151 |
|
|
1154 | stack.append((emptytree, m2)) | |
1152 |
|
1155 | |||
1153 | for fn, n1 in t1._files.iteritems(): |
|
1156 | for fn, n1 in t1._files.iteritems(): | |
1154 | fl1 = t1._flags.get(fn, '') |
|
1157 | fl1 = t1._flags.get(fn, '') | |
@@ -1164,7 +1167,12 b' class treemanifest(object):' | |||||
1164 | fl2 = t2._flags.get(fn, '') |
|
1167 | fl2 = t2._flags.get(fn, '') | |
1165 | result[t2._subpath(fn)] = ((None, ''), (n2, fl2)) |
|
1168 | result[t2._subpath(fn)] = ((None, ''), (n2, fl2)) | |
1166 |
|
1169 | |||
1167 | _diff(self, m2) |
|
1170 | stackls = [] | |
|
1171 | _iterativediff(self, m2, stackls) | |||
|
1172 | while stackls: | |||
|
1173 | t1, t2 = stackls.pop() | |||
|
1174 | # stackls is populated in the function call | |||
|
1175 | _iterativediff(t1, t2, stackls) | |||
1168 | return result |
|
1176 | return result | |
1169 |
|
1177 | |||
1170 | def unmodifiedsince(self, m2): |
|
1178 | def unmodifiedsince(self, m2): |
General Comments 0
You need to be logged in to leave comments.
Login now