Issue2028

Title hg push doesn't always warn when pushing new named branches
Priority bug Status chatting
Superseder Nosy List djc, hstuart, pmezard, tonfa
Assigned To Topics named branches, surprise

Created on 2010-02-06.18:18:52 by tonfa, last changed 2010-02-14.19:21:02 by hstuart.

Messages
msg11701 (view) Author: hstuart Date: 2010-02-14.19:21:02
repro script should be:

hg init t1
cd t1
echo a > a
hg ci -Am m
cd ..
hg clone t1 t2
cd t2
echo b > b
hg branch foo
hg ci -Am m
hg up default
echo c > c
hg ci -Am m
hg merge foo
hg ci -m m
echo cc > c
hg ci -Am m
hg out
hg push # should require --force
hg out -r 3
hg push -r 3 # shouldn't work without --force, since it adds a new branch

the reason this happens is because prepush computes the bases and
topological heads that are outgoing (the missing changelog entries are
discarded), and when revs is specified, it uses a special way to compute the
branch heads by restricting it to the set of outgoing heads. We need some
(sane) way to compute the set of branch heads that are outgoing as opposed
to the topological heads.
msg11627 (view) Author: tonfa Date: 2010-02-06.18:18:52
hg push sometimes doesn't require --force when it should when using --rev.

hg init t1
cd t1
echo a > a
cd ..
hg clone t1 t2
cd t2
echo b > b
hg branch foo
hg ci -Am m
hg up default
echo c > c
hg ci -Am m
hg merge foo
hg ci -m m
echo cc > c
hg ci -Am m
hg out
hg push # should require --force
hg out -r 3
hg push -r 3 # shouldn't work without --force, since it adds a new branch
History
Date User Action Args
2010-02-14 19:21:02hstuartsetstatus: unread -> chatting
nosy: + hstuart
messages: + msg11701
2010-02-14 18:06:44pmezardsetnosy: + pmezard
2010-02-06 18:52:26djcsetnosy: + djc
2010-02-06 18:18:52tonfacreate