##// END OF EJS Templates
[PATCH] Merging files that are deleted in both branches...
mpm@selenic.com -
r408:3695fbd2 default
parent child Browse files
Show More
@@ -1011,6 +1011,10 b' class localrepository:'
1011
1011
1012 (c, a, d, u) = self.diffdir(self.root)
1012 (c, a, d, u) = self.diffdir(self.root)
1013
1013
1014 # is this a jump, or a merge? i.e. is there a linear path
1015 # from p1 to p2?
1016 linear_path = (pa == p1 or pa == p2)
1017
1014 # resolve the manifest to determine which files
1018 # resolve the manifest to determine which files
1015 # we care about merging
1019 # we care about merging
1016 self.ui.note("resolving manifests\n")
1020 self.ui.note("resolving manifests\n")
@@ -1031,6 +1035,14 b' class localrepository:'
1031 for f in d:
1035 for f in d:
1032 if f in mw: del mw[f]
1036 if f in mw: del mw[f]
1033
1037
1038 # If we're jumping between revisions (as opposed to merging),
1039 # and if neither the working directory nor the target rev has
1040 # the file, then we need to remove it from the dirstate, to
1041 # prevent the dirstate from listing the file when it is no
1042 # longer in the manifest.
1043 if linear_path and f not in m2:
1044 self.dirstate.forget((f,))
1045
1034 for f, n in mw.iteritems():
1046 for f, n in mw.iteritems():
1035 if f in m2:
1047 if f in m2:
1036 s = 0
1048 s = 0
@@ -1117,7 +1129,7 b' class localrepository:'
1117 get[f] = merge[f][1]
1129 get[f] = merge[f][1]
1118 merge = {}
1130 merge = {}
1119
1131
1120 if pa == p1 or pa == p2:
1132 if linear_path:
1121 # we don't need to do any magic, just jump to the new rev
1133 # we don't need to do any magic, just jump to the new rev
1122 mode = 'n'
1134 mode = 'n'
1123 p1, p2 = p2, nullid
1135 p1, p2 = p2, nullid
General Comments 0
You need to be logged in to leave comments. Login now