Mercurial > hg
changeset 30566:46d2c8b23c33
localrepo: make it possible to reuse manifest when commiting context
This makes the commit function understand the context that's reusing manifest.
author | Mateusz Kwapich <mitrandir@fb.com> |
---|---|
date | Thu, 17 Nov 2016 10:59:15 -0800 |
parents | 7fbc8a742b4d |
children | 73ce055b169a |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Nov 17 10:59:15 2016 -0800 +++ b/mercurial/localrepo.py Thu Nov 17 10:59:15 2016 -0800 @@ -1696,7 +1696,11 @@ 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()