[Bug 4210] New: Rebasing when there are unstable changesets leads to divergent changesets
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Mar 28 21:19:26 CDT 2014
http://bz.selenic.com/show_bug.cgi?id=4210
Priority: normal
Bug ID: 4210
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Rebasing when there are unstable changesets leads to
divergent changesets
Severity: bug
Classification: Unclassified
OS: All
Reporter: gregory.szorc at gmail.com
Hardware: All
Status: UNCONFIRMED
Version: unspecified
Component: rebase
Product: Mercurial
I found a user experience with 2.9.1+212-8a6a86c9a5b5 + mutable-history
0ea9cecbbd28 (a few changesets off tip) that is quite unpleasant. I'm not sure
if it is a bug or by design. I'm not sure if it is a bug with mutable-history
or core, so filing here.
I have a repo that looks like this:
A --> B --> C --> D --> E
I amend a commit to produce some unstable changesets:
$ hg up C
<make some changes>
$ hg amend
2 new unstable changesets
Cool. Now, if I had my wits about me, I'd run `hg evolve -a` right now. But I
forgot. Instead, I do a pull:
$ hg pull
Now my history is like:
A --> B --> C --> D --> E
\ \
\ \- C'
\
F -> G
. is C' (rebased C). D and E are unstable.
I want to rebase my feature head on top of the newly pulled head.
$ hg rebase -d G
Mercurial churns for a while and I immediately notice something weird: the
progress bars indicate it's rebasing 3 patches. Not just C', but D and E as
well. I think "ok, it's being smart and evolving for me!" But then rebase
finishes:
2 new divergent changesets
Oh, hmm. That's weird.
Well, I want to push the rebased C' to the remote, so:
$ hg out -r .
<it shows something that looks sane>
$ hg push -r .
abort: push includes divergent changeset: a978f03b56fd!
(use 'hg evolve' to get a stable history or --force to ignore warnings)
And this is the point where I start breaking out `hg --hidden log` to try to
figure out WTF happened to my repo.
With much trepidation, I eventually run `hg evolve -a` and it seems to do the
right thing. Although, the output is very unsettling:
merge:[201556] Bug 985084 - Experiment add-ons should be disabled by default;
r=Unfocused
with: [201568] Bug 985084 - Experiment add-ons should be disabled by default;
r=Unfocused
base: [201473] Bug 985084 - Experiment add-ons should be disabled by default;
r=Unfocused
updating to "local" conflict
4 files updated, 0 files merged, 0 files removed, 0 files unresolved
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 new unstable changesets
"updating to 'local' conflict" - that sounds scary!
I start looking at `hg diff -c` and everything looks sane. So, I eventually
arrive at the conclusion that everything is fine.
But the whole experience has me scratching my head.
Why was . not updated to a stable changeset after the rebase?
Why did the rebase include unstable changesets (C'::) and create the divergent
changesets in the first place?
I'm pretty confident there's a bug in here somewhere. My apologies if this
should be filed in evolution's bug tracker.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list