[PATCH 1 of 3] localrepo: reuse parent manifest in commitctx if no files have changed

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Thu May 5 03:00:35 CDT 2011


On Thu, May 5, 2011 at 7:00 AM, Peter Arrenbrecht
<peter.arrenbrecht at gmail.com> wrote:
> On Wed, May 4, 2011 at 10:57 PM, Christian Ebert <blacktrash at gmx.net> wrote:
>> * Benoit Boissinot on Tuesday, May 03, 2011 at 18:21:44 +0200
>>> On Mon, May 2, 2011 at 7:23 PM, Peter Arrenbrecht
>>> <peter.arrenbrecht at gmail.com> wrote:
>>>> # HG changeset patch
>>>> # User Peter Arrenbrecht <peter.arrenbrecht at gmail.com>
>>>> # Date 1304356829 -7200
>>>> localrepo: reuse parent manifest in commitctx if no files have changed
>>>>
>>>> This speeds up the in-memory version of debugbuilddag that I'm
>>>> working on considerably for the case where we want to build just
>>>> a 00changelog.i (for discovery tests, for instance).
>>>>
>>>> There are a couple of test changes because node ids in tests
>>>> have changed.
>>>
>>> I don't understand why they would change, could you explain? (they are
>>> not related to debugbuilddag, right?)
>>
>> Did I miss the explanation, perhaps on irc? If someone could take
>> the time to give some hints as to why this happens, I'd be very
>> grateful.
>
> Sorry, I had to look after the kids these past two days. One case is
> when mq applies an empty patch. Another is csets that change only the
> named branch. But I'll look into it in a bit more detail today.

OK, so localrepo.commit uses localrepo.commitctx. Which means this
affects *all* commits. I've gone through the changed tests to look for
sources of the changes:

hg branch foo ; hg ci
* test-acl.t:
* test-branch-tag-conflict.t
* test-branches.t
* test-encoding.t
* test-issue1306.t
* test-newbranch.t
* test-rebase-cache.t
* test-tag.t

echo foo > .hg/branch ; hg ci  # WTF??
 * test-command-template.t

hg ci --close-branch
 * test-pull-r.t

hg merge ; hg ci where 0 files updated, 0 files merged, 0 files
removed, 0 files unresolved
 * test-empty-group.t
 * test-notify.t

hg merge ; HGMERGE=internal:local hg resolve -a ; hg ci
 * test-keyword.t

hg qnew with no actual changes
 * test-mq-qdelete.t
 * test-mq.t

others
 * test-convert-svn-branches.t - converts some branch name changes from svn
 * test-convert-svn-encoding.t - guessing the same reason here, did
not look closely

-parren


More information about the Mercurial-devel mailing list