# HG changeset patch # User Mateusz Kwapich # Date 2016-11-17 18:59:15 # Node ID 46d2c8b23c336a3108acb45c2f5817b1c0e922b6 # Parent 7fbc8a742b4d9f2d4ca14dc02fef618859d8a300 localrepo: make it possible to reuse manifest when commiting context This makes the commit function understand the context that's reusing manifest. diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -1696,7 +1696,11 @@ class localrepository(object): tr = self.transaction("commit") trp = weakref.proxy(tr) - if ctx.files(): + if ctx.manifestnode(): + # reuse an existing manifest revision + mn = ctx.manifestnode() + files = ctx.files() + elif ctx.files(): m1ctx = p1.manifestctx() m2ctx = p2.manifestctx() mctx = m1ctx.copy()