vendor branch import
Zoran Bosnjak
zoran.bosnjak at via.si
Sun Nov 22 15:44:46 CST 2009
Hello all,
what would be a proper way to import new vendor release to mercurial?
It is simple if vendor code is in subdirectory, for example:
$cd proj
$rm -rf vendor_lib
$tar -xvzf ../vendor_lib.tgz
$hg addremove
$hg commit -m "new vendor release"
But what if a vendor code IS the project itself.
I have tryed to remove all files in '.' directory (except .hg/), but then
I lost .hgtags and other potential .hg* files. Hg purge extension does not
help.
hg revert -r null cleares .hgtags too.
I have also tryed to 'hg status' all files under version control and pass
a list to 'xargs rm',
but then the empty directores are left on working directory. I have tryed
some other approaches but I could not find one-line script or a sequence of
commands to do this for general case.
Only way to import new code is to manually delete files and directories,
and then copy new contents of project to '.', then running hg addremove.
So what is a 'official mercurial' way to perform this task?
If there is no such sequence of hg commands, what other shell commands I
should run to import new contents of a project correctly?
My next idea is to archive old release to a/, untar new release to b/,
then create a patch (diff between a/ and /b), then import a patch to
repository. But I am not sure how to do it correctly. I would appreciate a
sequence of commands if this is a solution.
Thanks for your help.
Zoran
More information about the Mercurial
mailing list