Show More
@@ -368,7 +368,7 b' def overridemanifestmerge(origfn, repo, ' | |||||
368 | if overwrite: |
|
368 | if overwrite: | |
369 | processed.append(action) |
|
369 | processed.append(action) | |
370 | continue |
|
370 | continue | |
371 |
f, m = action |
|
371 | f, m, args = action | |
372 |
|
372 | |||
373 | choices = (_('&Largefile'), _('&Normal file')) |
|
373 | choices = (_('&Largefile'), _('&Normal file')) | |
374 | if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: |
|
374 | if m == "g" and lfutil.splitstandin(f) in p1 and f in p2: | |
@@ -379,10 +379,10 b' def overridemanifestmerge(origfn, repo, ' | |||||
379 | msg = _('%s has been turned into a largefile\n' |
|
379 | msg = _('%s has been turned into a largefile\n' | |
380 | 'use (l)argefile or keep as (n)ormal file?') % lfile |
|
380 | 'use (l)argefile or keep as (n)ormal file?') % lfile | |
381 | if repo.ui.promptchoice(msg, choices, 0) == 0: |
|
381 | if repo.ui.promptchoice(msg, choices, 0) == 0: | |
382 | processed.append((lfile, "r")) |
|
382 | processed.append((lfile, "r", None)) | |
383 | processed.append((standin, "g", p2.flags(standin))) |
|
383 | processed.append((standin, "g", (p2.flags(standin),))) | |
384 | else: |
|
384 | else: | |
385 | processed.append((standin, "r")) |
|
385 | processed.append((standin, "r", None)) | |
386 | elif m == "g" and lfutil.standin(f) in p1 and f in p2: |
|
386 | elif m == "g" and lfutil.standin(f) in p1 and f in p2: | |
387 | # Case 2: largefile in the working copy, normal file in |
|
387 | # Case 2: largefile in the working copy, normal file in | |
388 | # the second parent |
|
388 | # the second parent | |
@@ -391,10 +391,10 b' def overridemanifestmerge(origfn, repo, ' | |||||
391 | msg = _('%s has been turned into a normal file\n' |
|
391 | msg = _('%s has been turned into a normal file\n' | |
392 | 'keep as (l)argefile or use (n)ormal file?') % lfile |
|
392 | 'keep as (l)argefile or use (n)ormal file?') % lfile | |
393 | if repo.ui.promptchoice(msg, choices, 0) == 0: |
|
393 | if repo.ui.promptchoice(msg, choices, 0) == 0: | |
394 | processed.append((lfile, "r")) |
|
394 | processed.append((lfile, "r", None)) | |
395 | else: |
|
395 | else: | |
396 | processed.append((standin, "r")) |
|
396 | processed.append((standin, "r", None)) | |
397 | processed.append((lfile, "g", p2.flags(lfile))) |
|
397 | processed.append((lfile, "g", (p2.flags(lfile),))) | |
398 | else: |
|
398 | else: | |
399 | processed.append(action) |
|
399 | processed.append(action) | |
400 |
|
400 |
@@ -176,12 +176,12 b' def _forgetremoved(wctx, mctx, branchmer' | |||||
176 | state = branchmerge and 'r' or 'f' |
|
176 | state = branchmerge and 'r' or 'f' | |
177 | for f in wctx.deleted(): |
|
177 | for f in wctx.deleted(): | |
178 | if f not in mctx: |
|
178 | if f not in mctx: | |
179 | actions.append((f, state)) |
|
179 | actions.append((f, state, None)) | |
180 |
|
180 | |||
181 | if not branchmerge: |
|
181 | if not branchmerge: | |
182 | for f in wctx.removed(): |
|
182 | for f in wctx.removed(): | |
183 | if f not in mctx: |
|
183 | if f not in mctx: | |
184 | actions.append((f, "f")) |
|
184 | actions.append((f, "f", None)) | |
185 |
|
185 | |||
186 | return actions |
|
186 | return actions | |
187 |
|
187 | |||
@@ -195,7 +195,7 b' def manifestmerge(repo, p1, p2, pa, over' | |||||
195 |
|
195 | |||
196 | def act(msg, m, f, *args): |
|
196 | def act(msg, m, f, *args): | |
197 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) |
|
197 | repo.ui.debug(" %s: %s -> %s\n" % (f, msg, m)) | |
198 |
actions.append((f, m |
|
198 | actions.append((f, m, args)) | |
199 |
|
199 | |||
200 | actions, copy, movewithdir = [], {}, {} |
|
200 | actions, copy, movewithdir = [], {}, {} | |
201 |
|
201 | |||
@@ -342,9 +342,9 b' def applyupdates(repo, actions, wctx, mc' | |||||
342 |
|
342 | |||
343 | # prescan for merges |
|
343 | # prescan for merges | |
344 | for a in actions: |
|
344 | for a in actions: | |
345 |
f, m = a |
|
345 | f, m, args = a | |
346 | if m == "m": # merge |
|
346 | if m == "m": # merge | |
347 |
f2, fd, move = a |
|
347 | f2, fd, move = args | |
348 | if fd == '.hgsubstate': # merged internally |
|
348 | if fd == '.hgsubstate': # merged internally | |
349 | continue |
|
349 | continue | |
350 | repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) |
|
350 | repo.ui.debug("preserving %s for resolve of %s\n" % (f, fd)) | |
@@ -374,7 +374,7 b' def applyupdates(repo, actions, wctx, mc' | |||||
374 |
|
374 | |||
375 | numupdates = len(actions) |
|
375 | numupdates = len(actions) | |
376 | for i, a in enumerate(actions): |
|
376 | for i, a in enumerate(actions): | |
377 |
f, m = a |
|
377 | f, m, args = a | |
378 | repo.ui.progress(_('updating'), i + 1, item=f, total=numupdates, |
|
378 | repo.ui.progress(_('updating'), i + 1, item=f, total=numupdates, | |
379 | unit=_('files')) |
|
379 | unit=_('files')) | |
380 | if m == "r": # remove |
|
380 | if m == "r": # remove | |
@@ -393,7 +393,7 b' def applyupdates(repo, actions, wctx, mc' | |||||
393 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), |
|
393 | subrepo.submerge(repo, wctx, mctx, wctx.ancestor(mctx), | |
394 | overwrite) |
|
394 | overwrite) | |
395 | continue |
|
395 | continue | |
396 |
f2, fd, move = a |
|
396 | f2, fd, move = args | |
397 | audit(fd) |
|
397 | audit(fd) | |
398 | r = ms.resolve(fd, wctx, mctx) |
|
398 | r = ms.resolve(fd, wctx, mctx) | |
399 | if r is not None and r > 0: |
|
399 | if r is not None and r > 0: | |
@@ -404,14 +404,14 b' def applyupdates(repo, actions, wctx, mc' | |||||
404 | else: |
|
404 | else: | |
405 | merged += 1 |
|
405 | merged += 1 | |
406 | elif m == "g": # get |
|
406 | elif m == "g": # get | |
407 |
flags = a |
|
407 | flags, = args | |
408 | repo.ui.note(_("getting %s\n") % f) |
|
408 | repo.ui.note(_("getting %s\n") % f) | |
409 | repo.wwrite(f, mctx.filectx(f).data(), flags) |
|
409 | repo.wwrite(f, mctx.filectx(f).data(), flags) | |
410 | updated += 1 |
|
410 | updated += 1 | |
411 | if f == '.hgsubstate': # subrepo states need updating |
|
411 | if f == '.hgsubstate': # subrepo states need updating | |
412 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) |
|
412 | subrepo.submerge(repo, wctx, mctx, wctx, overwrite) | |
413 | elif m == "d": # directory rename |
|
413 | elif m == "d": # directory rename | |
414 |
f2, fd, flags = a |
|
414 | f2, fd, flags = args | |
415 | if f: |
|
415 | if f: | |
416 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) |
|
416 | repo.ui.note(_("moving %s to %s\n") % (f, fd)) | |
417 | audit(f) |
|
417 | audit(f) | |
@@ -422,19 +422,19 b' def applyupdates(repo, actions, wctx, mc' | |||||
422 | repo.wwrite(fd, mctx.filectx(f2).data(), flags) |
|
422 | repo.wwrite(fd, mctx.filectx(f2).data(), flags) | |
423 | updated += 1 |
|
423 | updated += 1 | |
424 | elif m == "dr": # divergent renames |
|
424 | elif m == "dr": # divergent renames | |
425 |
fl = a |
|
425 | fl, = args | |
426 | repo.ui.warn(_("note: possible conflict - %s was renamed " |
|
426 | repo.ui.warn(_("note: possible conflict - %s was renamed " | |
427 | "multiple times to:\n") % f) |
|
427 | "multiple times to:\n") % f) | |
428 | for nf in fl: |
|
428 | for nf in fl: | |
429 | repo.ui.warn(" %s\n" % nf) |
|
429 | repo.ui.warn(" %s\n" % nf) | |
430 | elif m == "rd": # rename and delete |
|
430 | elif m == "rd": # rename and delete | |
431 |
fl = a |
|
431 | fl, = args | |
432 | repo.ui.warn(_("note: possible conflict - %s was deleted " |
|
432 | repo.ui.warn(_("note: possible conflict - %s was deleted " | |
433 | "and renamed to:\n") % f) |
|
433 | "and renamed to:\n") % f) | |
434 | for nf in fl: |
|
434 | for nf in fl: | |
435 | repo.ui.warn(" %s\n" % nf) |
|
435 | repo.ui.warn(" %s\n" % nf) | |
436 | elif m == "e": # exec |
|
436 | elif m == "e": # exec | |
437 |
flags = a |
|
437 | flags, = args | |
438 | audit(f) |
|
438 | audit(f) | |
439 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) |
|
439 | util.setflags(repo.wjoin(f), 'l' in flags, 'x' in flags) | |
440 | updated += 1 |
|
440 | updated += 1 | |
@@ -468,7 +468,7 b' def recordupdates(repo, actions, branchm' | |||||
468 | "record merge actions to the dirstate" |
|
468 | "record merge actions to the dirstate" | |
469 |
|
469 | |||
470 | for a in actions: |
|
470 | for a in actions: | |
471 |
f, m = a |
|
471 | f, m, args = a | |
472 | if m == "r": # remove |
|
472 | if m == "r": # remove | |
473 | if branchmerge: |
|
473 | if branchmerge: | |
474 | repo.dirstate.remove(f) |
|
474 | repo.dirstate.remove(f) | |
@@ -487,7 +487,7 b' def recordupdates(repo, actions, branchm' | |||||
487 | else: |
|
487 | else: | |
488 | repo.dirstate.normal(f) |
|
488 | repo.dirstate.normal(f) | |
489 | elif m == "m": # merge |
|
489 | elif m == "m": # merge | |
490 |
f2, fd, move = a |
|
490 | f2, fd, move = args | |
491 | if branchmerge: |
|
491 | if branchmerge: | |
492 | # We've done a branch merge, mark this file as merged |
|
492 | # We've done a branch merge, mark this file as merged | |
493 | # so that we properly record the merger later |
|
493 | # so that we properly record the merger later | |
@@ -510,7 +510,7 b' def recordupdates(repo, actions, branchm' | |||||
510 | if move: |
|
510 | if move: | |
511 | repo.dirstate.drop(f) |
|
511 | repo.dirstate.drop(f) | |
512 | elif m == "d": # directory rename |
|
512 | elif m == "d": # directory rename | |
513 |
f2, fd, flag = a |
|
513 | f2, fd, flag = args | |
514 | if not f2 and f not in repo.dirstate: |
|
514 | if not f2 and f not in repo.dirstate: | |
515 | # untracked file moved |
|
515 | # untracked file moved | |
516 | continue |
|
516 | continue |
General Comments 0
You need to be logged in to leave comments.
Login now