[issue1910] 'hg bundle --base $head' does not exclude $head from result

Jesse Glick bugs at mercurial.selenic.com
Mon Nov 16 20:50:46 UTC 2009


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

Using 1.3.1, 'hg bundle' fails to exclude nodes named by --base from the result:

$ hg glog --template '{node}\n'
@  08b7fb7c6d6c10bf4e7f71f21e21e82d4aad2f81
|
| o  2548b3e93606c1e024b16f5e920038bbf13166b8
|/
o  d9e5b562e4efdb762d4a11271f2a6f3bcc5cc3b1

$ hg --debug bundle --base 2548b3e93606c1e024b16f5e920038bbf13166b8 x.hg
2 changesets found
list of changesets:
2548b3e93606c1e024b16f5e920038bbf13166b8
08b7fb7c6d6c10bf4e7f71f21e21e82d4aad2f81
$ hg --debug bundle --base 2548b3e93606c1e024b16f5e920038bbf13166b8 --base
08b7fb7c6d6c10bf4e7f71f21e21e82d4aad2f81 x.hg
2 changesets found
list of changesets:
2548b3e93606c1e024b16f5e920038bbf13166b8
08b7fb7c6d6c10bf4e7f71f21e21e82d4aad2f81

Clearly this contradicts the docs for the bundle command:

"the destination is assumed to have all the nodes specified by one or more
--base parameters"

There seem to be two problems:

1. Heads are not excluded in bundle(...).

2. Even if #1 is fixed, if the result is an empty list,
changegroupsubset(...) treats bases==[] like bases=[nullid] and so the
command works as if --all had been specified!

Both problems are easy to fix. I am not sure whether any regression is
possible from fixing #2, i.e. whether some code actually passes bases==[]
expecting it to be like omitting this parameter. At any rate, "all the nodes
that are descendents of any of the bases and ancestors of any of the heads"
implies that passing bases==[] should result in an empty changegroup (docs
do not specify what bases==None means).

----------
messages: 10988
nosy: jglick
priority: bug
status: unread
title: 'hg bundle --base $head' does not exclude $head from result

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


More information about the Mercurial-devel mailing list