8

This should be an RTFM question, but I just can't find it!

I just started using StarTeam at work and I'm trying to initialize a repository that I have been managing with Git. I've managed to add the folders to my view, however, I can't seem to check in all the files. I don't think anyone will notice the extra Git information so, does anybody know how to add all files and folders to StarTeam recursively? Command line would be fine, I'm getting tired of fighting with the client.

If it's important, StarTeam 2006 Release 2

IslandCow
  • 3,412
  • 3
  • 19
  • 24

3 Answers3

9

First, add the folders.

Right-click the parent of the top folder, click "New...", type the top folder name, and complete the wizard. Sub-folders will be added by default.

Next, add the files. Click the parent folder. Click the "Show all descendents" toolbutton to the right of the <All Files By Status> combo. All files will show. Multi-select them, right-click, and click "Add Files..." on the menu.

Craig Stuntz
  • 125,891
  • 12
  • 252
  • 273
  • 2
    Ooooh. That's what that button does. Thanks! You just saved me hours of mindnumbing effort. – IslandCow Aug 25 '11 at 22:11
  • 1
    Keep in mind that if you do this, and you have folders that you would normally exclude, like bin, obj, release, debug, etc. - it will still add those to the view, and then you'll be wondering why their contents are not being ignored in the file list view, so I guess you just have to go back and delete the folders you want to ignore. – statikuz Mar 07 '13 at 20:13
  • @statikuz: Just remove those folders inside the wizard. – Craig Stuntz Mar 07 '13 at 21:09
  • Thank so much..!! Saved hell lot of time..!! Will award the bounty in 23 hours (and counting)..!! – Gokul Nath KP Jan 09 '15 at 07:34
3

This is a pretty old question, but I just had to solve a similar problem. You can do that using the stcmd command line tool. Create a shell script like the following one to do that.

starteamPath="user:password@server:port/project/view/starteampath"
projectFolderPath="/path/to/project/folder"
projectFolderName=`basename "${projectFolderPath}"`

cd "${projectFolderPath}"
cd ..

# add folder projectfolder and all subfolders
stcmd add-folder -p "${starteamPath}" -is -fp `pwd` -name "${projectFolderName}"

# add all files from all subfolders
stcmd add -p "${starteamPath}/${projectFolderName}" -is -fp "${projectFolderPath}" -EOL OFF "*"

# check in all files of status updated an unknown
stcmd ci -p "${starteamPath}/${projectFolderName}" -filter MU -o -EOL OFF -r "${checkinMessage}" -is -fp "${projectFolderPath}" "*"

I think you can use -exlist or -exfileto exclude your git folder.

I'm using Starteam 2009 v11.

orkoden
  • 18,946
  • 4
  • 59
  • 50
0

You can also do this more selectively by choosing to Add folders from the Folder tab rather than create new Folders using the wizard and excluding certain folders. To do this display the Folders tab (new as of 2006 I believe) and All Descendents, and then select the folders you wish to Add, and then right click and choose Add. This will make it easier in large nested folder trees to exclude folders that you don't want to add, though as a tip you should make sure to display your folders by Local Path, otherwise it will display them by Name which will be very confusing.

One thing you may want to keep your eyes open for in the future is the ability to reconcile your local workspace with the server and then choose your actions and commit everything in a single operation (change package). This is similar to the approach that you are using in the View Compare/Merge tool, but in this case you are comparing a View with your local Working folder instead. As a result of this you should be able to see both the folders and the files that need to be uploaded to the server, check that everything is okay, and then commit everything together.

You may want to check with StarTeam Support/R&D or your account rep to see if this capability is still on the road map but I believe this was a planned feature when I last discussed it with them.

paulyphonic
  • 854
  • 1
  • 6
  • 15