Page MenuHomePhabricator

rebase: fix for hgsubversion
ClosedPublic

Authored by phillco on Dec 13 2017, 1:10 AM.

Details

Summary

5c25fe7fb1e broke something in the hgsubversion test path, causing it raise an
abort (Abort: nothing to merge) during a perfectly good rebase. I tracked it
down to this change. It's probably not hgsubversion related.

I suspect that using the same wctx from before the initial update causes
problems with the wctx's cached manifest property. I noticed we also sometimes
stick random gunk on the wctx object in other places (like in copies.py) so
it's probably best to reset it for now.

The line I added before was actually useless since we don't pass wctx to the
initial merge.update, so it defaults to repo[None]. So I just removed it.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

phillco created this revision.Dec 13 2017, 1:10 AM
phillco added a comment.EditedDec 13 2017, 12:55 PM

A better way might just be to use None for self.wtcx when rebasing on disk, which will cause fresh wctxs to be used every time and feel less icky. We could use self.inmemory instead of self.wctx.isinmemory().

yuja accepted this revision.Dec 14 2017, 7:19 AM
yuja added a subscriber: yuja.

Queued, thanks.

A better way might just be to use None for self.wtcx when rebasing on disk,

Yeah, it might be. workingctx object must be recreated when dirstate changes.

This revision is now accepted and ready to land.Dec 14 2017, 7:19 AM
This revision was automatically updated to reflect the committed changes.

@yuja is that just because of the _manifest property cache, or are there others as well?

yuja added a comment.Dec 15 2017, 7:50 AM

@yuja is that just because of the _manifest property cache, or are there others as well?

Others, too. workingctx._parents() for example.