Show More
@@ -70,6 +70,9 b' def update(repo, node, branchmerge=False' | |||
|
70 | 70 | p1, p2 = pl[0], node |
|
71 | 71 | pa = repo.changelog.ancestor(p1, p2) |
|
72 | 72 | |
|
73 | # are we going backwards? | |
|
74 | backwards = (pa == p2) | |
|
75 | ||
|
73 | 76 | # is there a linear path from p1 to p2? |
|
74 | 77 | linear_path = (pa == p1 or pa == p2) |
|
75 | 78 | if branchmerge and linear_path: |
@@ -154,8 +157,8 b' def update(repo, node, branchmerge=False' | |||
|
154 | 157 | s = 1 |
|
155 | 158 | # are we clobbering? |
|
156 | 159 | # is remote's version newer? |
|
157 | # or are we going back in time? | |
|
158 |
elif overwrite or m2[f] != a or ( |
|
|
160 | # or are we going back in time and clean? | |
|
161 | elif overwrite or m2[f] != a or (backwards and mw[f] == m1[f]): | |
|
159 | 162 | repo.ui.debug(_(" remote %s is newer, get\n") % f) |
|
160 | 163 | get[f] = (m2.execf(f), m2[f]) |
|
161 | 164 | s = 1 |
@@ -192,7 +195,7 b' def update(repo, node, branchmerge=False' | |||
|
192 | 195 | repo.ui.debug(_("remote deleted %s, clobbering\n") % f) |
|
193 | 196 | remove.append(f) |
|
194 | 197 | elif n == m1.get(f, nullid): # same as parent |
|
195 |
if |
|
|
198 | if backwards: | |
|
196 | 199 | repo.ui.debug(_("remote deleted %s\n") % f) |
|
197 | 200 | remove.append(f) |
|
198 | 201 | else: |
@@ -217,7 +220,7 b' def update(repo, node, branchmerge=False' | |||
|
217 | 220 | repo.ui.debug(_("remote created %s\n") % f) |
|
218 | 221 | get[f] = (m2.execf(f), n) |
|
219 | 222 | else: |
|
220 |
if overwrite or |
|
|
223 | if overwrite or backwards: | |
|
221 | 224 | repo.ui.debug(_("local deleted %s, recreating\n") % f) |
|
222 | 225 | get[f] = (m2.execf(f), n) |
|
223 | 226 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now