[Bug 3973] New: Push tries to update all shared bookmarks
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Fri Jun 28 09:10:28 CDT 2013
http://bz.selenic.com/show_bug.cgi?id=3973
Priority: normal
Bug ID: 3973
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Push tries to update all shared bookmarks
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: martin at geisler.net
Hardware: PC
Status: UNCONFIRMED
Version: 2.6.2
Component: Mercurial
Product: Mercurial
I find it surprising that 'hg push' will try to update a shared bookmark, even
if the bookmark is not among the pushed revisions. That is, these commands:
hg init a
cd a
echo x > x.txt
hg add x.txt
hg commit -m x
hg bookmark @
cd ..
hg clone -q a b
cd b
echo xx > x.txt
hg commit -m xx
hg push -r 0
result in
pushing to /home/mg/tmp/a
searching for changes
no changes found
updating bookmark @ failed!
even though I did not want to push the @ bookmark just now. Bug 2800 seems
related, though no use case is presented there.
I ran into this while trying to use bookmarks for feature branches. I had a
bookmark F for my feature branch and it had been shared with the server.
My local bookmark was some revisions ahead of the server when I went back to @
to fix something else. I ran 'hg push -r @' to push the
non-feature-branch-related changes and was told that 'updating bookmark F
failed!'.
While searching for the cause of this, I saw that localrepo.push
unconditionally runs remote.listkeys('bookmarks') and tries to update all
shared bookmarks. This is unlike the code in commands.push, which only tries to
update the bookmarks given with the -B flag. I only looked briefly at this, but
it looks like the two pieces of code should be unified and that they both need
to take the set of revisions pushed into account.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list