views:

178

answers:

2

I'd like all files under the repo's root folder except .hg/, .hgignore, .hgtags, etc. Is there a mercurial built-in or existing extension to do this?

I have implemented a non-hg script with hard-code "mercurial files", but I'd like a programmatic method of excluding the mercurial related files.

I'm trying to mirror a non-mercurial configuration management server (Starteam) by periodically deleting all files, doing a clean checkout from Starteam and then running hg addremove, then checkin.

A: 

For each version you pull from Starteam, I'd suggest creating a new directory.

In this directory, do a hg clone -U from your previous directory. This will clone the repository, but not checkout any files. After which, copy your Starteam files and then do an hg addremove.

brianegge
this will create a new branch for each revision, it's not very useful.
tonfa
+2  A: 

It's not exactly what you're looking for but hg update -r null takes your to the revision before the first changeset, which obviously contains no files. That'll leave your .hg in place but .hgtags and .hgignore will be-gone. However, they're tracked files so they'll come back with a hg update the same as any other files.

Ry4an
After updating to null I can't just checkout all the files from the non-mercurial cm server and checkin since this would create a new unrelated branch. If there was a command to "update to a revision without updating the working directory", then this would work.Maybe I need to reword the question?
Brandon Leiran
That command does exist, it's 'hg debugsetparent', but I do really think what you want to do is 'hg update -r null' followed by 'hg update -r whateverrevisionyouwant'
Ry4an