mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
merge: move dr/rd warning messages out of applyupdates()
As preparation for making 'dr' and 'rd' actions no longer actions, move the reporting from applyupdates() to its caller update(). This way we won't have to pass additonal arguments to applyupdates() when they are no longer actions. Also, the warnings are equally unrelated to applyupdates() as they are to recordupdates(), as they don't result in any changes to either the working copy or the dirstate. See earlier patch for additional motivation.
This commit is contained in:
parent
6ddc19cb79
commit
0abe09b21d
@ -824,22 +824,6 @@ def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None):
|
||||
repo.wwrite(f, mctx.filectx(f0).data(), flags)
|
||||
updated += 1
|
||||
|
||||
# divergent renames
|
||||
for f, args, msg in actions['dr']:
|
||||
fl, = args
|
||||
repo.ui.warn(_("note: possible conflict - %s was renamed "
|
||||
"multiple times to:\n") % f)
|
||||
for nf in fl:
|
||||
repo.ui.warn(" %s\n" % nf)
|
||||
|
||||
# rename and delete
|
||||
for f, args, msg in actions['rd']:
|
||||
fl, = args
|
||||
repo.ui.warn(_("note: possible conflict - %s was deleted "
|
||||
"and renamed to:\n") % f)
|
||||
for nf in fl:
|
||||
repo.ui.warn(" %s\n" % nf)
|
||||
|
||||
# exec
|
||||
for f, args, msg in actions['e']:
|
||||
repo.ui.debug(" %s: %s -> e\n" % (f, msg))
|
||||
@ -1116,6 +1100,22 @@ def update(repo, node, branchmerge, force, partial, ancestor=None,
|
||||
|
||||
stats = applyupdates(repo, actions, wc, p2, overwrite, labels=labels)
|
||||
|
||||
# divergent renames
|
||||
for f, args, msg in actions['dr']:
|
||||
fl, = args
|
||||
repo.ui.warn(_("note: possible conflict - %s was renamed "
|
||||
"multiple times to:\n") % f)
|
||||
for nf in fl:
|
||||
repo.ui.warn(" %s\n" % nf)
|
||||
|
||||
# rename and delete
|
||||
for f, args, msg in actions['rd']:
|
||||
fl, = args
|
||||
repo.ui.warn(_("note: possible conflict - %s was deleted "
|
||||
"and renamed to:\n") % f)
|
||||
for nf in fl:
|
||||
repo.ui.warn(" %s\n" % nf)
|
||||
|
||||
if not partial:
|
||||
repo.dirstate.beginparentchange()
|
||||
repo.setparents(fp1, fp2)
|
||||
|
Loading…
Reference in New Issue
Block a user