Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
481 views
in Technique[技术] by (71.8m points)

mercurial - After pushing to a review repository, "abort: can't rebase immutable changeset" on rebase

We have a code review repository where people hg push -f all sorts of stuff. After reviews are complete, we pull from the project's central repository, rebase, and push. I recently upgraded to mercurial 2.1 and get this message:

abort: can't rebase immutable changeset 43ab8134e7af
(see hg help phases for details)

when I try to hg pull --rebase from the central repository. How do I fix it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

In the review repository's .hg/hgrc file, add these lines:

[phases]
publish = False

The problem is due to a new feature in mercurial 2.1 called phases. It's great. Here is a nice introduction to its use.

To make the changesets in question mutable right now, use hg phase -f -d REV to force REV to be mutable again. Once the hgrc file has been changed, you shouldn't have to do that any more.

As a side note, hg push -f is lame. Make an alias hg review that pushes with -f to that repository.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...