export && import --exact fails in some cases
Mads Kiilerich
mads at kiilerich.com
Tue Nov 27 19:32:04 UTC 2012
On 11/27/2012 12:18 PM, Alexander Drozdov wrote:
> I have a changeset sequence which I should export in text format.
> Some revisions in the sequence have extra properties such as
> "rebase_source=".
> hg export don't include these properties to output file. So when I
> import the sequence with '--exact --bypass' flags I get
> 'abort: patch is damaged or loses information' errors. I got that this
> happens
> due to changeset ID changing.
>
> So my question is how to export pathes with extra properties in text
> format?
The patch format is lossy - even when using the "git" format. You have
reached the limits of what can be done with '--exact'.
A workaround could be to update to the revision mentioned in the first
patch and apply without --exact.
If you really want "exactness" then use bundles instead.
It would be possible (and a nice feature) to include extra properties as
headers in the 'hg export' format and let 'hg import' parse and apply
them. It should perhaps only be done when --exact is specified ... but
there would also be valid use cases where extra info should be preserved
without --exact and where extra shouldn't be preserved with --exact.
/Mads
More information about the Mercurial
mailing list