mercurial/localrepo.py
changeset 39668 24870f1be088
parent 39606 c5e6c1ba1c79
child 39687 bfeab472e3c0
--- a/mercurial/localrepo.py	Mon Sep 17 15:16:20 2018 -0400
+++ b/mercurial/localrepo.py	Fri Sep 14 16:29:51 2018 -0700
@@ -2109,9 +2109,16 @@
                                   'changelog, but manifest differs)\n')
                 if files or md:
                     self.ui.note(_("committing manifest\n"))
+                    # we're using narrowmatch here since it's already applied at
+                    # other stages (such as dirstate.walk), so we're already
+                    # ignoring things outside of narrowspec in most cases. The
+                    # one case where we might have files outside the narrowspec
+                    # at this point is merges, and we already error out in the
+                    # case where the merge has files outside of the narrowspec,
+                    # so this is safe.
                     mn = mctx.write(trp, linkrev,
                                     p1.manifestnode(), p2.manifestnode(),
-                                    added, drop)
+                                    added, drop, match=self.narrowmatch())
                 else:
                     self.ui.debug('reusing manifest form p1 (listed files '
                                   'actually unchanged)\n')