This repos contains the 'exportfiles' Mercurial extension.

  • Version: 0.9
  • Developer: albert_brand

What does it do?

'Exportfiles' exports all files changed in a revision or revision range to a directory. File contents is retrieved from the highest given revision context.

Files in the specified output directory will be overwritten. Deleted files are not included in the file export. Cross-branch export (specifying revisions in two branches) is not allowed (and does not make much sense).

When enabling the 'marker' option, a /.rev directory is created in the exported fileset with a file per exported revision changeset. This directory can be uploaded with each export to provide some trackback information for the exported revisions.

By default, subrepositories are traversed and exported too. To disable this feature, pass the 'nosub' option.

How do I get set up?

Extension installation instructions can be found on the Mercurial wiki page:

Basically: copy the file somewhere on your filesystem, locate your hgrc file and add the following line under the 'extensions' header:

exportfiles = <path-to-extension>/


hg exportfiles -r 10 /tmp/export

Exports all changed files from rev 10 into /tmp/export. File contents reflects rev 10.

hg exportfiles -r 10:20 /tmp/export

Exports all changed files from rev 10 to 20 (inclusive) into /tmp/export. File contents reflects rev 20.

hg exportfiles -r 10:tip /tmp/export

Exports all changed files from rev 10 to tip into /tmp/export. File contents reflects tip rev.

Contribution guidelines

If you want to add a new feature, fork this repo and create a pull request when you're done. I'll look into the request soon!


  • Veronica Lin

Who do I talk to?

Talk to me: