[Updated] D8883: applyupdates: simplfy calculation of number of updated files
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sat Aug 8 16:56:34 UTC 2020
Closed by commit rHGe335936cd4e1: applyupdates: simplfy calculation of number of updated files (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8883?vs=22304&id=22341
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8883/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8883
AFFECTED FILES
mercurial/merge.py
CHANGE DETAILS
diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -1500,7 +1500,6 @@
else:
i, item = res
progress.increment(step=i, item=item)
- updated = mresult.len((mergestatemod.ACTION_GET,))
if b'.hgsubstate' in mresult._actionmapping[mergestatemod.ACTION_GET]:
subrepoutil.submerge(repo, wctx, mctx, wctx, overwrite, labels)
@@ -1544,7 +1543,6 @@
wctx[f].audit()
wctx[f].write(wctx.filectx(f0).data(), flags)
wctx[f0].remove()
- updated += 1
# local directory rename, get
for f, args, msg in mresult.getactions(
@@ -1555,7 +1553,6 @@
f0, flags = args
repo.ui.note(_(b"getting %s to %s\n") % (f0, f))
wctx[f].write(mctx.filectx(f0).data(), flags)
- updated += 1
# exec
for f, args, msg in mresult.getactions(
@@ -1566,8 +1563,16 @@
(flags,) = args
wctx[f].audit()
wctx[f].setflags(b'l' in flags, b'x' in flags)
- updated += 1
+ # these actions updates the file
+ updated = mresult.len(
+ (
+ mergestatemod.ACTION_GET,
+ mergestatemod.ACTION_EXEC,
+ mergestatemod.ACTION_LOCAL_DIR_RENAME_GET,
+ mergestatemod.ACTION_DIR_RENAME_MOVE_LOCAL,
+ )
+ )
# the ordering is important here -- ms.mergedriver will raise if the merge
# driver has changed, and we want to be able to bypass it when overwrite is
# True
To: pulkit, #hg-reviewers, indygreg
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200808/548e5f2d/attachment-0002.html>
More information about the Mercurial-patches
mailing list