topic - merge - rebase
Friedrich Hagedorn
friedrich_h at gmx.de
Sat Jul 4 21:23:40 UTC 2020
On Sat, Jul 04, 2020 at 02:31:34PM +0530, Faheem Mitha wrote:
> On Sat, 4 Jul 2020, Friedrich Hagedorn wrote:
> > I hope this is the right place to report a topic issue.
> >
> > Right know, I evaluate hg topics vs. git branches. In short,
> > I just want to rebase a local topic branch with an upstream merge
> > to the default branch:
>
> I'm also a topics user. It would be helpful if you could provide a script
> (meaning a list of command line commands to give), which can be used to
> reproduce the issue.
Yes, of curse. Here is my test case:
--8<--
hg init topic-merge-rebase
cd topic-merge-rebase
# create default branch with two commits
echo a > a
hg ci -Am "add a"
echo b > b
hg ci -Am "add b"
# create feature branch on first default commit "add a"
hg up -r 0
hg topic feature
echo a1 >> a
hg ci -m "a1"
# merge default branch in feature branch
hg merge
hg ci -m "merge from default"
# new upstream work on default branch
hg up default
echo c > c
hg ci -Am "add c"
# further improve feature
hg up feature
echo a2 >> a
hg ci -m "a2"
# now the feature is finished and ...
hg log -GT "{rev}: {desc}"
# ... should rebased on-top of the default branch
hg rebase
hg log -GT "{rev}: {desc}"
# since the rebase is not complete we have to re-run rebase with
# an additional (but unneeded) parameter
hg rebase -r "topic(feature)"
hg log -GT "{rev}: {desc}"
--8<--
I hope this test case makes the problem more clearly.
Regards
Friedrich
More information about the Evolve-testers
mailing list