Need to add arbitrary files to existing repo

If you are having a problem using Fortress, post a message here.

Moderator: SourceGear

Post Reply
staggart
Posts: 7
Joined: Tue Jun 23, 2009 4:57 pm

Need to add arbitrary files to existing repo

Post by staggart » Fri Sep 25, 2009 10:22 am

Hi,

I have some automated build scripts which want to add and replace files in a subtree of a repo. Here's the problem. The first time ever through this script I can do an ADD of a complex folder containing subfolders, etc. and all is well - fortess does the add. The second time through, however, the add fails because [some of] the files exist. This make sense. The logical steps to take would be to do a checkout of the existing files and then check them back in. Here's the rub. In this folder hierarchy I may have added an arbitrary bunch of files (which I don't easily know the names of). So, I somehow need to do a checkout on the files that exist (which I can easily do in fortress with one command) but how to I arbitrarily ADD the "new" files - I don't want to have to find EACH new file and do a separate ADD (that is slow and a whole bunch of scripts). I'd rather have the equivalent of "ADD <some_new_option> *" where the the ADD would be smart enough to replace the existing files and add the new ones. I also don't want to first DELETE the subtree from the repo either since I then lose its history. How can I did this easily in a nested folder hierarchy using fortress script commands?

Thanks.

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: Need to add arbitrary files to existing repo

Post by Beth » Fri Sep 25, 2009 4:34 pm

You could try the function Detect New Files to Add. That is under the File menu in the Fortress GUI client.

On the ones that already exist, you would check out the files, dump the new files on top, and then check them in. If you already have a renegade status, then you can just check out and check back in.
Beth Kieler
SourceGear Technical Support

Post Reply