"hg import" can't handle multiple changesets per file

Matt Mackall mpm at selenic.com
Thu Aug 25 02:26:39 UTC 2005


On Wed, Aug 24, 2005 at 07:09:21PM -0700, Josh Triplett wrote:
> [Please CC me on replies, as I am not subscribed to the list.]
> 
> If you do "hg export 1 2 3 > file.patch", file.patch will contain a set
> of hg changesets in exported form, including the hg header comment
> before each.  However, "hg import file.patch" will ignore all but the
> first header, and treat the entire file as a representation of that one
> changeset.  In my case, this caused three large changesets to be
> committed as one changeset, amusingly titled "formatting fixes". :)

There isn't really a clean way to fix this. But you probably wanted:

hg export -o "file-%n.patch" 1 2 3
hg import file-*.patch

-- 
Mathematics is the supreme nostalgia of our time.



More information about the Mercurial mailing list