This has been a source of confusion for some time, and is probably unintended behaviour. When using "hg export -r tip -o foo" more than once, you get multiple copies of the patch in the file "foo". There is no documentation anywhere that this is the intended behaviour and I have seen people confused about getting more than one patch in the same file, so I'm inclined to think this is a bug.
Patch incoming.
For the record, mpm says: > We want to overwrite old files. But we also want to gather patches into > files from the current command. Which suggests we want to keep track of > which files we've visited and adjust the mode accordingly: > > if f in seen: > mode = 'a' > else: > mode = 'o' > seen.add(f)
I've mailed a patch for this.
Fixed by http://selenic.com/repo/hg/rev/1a2f4c633410 Augie Fackler <raf@durin42.com> export: clobber files with -o (bc) (issue3652) This violated user expectation. Updated the code to clobber files, but preserve the behavior of appending multiple patches requested in a single export. Includes tests. (please test the fix)