[Updated] [+ ] D8708: commitctx: move a tiny else clause above the very long one
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Mon Jul 20 16:52:00 UTC 2020
marmoute updated this revision to Diff 21990.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8708?vs=21805&id=21990
BRANCH
default
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8708/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8708
AFFECTED FILES
mercurial/localrepo.py
CHANGE DETAILS
diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -3115,7 +3115,11 @@
if writechangesetcopy:
filesadded = ctx.filesadded()
filesremoved = ctx.filesremoved()
- elif ctx.files():
+ elif not ctx.files():
+ self.ui.debug(b'reusing manifest from p1 (no file change)\n')
+ mn = p1.manifestnode()
+ files = []
+ else:
m1ctx = p1.manifestctx()
m2ctx = p2.manifestctx()
mctx = m1ctx.copy()
@@ -3211,10 +3215,6 @@
b'actually unchanged)\n'
)
mn = p1.manifestnode()
- else:
- self.ui.debug(b'reusing manifest from p1 (no file change)\n')
- mn = p1.manifestnode()
- files = []
if writecopiesto == b'changeset-only':
# If writing only to changeset extras, use None to indicate that
To: marmoute, #hg-reviewers, pulkit
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200720/033a49fd/attachment-0002.html>
More information about the Mercurial-patches
mailing list