Problem: how move a branch back to a previous revision?
Bram Moolenaar
Bram at Moolenaar.net
Sun May 16 12:55:52 UTC 2010
Steve Losh wrote:
> > I wrote:
> >
> >> I'm not experienced with Mercurial. Trying to follow the documentation
> >> I got myself in a situation where I don't know how to get out.
> >>
> >> For Vim there has always been the "default" branch. This is the stable
> >> release.
> >>
> >> I now started work on a new, unstable version Vim 7.3. For that I
> >> created a new branch "vim73". I submitted a few changes, so far so
> >> good.
> >>
> >> Now a fix was made in the default branch: "Correct Japanese menus to
> >> avoid error while loading them after 7.2.432." I wanted to pick this up
> >> in the vim73 branch with "hg rebase". That's where it went wrong.
> >>
> >> Now I have the changes from the vim73 branch on top of the default
> >> branch. How to I go back, revert the last few revisions that shouldn't
> >> be there?
> >>
> >> You can see the current status here:
> >> http://code.google.com/p/vim/source/list
> >>
> >> Specifically, these commits should not be in the default branch, they
> >> belong to the "vim73" branch:
> >> - After recovery check if the text changed. If it did mark the buffer as
> >> modified.
> >> - Get rid of the "extra" and "lang" archives.
> >> - Switched from autoconf 2.63 to 2.65.
> >> - Small fix for compiler warning in Netbeans.
> >> - First step in the Vim 7.3 branch. Changed version numbers.
> >>
> >> I tried quite a few commands I found in the docs, but nothing worked.
> >> Specifcally, I tried:
> >> hg revert --all --rev 8a9d956f14
> >> Nothing happened. Not even an error message.
> >>
> >> How to back out a few revisions? Can't be difficult, but how???
> >> Help!
> >
> > Well, I found a brute-force solution:
> > - Delete my local repository
> > - Make a new clone from the server
> > - hg revert --all --rev 2154
> > - hg commit
> > - hg push
> >
> > I don't know what happened to my local repository that made "hg revert"
> > ineffective.
>
> It sounds like you wanted 'hg rebase --keepbranches' to put the vim73
> changes on top of the default ones while still keeping their branch
> name.
I tried to understand the rebase arguments, as listed here:
http://mercurial.selenic.com/wiki/RebaseProject
I find this very hard to understand. It's not even clear what
"destination" means in this context. Looks like it was written by
a professor who doesn't realize his audience is primary school kids.
"keep original branch names" is a puzzle. What does "original" mean, in
the branch being moved or in the base branch? What does it DO?
Perhaps someone who understands "rebase" should update that page and add
examples. Especially for my case, which should be very common:
start with a stable branch, create a new development branch, then rebase
the development branch to pick up changes made in the stable branch.
The "Scenarios" section has nice pictures, but doesn't mention the
commands being used, looks pointless to me.
--
The real
trick is
this: to
keep the
lines as
short as
possible
and keep
the size
the same
yet free
from the
need for
hyphena-
Dammit!! (Matthew Winn)
/// Bram Moolenaar -- Bram at Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
More information about the Mercurial
mailing list