Show More
@@ -965,13 +965,24 b' class localrepository(repo.repository):' | |||||
965 | del mf[fn] |
|
965 | del mf[fn] | |
966 | return mf |
|
966 | return mf | |
967 |
|
967 | |||
968 | ctx1 = self[node1] |
|
968 | if isinstance(node1, context.changectx): | |
969 |
|
|
969 | ctx1 = node1 | |
|
970 | else: | |||
|
971 | ctx1 = self[node1] | |||
|
972 | if isinstance(node2, context.changectx): | |||
|
973 | ctx2 = node2 | |||
|
974 | else: | |||
|
975 | ctx2 = self[node2] | |||
|
976 | ||||
970 | working = ctx2 == self[None] |
|
977 | working = ctx2 == self[None] | |
971 | parentworking = working and ctx1 == self['.'] |
|
978 | parentworking = working and ctx1 == self['.'] | |
972 | match = match or match_.always(self.root, self.getcwd()) |
|
979 | match = match or match_.always(self.root, self.getcwd()) | |
973 | listignored, listclean, listunknown = ignored, clean, unknown |
|
980 | listignored, listclean, listunknown = ignored, clean, unknown | |
974 |
|
981 | |||
|
982 | # load earliest manifest first for caching reasons | |||
|
983 | if not working and ctx2.rev() < ctx1.rev(): | |||
|
984 | ctx2.manifest() | |||
|
985 | ||||
975 | if not parentworking: |
|
986 | if not parentworking: | |
976 | def bad(f, msg): |
|
987 | def bad(f, msg): | |
977 | if f not in ctx1: |
|
988 | if f not in ctx1: |
@@ -1174,21 +1174,18 b' def diff(repo, node1=None, node2=None, m' | |||||
1174 | flcache[f] = flctx._filelog |
|
1174 | flcache[f] = flctx._filelog | |
1175 | return flctx |
|
1175 | return flctx | |
1176 |
|
1176 | |||
1177 | # reading the data for node1 early allows it to play nicely |
|
|||
1178 | # with repo.status and the revlog cache. |
|
|||
1179 | ctx1 = repo[node1] |
|
1177 | ctx1 = repo[node1] | |
1180 | # force manifest reading |
|
1178 | ctx2 = repo[node2] | |
1181 | man1 = ctx1.manifest() |
|
|||
1182 | date1 = util.datestr(ctx1.date()) |
|
|||
1183 |
|
1179 | |||
1184 | if not changes: |
|
1180 | if not changes: | |
1185 |
changes = repo.status( |
|
1181 | changes = repo.status(ctx1, ctx2, match=match) | |
1186 | modified, added, removed = changes[:3] |
|
1182 | modified, added, removed = changes[:3] | |
1187 |
|
1183 | |||
1188 | if not modified and not added and not removed: |
|
1184 | if not modified and not added and not removed: | |
1189 | return |
|
1185 | return | |
1190 |
|
1186 | |||
1191 | ctx2 = repo[node2] |
|
1187 | date1 = util.datestr(ctx1.date()) | |
|
1188 | man1 = ctx1.manifest() | |||
1192 |
|
1189 | |||
1193 | if repo.ui.quiet: |
|
1190 | if repo.ui.quiet: | |
1194 | r = None |
|
1191 | r = None |
General Comments 0
You need to be logged in to leave comments.
Login now