Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/merge.py @ 18823:b2a36e9b9ccc
manifestmerge: drop redundant flags calls
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sun, 24 Mar 2013 16:56:25 -0700 |
parents | 381c0ef72a56 |
children | f63035b9b38a |
comparison
equal
deleted
inserted
replaced
18822:381c0ef72a56 | 18823:b2a36e9b9ccc |
---|---|
273 actions.append((f, "m", (f, f, False), "versions differ")) | 273 actions.append((f, "m", (f, f, False), "versions differ")) |
274 elif f in copied: # files we'll deal with on m2 side | 274 elif f in copied: # files we'll deal with on m2 side |
275 pass | 275 pass |
276 elif n1 and f in movewithdir: # directory rename | 276 elif n1 and f in movewithdir: # directory rename |
277 f2 = movewithdir[f] | 277 f2 = movewithdir[f] |
278 actions.append((f, "d", (None, f2, m1.flags(f)), | 278 actions.append((f, "d", (None, f2, fl1), |
279 "remote renamed directory to " + f2)) | 279 "remote renamed directory to " + f2)) |
280 elif n1 and f in copy: | 280 elif n1 and f in copy: |
281 f2 = copy[f] | 281 f2 = copy[f] |
282 actions.append((f, "m", (f2, f, False), | 282 actions.append((f, "m", (f2, f, False), |
283 "local copied/moved to " + f2)) | 283 "local copied/moved to " + f2)) |
288 actions.append((f, "f", None, "remote deleted")) | 288 actions.append((f, "f", None, "remote deleted")) |
289 else: | 289 else: |
290 actions.append((f, "r", None, "other deleted")) | 290 actions.append((f, "r", None, "other deleted")) |
291 elif n2 and f in movewithdir: | 291 elif n2 and f in movewithdir: |
292 f2 = movewithdir[f] | 292 f2 = movewithdir[f] |
293 actions.append((None, "d", (f, f2, m2.flags(f)), | 293 actions.append((None, "d", (f, f2, fl2), |
294 "local renamed directory to " + f2)) | 294 "local renamed directory to " + f2)) |
295 elif n2 and f in copy: | 295 elif n2 and f in copy: |
296 f2 = copy[f] | 296 f2 = copy[f] |
297 if f2 in m2: | 297 if f2 in m2: |
298 actions.append((f2, "m", (f, f, False), | 298 actions.append((f2, "m", (f, f, False), |
312 # y y y | merge | 312 # y y y | merge |
313 # | 313 # |
314 # Checking whether the files are different is expensive, so we | 314 # Checking whether the files are different is expensive, so we |
315 # don't do that when we can avoid it. | 315 # don't do that when we can avoid it. |
316 if force and not branchmerge: | 316 if force and not branchmerge: |
317 actions.append((f, "g", (m2.flags(f),), "remote created")) | 317 actions.append((f, "g", (fl2,), "remote created")) |
318 else: | 318 else: |
319 different = _checkunknownfile(repo, wctx, p2, f) | 319 different = _checkunknownfile(repo, wctx, p2, f) |
320 if force and branchmerge and different: | 320 if force and branchmerge and different: |
321 actions.append((f, "m", (f, f, False), | 321 actions.append((f, "m", (f, f, False), |
322 "remote differs from untracked local")) | 322 "remote differs from untracked local")) |
323 elif not force and different: | 323 elif not force and different: |
324 aborts.append((f, "ud")) | 324 aborts.append((f, "ud")) |
325 else: | 325 else: |
326 actions.append((f, "g", (m2.flags(f),), "remote created")) | 326 actions.append((f, "g", (fl2,), "remote created")) |
327 elif n2 and n2 != ma[f]: | 327 elif n2 and n2 != ma[f]: |
328 prompts.append((f, "dc")) # prompt deleted/changed | 328 prompts.append((f, "dc")) # prompt deleted/changed |
329 | 329 |
330 for f, m in sorted(aborts): | 330 for f, m in sorted(aborts): |
331 if m == "ud": | 331 if m == "ud": |