Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 30571: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 | a90867a22daf |
children | 91db2aa0edfe |
comparison
equal
deleted
inserted
replaced
30570:7fbc8a742b4d | 30571:46d2c8b23c33 |
---|---|
1694 lock = self.lock() | 1694 lock = self.lock() |
1695 try: | 1695 try: |
1696 tr = self.transaction("commit") | 1696 tr = self.transaction("commit") |
1697 trp = weakref.proxy(tr) | 1697 trp = weakref.proxy(tr) |
1698 | 1698 |
1699 if ctx.files(): | 1699 if ctx.manifestnode(): |
1700 # reuse an existing manifest revision | |
1701 mn = ctx.manifestnode() | |
1702 files = ctx.files() | |
1703 elif ctx.files(): | |
1700 m1ctx = p1.manifestctx() | 1704 m1ctx = p1.manifestctx() |
1701 m2ctx = p2.manifestctx() | 1705 m2ctx = p2.manifestctx() |
1702 mctx = m1ctx.copy() | 1706 mctx = m1ctx.copy() |
1703 | 1707 |
1704 m = mctx.read() | 1708 m = mctx.read() |