Partial Archive
Matt Mackall
mpm at selenic.com
Wed Jan 2 12:32:08 CST 2008
On Wed, 2008-01-02 at 11:55 -0600, Nick Peeples wrote:
> Ok, here is what I have come up with for anyone else looking for the same thing:
>
> Assuming rev is calculated from last-build + 1
>
> hg export -a 55: > build.patch
>
> Move build.patch to production folders and using
> http://gnuwin32.sourceforge.net/packages/patch.htm (thanks Mark)
>
> patch -i build.patch -p 1 --binary
>
> This seems to handle just about everything, deletions, binary changes,
> etc. Anything seem wrong with this?
It won't handle:
- permissions
- symlinks
- empty files getting deleted and vice-versa
- various sorts of binaries
- possible brain damage involving newlines
Also, you probably want to use hg diff instead.
> P.S. - when I was going through this, I assumed that
>
> hg export -o file.patch rev:tip
>
> would generate the same results as
>
> hg export rev:tip > file.patch
We reopen the specified file each time. This allows us to do:
hg export -o %n.patch rev:tip
..and get a bunch of different files.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list