merge: log which files were driver-resolved to scuba

Summary: Log whichever paths were driver-resolved but not in experimental.inmemorydisallowedpaths, so we can update experimental.inmemorydisallowedpaths and keep the experience of rebasing with IMM and
mergedriver a pleasant one.

Test Plan: .

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6656159
This commit is contained in:
Phil Cohen 2018-01-16 17:23:15 -08:00
parent 41fc137814
commit 8a4473f1d0

View File

@ -1561,6 +1561,20 @@ def applyupdates(repo, actions, wctx, mctx, overwrite, labels=None):
"support mergedriver")
ms.commit()
proceed = driverpreprocess(repo, ms, wctx, labels=labels)
# Note which files were marked as driver-resolved but not matched by
# experimental.inmemorydisallowedpaths. This will allow us to keep
# inmemorydisallowedpaths up to date so in-memory rebases are not
# restarted late in the merge.
# (Make sure the the default value (.^) doesn't match anything, since an
# empty string matches everything -- not what we want.)
pathsconfig = repo.ui.config("rebase",
"experimental.inmemorydisallowedpaths", ".^")
regex = util.re.compile(pathsconfig)
unmatched = [f for f in ms.driverresolved() if not regex.match(f)]
repo.ui.log('imm_mergedriver', '',
driver_resolved_missed="|".join(sorted(unmatched)))
# the driver might leave some files unresolved
unresolvedf = set(ms.unresolved())
if not proceed: