[issue1065] Fetch command misbehaves in presence of named branches

Jesse Glick mercurial-bugs at selenic.com
Mon Mar 31 19:21:42 CDT 2008


New submission from Jesse Glick <jesse.glick at sun.com>:

The fetch command will go ahead and merge a named branch if present in the
remote repo, which is certainly not what you expected. It should only merge your
own local head (from the same branch).

$ hg init
$ touch a
$ hg add a
$ hg ci -ma
$ hg clone . dupe
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ touch b
$ hg add b
$ hg ci -mb
$ hg up -r0
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg branch experimental
marked working directory as branch experimental
$ touch c
$ hg add c
$ hg ci -mc
created new head
$ hg -R dupe fetch
pulling from ....
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 2 files (+1 heads)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating to 1:02c938f6f28c
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
merging with 2:dab88d94365b
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
new changeset 3:37b7b61d5489 merges remote changes with local
$ hg -R dupe log
changeset:   3:37b7b61d5489
tag:         tip
parent:      1:02c938f6f28c
parent:      2:dab88d94365b
user:        ...
date:        ...
summary:     Automated merge with file:///....

changeset:   2:dab88d94365b
branch:      experimental
parent:      0:39cadd2a735f
user:        ...
date:        ...
summary:     c

changeset:   1:02c938f6f28c
user:        ...
date:        ...
summary:     b

changeset:   0:39cadd2a735f
user:        ...
date:        ...
summary:     a

$

----------
messages: 5768
nosy: jglick
priority: bug
status: unread
title: Fetch command misbehaves in presence of named branches
topic: named branches

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



More information about the Mercurial-devel mailing list