[issue1916] hg bails when ) 1) forget to pull/update 2) commit/push specific files only 3) pull/update

Ben Bucksch bugs at mercurial.selenic.com
Fri Nov 20 21:17:21 UTC 2009


New submission from Ben Bucksch <linux.news at bucksch.org>:

# Create test project
mkdir hgtest
cd hgtest/
mkdir proj
hg init proj/
cd proj/
edit foo.txt
edit bar.txt
edit zab.txt
hg add *txt
hg commit
cd ..
# Check out as developer and start some work
hg clone proj src
edit bar.txt
# Some other dev does work at the same time, and checks in
cd ..
hg clone proj/ otherdev
cd otherdev/
edit zab.txt
hg commit
hg push
# Back to yourself
cd ../src/
# Make some other, unrelated change and try to commit it
edit foo.txt
hg commit foo.txt
hg push
"Canceled: ...creates new remote heads..."
# OK, you're not up-to-date, fine, so update:
hg pull
hg update
"Canceled: ... crosses branches (use 'hg merge' to merge or use 'hg update
-C' to discard changes)"

Now, try to sort that out, as a hg newbie, without removing your other local
work in foo.txt.

It's obvious that in this case, there's no actual problem and hg just
chickens. The touched files have absolutely nothing in common. Now imagine
the same with entirely unrelated changes in different directories /
submodules. This is a very common case, I run into it all the time with a
busy project. And entirely unnecessary - there is no conflict, neither in
files nor inherently.

----------
messages: 11027
nosy: benb
priority: wish
status: unread
title: hg bails when ) 1) forget to pull/update 2) commit/push specific files only 3) pull/update

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue1916>
____________________________________________________


More information about the Mercurial-devel mailing list