views:

31

answers:

1

Hi,

In SVN, I can do this to only export contents in folder2

svn export svn://source/Trunk/folder1/folder2 -r HEAD

How can I do the same in Mercurial? It seems that hg archive only accepts the target path not the source path. If I do hg archive target_path/folder it will export everything in the repository.

Thanks in advance.

+2  A: 

Use the --include and --exclude directives

hg archive -I 'target_path/folder/*' my_stuff.tar

will get everything from folder on down.

msw
thanks for your reply. However, no matter what patterns I put in, it doesn't export anything. Similarly, no matter what I put in for -X directive, it always export everything. Any ideas?
StarCub
got it, i don't need the quotes. :) thanks.
StarCub