[PATCH 2 of 3 V2] localrepo: make it possible to reuse manifest when commiting context
Mateusz Kwapich
mitrandir at fb.com
Thu Nov 17 14:31:11 EST 2016
# HG changeset patch
# User Mateusz Kwapich <mitrandir at fb.com>
# Date 1479409155 28800
# Thu Nov 17 10:59:15 2016 -0800
# Node ID 4a0824bead3ba5980bd8528937fba5f7bb31ba9f
# Parent 7dfd4c184ee087f2c05e1bdae8a10ccefbff7a92
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
@@ -1695,7 +1695,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()
More information about the Mercurial-devel
mailing list