https://bz.mercurial-scm.org/show_bug.cgi?id=6256

            Bug ID: 6256
           Summary: Rebasing topic branch causes spurious new branch error
                    message.
           Product: Mercurial
           Version: 5.2.1
          Hardware: PC
                OS: Linux
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: evolution
          Assignee: bugzi...@mercurial-scm.org
          Reporter: fah...@faheem.info
                CC: mercurial-devel@mercurial-scm.org,
                    pierre-yves.da...@ens-lyon.org
    Python Version: ---

My Mercurial version is 5.2.2, but the 5.2.2 tag was not available, so I chose
5.2.1. My Evolve version is 9.2.0-1. My OS is Debian GNU/Linux 10.2 (buster).

The following script fails, with the error message:

abort: push creates new remote head 9de553503ec4 on branch 'default:zee'!
(merge or see 'hg help push' for details about pushing new heads).

This corner case doesn't see like correct behavior. My understanding is that
this old error message (which can be overriden with the force flag -f), was
intended to stop people pushing extra anonymous branches by accident, or stop
them pushing an unfinished merge. I can't remember if it happens when creating
a 
named branch. 

At any rate, it doesn't seem like this use of topic branches warrants this
error message.

######################################
rm -rf test-obs-local test-obs-remote
hg init test-obs-local
hg init test-obs-remote
cd test-obs-local
echo "First line of foo" >> foo
hg add foo
hg ci -m "First line of foo"
hg topics bar
echo "First line of bar" >> bar
hg add bar
hg ci -m "First line of bar"
hg topics zee
echo "First line of zee" >> zee
hg add zee
hg ci -m "First line of zee (on top of bar)"
hg push ../test-obs-remote
hg log -vG
hg log -R ../test-obs-remote -vG
# Rebase the 'zee' topic branch to default and then make another commit
# in the 'zee' branch on top of the existing commit                             
hg rebase -s zee -d default
hg up zee
echo "Second line of zee" >> zee
hg ci -m "Second line of zee (now on top of default)"
# The push now fails                                                            
hg push ../test-obs-remote

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to