hg export import problem

Matt Mackall mpm at selenic.com
Mon Mar 31 15:03:33 CDT 2008


On Mon, 2008-03-31 at 12:43 -0700, Mathieu Lacage wrote:
> On Mon, 2008-03-31 at 10:33 -0700, Brendan Cully wrote:
> 
> > > Import does one commit per input file and you can't exactly preserve 3
> > > commit ids in one commit.
> > 
> > It would be nice if import could notice multiple HG patch headers in a
> > single file and do separate commits for each (at least optionally). I
> > don't think it's conceptually terribly difficult, but it'll probably
> > be a bit fiddly.
> 
> +1 from a user: I have been bitten by this many times and end up losing
> the exported history during import because I have to use patch -p1 < +
> hg ci 

For anyone interested, the relevant code is in mercurial/commands.py at
around line 1502.

Ideally, we'd like to automatically handle:

- multiple exports in one file (easy)
- multiple patches in an mbox (a bit trickier)
- multiple non-export diffs in one file (ambiguous)

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list