Behavior Difference Between unbundle and import --exact

Kevin Christen kevin.christen at gmail.com
Mon Jul 14 14:33:39 CDT 2008


Matt,

When I run your script it fails on "hg import --exact ../a/3" with the
message:

applying ../a/3
abort: cannot partially commit a merge (do not specify files or patterns)

But if I replace "hg export 3 > 3" with "hg bundle --base 2 3.hg" and "hg
import --exact ../a/3" with "hg unbundle ../a/3.hg", it works.

Any idea why it might work for you but not for me?  Results are the same on
Windows and Solaris.

Thanks,
Kevin Christen

On Mon, Jul 14, 2008 at 12:11 PM, Matt Mackall <mpm at selenic.com> wrote:

>
> On Mon, 2008-07-14 at 10:56 -0500, Kevin Christen wrote:
> > I'm trying to test a workflow for a team who's members can't all pull
> > from the "gold copy" repository (don't ask...).  I've tried two
> > different approachs: sending the gold copy updates out as bundles, and
> > sending them out as patches to be imported with the --exact option.
> > The bundle approach works fine, but the import approach fails when
> > importing a merge changeset with this message:
> >
> > abort: cannot partially commit a merge (do not specify files or
> > patterns)
> >
> > The attached script demonstrates: run it as-is to see the failure, and
> > comment out line 2 ("export=1") to run it successfully using
> > bundle/unbundle.
> >
> > I have two questions: what does the error message mean, and am I wrong
> > to expect that bundle/unbundle and export/import --exact work
> > similarly?
>
> That's a big scary script, and I'm afraid to run it. Can you simplify it
> a bit? Here's a minimal test script that works for me:
>
> #!/bin/sh
> rm -rf a b
> hg init a
> cd a
> echo a > a
> hg ci -Aqm0
> echo b > b
> hg ci -Aqm1
> hg clone -q . ../b
> hg co -q 0
> echo c > c
> hg ci -Aqm2
> hg merge -q
> hg ci -m3
> hg id
> hg export 2 > 2
> hg export 3 > 3
>
> cd ../b
> hg import --exact ../a/2
> hg import --exact ../a/3
> hg id
>
> As for your question: no, you actually can't expect import --exact to
> always work. There are various small details like whether the changelog
> ends in a newline that can foul things up.
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://selenic.com/pipermail/mercurial/attachments/20080714/64d3e1e4/attachment.htm 


More information about the Mercurial mailing list