Star Team find modified files for a project - starteam

We recently switched from clear case to star team. In clear case, we had a feature that for one project, we could select option 'Find Checkouts' which would show all the files checked out.
For starteam, is it possible to know all modified files for a particular project?
Thank you.

On the toolbar there is a button with a tooltip of "All descendants." Enable it. To the left of that is a dropdown. Choose "<All Files By Status And Folder Path>." In the folder area on the left, select your root directory. That will group all files in the working tree by current, not in view, modified, etc.

Related

Xcode 5.0.1: How to make folders appear on top of files in the Project Navigator

I've just started using Xcode and discovered that folders are mixed with files of the same level alphabetically.
Is there a way to have folders displaying on top and then files of the same parent folder? Just like in TextMate's FileBrowser.
Current displaying is:
I want it to be:
Thanks in advance.
Changing the MacOS Finder preferences will cause XCode to also display folders before files at the same level.
Find and check the checkbox under Finder -> Preferences -> Advanced labelled Keep folders on top: In windows when sorting by name.
Restart XCode and you will find the new sort order is honored.
Just mouse-down on an item and move it. The file or folder level can also be changed this way. You can make folders from the menubar :File:New:Group".
I see that you are using folder references, not groups. If there is no specific reason to use folder references then change to use groups. When dragging in a folder of files there is the option of folder references or groups. Since folder references are a mirror of the directory structure and can not be changed in Xcode. I suspect the OP really wants groups.
When you are at the very bottom you can drag horizontally to select the level to move to. See added image.

xcode 4.x.x Project Navigator - use real folders

Is there a way to make xcode use real folder hierarchies in the Project Navigator?
I'm finding these pseudo folders somewhat annoying because they do not reflect the project on disk.
Or at least have the xcode-made-folders a different color than the real folders?
Thanks.
Not really, although they are colored differently.
You have groups (yellow) -- which can refer to a directory, but does not update automatically to reflect what's on disk. Groups can also represent a group which has no relation to a directory or the structure of its contents.
You also have a reference (blue). This updates automatically, but its contents are not first class project items.
Personally, I just structure projects such that they can be (re)constructed from an on-disk representation easily (e.g. drop the folder), or in another IDE. Quite often, details which could (unnecessarily) be defined in Xcode are moved outside of the xcodeproject. Synchronizing the representation in the Project Navigator is about as easy as drag and drop once you work out how to structure the program/sources/targets.
Edit: I am referring to the Project Navigator. Whether what you refer to as the "project organizer" means the Project Navigator or some part of the Organizer, I am not sure.
Making a folder structure mimic your Project Navigator group structure:
For this procedure, as always, make a backup of your whole project folder before doing this (a zipped Archive in Finder does nicely).
What you want is easy to set up for new files added to or created by the project, but it can be a mess if you already have a lot of files in the groups you want, but not in the disk folders you want.
If you hilite a group in Project Navigator, move your attention over to Utilities pane > File Inspector > Identity. The key area is dealing with Paths. The popup will give you various relative paths to the default location of the group's files, and Full Path will always give you just that. In a fresh project you'll find that any groups created all have the same location assigned.
Now the key here is the little window icon button just under the popup (to the very right). If you click that you can choose a (folder) location for files in that group. If you already have files in that group they will not be moved to the new location, but will instead turn red in Project Navigator because the files on disk are not in the newly assigned path for the group, but moving them into the folder you just set up for the group should fix you back up.
(Tip: The little arrow button is a shortcut to "Reveal in Finder")
Now, when you make a "New File...", after selecting what type of file you want (Next), then configure whatever setting apply for that type (Next), you're presented with a sheet asking where to place the new file(s). If you have that group selected in Project Navigator before you begin this process, it will already be selected as the item in the "Group" popup at the bottom of the sheet, and the folder associated with that group will be selected in the file browser. If you decide you want it in a different group (I do that all the time because I won't have the proper group selected in Project Navigator before I get to this point), just change it in the Group popup at the bottom and the file browser will change to the folder associated for the group you just selected.
If you later make a sub-group of a group in Project Navigator, it will default to the path of the parent group. If a sub-group already exists when you set the path of the parent group, the paths for any existing sub-groups will not move with the parent.
Avoid duplicate files: If you want to move existing files into another group (that already has a path assigned to it) and also move the files into the group's folder on disk, you have a choice at this point. You can go ahead and delete them from Project Navigator, making sure you only delete the reference to them and move on to the next step, or as an option, you can actually move them in Project Navigator to the group you want them in (this doesn't change disk location of the files -- the folder associated with the group only applies to new files for the group) and use them as a guide for what still needs to be dragged in from the Finder. This can come in handy if you are going to be moving a lot of existing files around, as you'll see in a moment.
Now, in Finder, manually move some files into the folder that they should end up in (the folder associated with the new group). If you moved them over in Project Navigator (instead of removing them), they will turn red because the actual files are not at the place they were, but this can be a guide (especially if you're moving a lot of files around) for what still needs to be set properly.
Now, you can drag and drop them from Finder onto the group that's associated with the folder where you put the files. In the dialog that comes up, it doesn't matter if the checkbox is checked or not for copy (if necessary), since they are already in place, but it IS important to make sure you have the "Add to targets" checkbox(es) checked.
If you deleted the files (remove reference only) from the old group you can go into the old group's folder in Finder and drag the files from there to the new group in Project Navigator, you will need to make sure Copy if necessary is checked, but this is where end up with duplicate files on disk… In both the old group's folder and the new group's folder. This is why you want to move them to the new location first in Finder before dragging them into the new group in Project Navigator.
If you left the red files in Project Navigator sitting in the proper group, after you add the same files onto the group (copy to group not necessary since they're already in the proper location) you will end up with new (black) references to the files as well as red broken references to the same files. At this point you can just delete the red files from the group without being asked if you want to delete the files or just the reference. Leaving the red files in the new group until you have the proper (black) files showing up alongside them in Project Navigator can help to make sure that you get all of your files back into the Project Navigator.
If you're only shuffling around a couple/few files, then once you have the files moved in both the Project Navigator and in Finder to the proper locations, you can select each red reference in Project Navigator and choose the path for that particular file (in the same manner as you assigned a folder to a group). But, if you're moving around a bunch of files, this can take a long time (you can only assign one at a time), so it's better to just drop them in from Finder.
One more gotcha to look out for… It's best to just leave everything alone that sits in the "Supporting Files" group, as well as MainMenu.xib, since these are all expected to be in specific locations according to the Build Settings.
Remember: Always make sure you have a backup first (things can get out of hand if you are shuffling a LOT of files around)... Just having a snapshot probably won't help since reverting to a snapshot won't move your files on disk back to where the originally were.

How can I see the change log of a directory with TFS?

I'm interested in seeing the latest changes that landed to a solution with TFS (I'm using Visual Studio). However, I can't seem to find the option: using View History on a solution or project brings up the history of the file itself. Am I missing something?
If you right click on folder the containing a solution in the Source Control Explorer window you'll see all changesets. It's obvious but I had to ask for it too. I am using TFS2010/VS2010.
Edit
Here are the steps:
Team/Connect to Team Foundation Server / select Team Project/ in Team Explorer dblclick on Source Control and in Source Control Explore right click folder containing your solution select View History and here you are.
The View History command will list you all the changesets where the file/directory was changed (add/move/content changed, deleted, etc.).
So if you do a View History on a .sln or .csproj file you'll see only the changes that were made inside the file's content, not on the "Visual Studio Item" and its related item.
To sum up, the View History command is only a File System history, there's not a smarter logic out there.
EDIT
The only way to know what changed inside a solution or project is to do a View History on the common denominator (i.e. the directory that contains everything you want to view history). But it'll still be a File System kind of History.
There's not Logical History for Solution and Projects in Visual Studio. For instance you can't know what files where added to a given project your viewing the history from two given versions. Or what projects were added/removed in the solution.
All the pieces are there (because all the changes are stored in the .csproj or .sln), but the feature itself that parses the content and retrieve the logic you want to see doesn't exist. (by the way, it's a great feature and I agree it should be there).
Bottom line: TFS/Visual Studio gives you two history system:
Based on the source control/file system, by displaying changesets.
Based on the source control/file system, by displaying labels.
That's all...
Right click on folder in solution explorer, and choose View History. Then you can see all the Changesets listed that apply to that directory. Then right click a particular changeset and choose Changeset details... to see what changes occurred in that changeset.

How to create new root folders in a Team Project source control?

I'd like to recreate a folder hierarchy like in this example (from TFS Branching Guide Main 2010 v1):
The problem is I cannot understand how to create additional root-level folders, like those Development and Release in the picture above, to put new child branches into. The New Folder command option becomes available only at levels beneath root-level branches.
How to create new root folders in a Team Project source control at the Main branch level?
Make sure that your workspace maps at the Team Project level ("StandardBranchPlan" in the picture). I just tried this, and found that "New Folder" does not appear if I have the wrong workspace selected, but once I select a workspace that maps the folder under which I want to create a new folder, "New Folder" became enabled.
Here is what I did.
Connect to the desired collection in Team Explorer.
Click the down arrow at the end of the "Connect" row.
From the drop-down menu provided select "Projects and My Teams".
Select "New Team Project".
And now you have a new "Directory" under the collection root.
You cannot add a folder to root in TFS to an unmapped as mentioned. However one good way to do this is with the following example.
Scenario:
You want to have a NEW Folder to contain many NEW Projects
Right click on your solution and Add solution to source control
At this point you can create a folder on root with say name of "WebServices"
Then you continue through with the popup in adding in your project/solution
For me this works fine, although I too would prefer the freedom to setup a folder structure ahead of time for myself and other developers without having to commit/check-in code etc.

Moving Files into a Real Folder in Xcode

When I started my project I was happy to use Groups in Xcode rather than literal folders: Since I'm using the browser in Xcode to access everything, stuff was nicely organized and I was happy.
However, now that the project is about to be shared for version control, the project folder itself is a horror show for those trying to scan it via a terminal, about 300 files, over half of which are graphics.
I'm trying to now reorganize things, creating real folders and importing them into Xcode. Unfortunately Xcode doesn't let me work with them the way it does with groups. For example, if I right-click on an actual added folder (blue, not yellow) and choose to add existing files, it doesn't actually put them in that folder, it puts them in its root.
Similarly, I can't move a file from a faux-folder (a group) into a real folder: Xcode doesn't consider the real folders to be valid places to move stuff to.
What am I missing? How can I convince Xcode to let me use the folders the way I use groups? There's an answer here to a somewhat similar question, but it doesn't actually solve my problem since I'm working with existing files.
A modern (and dead simple!) approach for 2017 (Xcode 6, 7, 8, and sometimes 9, since it does it automagically some of the time):
If you're moving a bunch of files into a new folder and are keeping the child hierarchy, it's actually a lot easier than moving each file individually:
Create new groups in the Xcode folder tree and organize your files into them however you like.
Create a matching physical folder tree in Finder and organize your physical files into them to match what you did in step 1.
All the references in Xcode should now be red (that's OK!).
From the Identity and Type manager, select the Group in Xcode that you want to relocate, then click the folder icon from the info pane:
In the Finder selection dialog, locate the equivalent new folder you created for this group in step 2. All the files inside that group will now be automagically rediscovered!
Isn't that nice? At most you'll have to repeat these 5 steps once for each new group you've created (which beats relocating each file individually!)
Bonus Points!
Say you accidentally screwed up the move and now a bunch of your files are red and can't be found: select multiple files that are broken, and using the same folder icon in the screenshot from step 4, find the correct folder that contains these files and they'll automatically resolve the missing paths.
FURTHER EDITED JUNE 2017: Xcode 9 does this automatically, no special effort required. This answer and Brandon's only apply to Xcode 8 and earlier.
EDITED DECEMBER 2016: Brandon's answer below is a better solution now. Back when this answer was created in 2010 this was the only option I could find. I now suggest Brandon's answer, below.
It turns out that moving files into real folders is certainly possible, though not as simple as it should be.
I got the basic information from a question here, Xcode organising files and folders (core data model objects - iPhone), but learned important things along the way.
##The Process
Moving the files is a two-step process with multiple sub-steps:
Tell Xcode where you want the files to be:
Right/Control-click on the file or file group that you'd like to move and choose Get Info from the contextual menu that appears. The Group Info or File Info window appears.
Click the Choose button on the far right side of the window in the Path area. A dialog box appears.
Navigate to the folder you want the files to be moved to. Create a New Folder if needed. Click the Choose button in the bottom-right corner of the dialog box, then close the Group Info/File Info window.
The names of the file/files in the group will turn red to indicate that Xcode can't find them in the place you specified.
Move the actual files
In the Finder (or Git) move the files you selected in step 1 into the actual folders you want them in.
Switch back to Xcode. The files/groups should all have turned black again. If any are still red then you've missed moving something to the right folder.
##Tips
I learned a couple of important things while adjusting the ~300 files in this project:
Some files refuse to move this way; that is, when you navigate to the new destination the Choose button is disabled, as is the New Folder button. The solution, though I don't know why it makes a difference, is to first use Xcode to put those files in a Group (right/control-click the files and choose Group, and give the group a name) and then move the group to the new location. After you're actually moved the files in the Finder you can remove them from the group (by dragging them into the new parent group/folder and deleting the group).
Stop and build every few minutes, after completing step 2 for a number of files. The build will tell you if you've screwed anything up so far, making it easier to go back and fix it before you've done too much damage.
If the files won't move to where you want them to — I had a devil of a time moving some files that had been created early-on in the Classes folder — you can simply drag them out of their old place in the finder to someplace handy like the desktop, delete references to them in Xcode, and then re-import them via the right/control-click Add Existing Files option.
If in the past you've used Xcode to delete references to files without also moving them to the trash in this project, you'll find files that don't have to be moved but at just sitting there. Be careful that you don't do what I did, confusing the names of a current group of files I was moving and the older, no-longer-linked files, insisting that Xcode import them because you thought it was being dense.
In Xcode 5 or Xcode 6:
Create the folders that map to your Groups in Finder
Move the files into those folders in Finder
Select each file that is red in the Xcode sidebar on the left
Click the button "Show/Hide Utilities" to reveal the right sidebar (see figure)
In "Identity and Type", click the tiny button and select the file location (see figure)
Cheers.
I've found the most reliable way to work around XCode's appalling design here is to organize ALL your files in Finder, for two reasons:
Finder doesn't make "mistakes", unlike XCode's GUI
Once things are organized in Finder, you can drag/drop entire Finder folders into XCode, and ... it does exactly what you wanted, with no effort
Even when moving existing XCode files around, it is quicker to do this:
Select the files in Finder
Create a folder in Finder for them
Drag/drop them to the folder (automatically Moves them)
Drag/drop the Finder folder into Xcode (automatically: creates the Xcode folder, adds every file in the Finder folder)
cmd-select every "red" file you now see in Xcode (because you moved them) and hit the delete key
NB: I never use the "create dragged folders with sub-groups" option, because in XCode 3 that was often hopelessly buggy and could corrupt projects. Apple clearly (IMHO) does NOT use this feature internally, otherwise it would never have been allowed to be so buggy; if Apple doesn't use a thing, it's generally not safe to use it either - they aren't good at testing :)
There is a simple to setup and use Command Line Tool - "synx"
available in github that do exactly what is needed here.
It reorganizes Xcode project folder in finder to match Xcode groups in project.
You can find it here:
https://github.com/venmo/synx
UPDATE:
XCode 9 supports this feature by default. So, no need to use other tools anymore!
Xcode 9
It seems Xcode 9 now supports it by default. When you move files from a group to another, the file will also be moved from the old folder to the new folder. This was announced in WWDC 2017.
I used the following tool to achieve it.Organize Folders in Groups Xcode
--no-default-exclusions
I'm usually move files to the directory directly in the Finder, then fix the files with red-color names in XCode in their "Get Info" dialog: click the "Choose..." button and select file's new locatoin. That's the first response when I want to move files in XCode, and it works.
As of Xcode 4.5 when you drag in a folder structure it is automatically turned into nested groups in the Project Navigator. Then, if you look on disk (e.g. right click and choose Show in Finder), the folder structure has been retained.
I found trying to fix things from an older project was just a pain. It turned out much easier to just delete these files and drag them in again.
To move a folder in xcode 4.5 I just...
Delete the files/groups from xcode and select "Remove Reference".
Go into finder and move the folder/files as needed.
Once done I go back into Xcode and choose File->Add Files to {ProjectName}.
Make sure "Copy Items into Destination Group's folder (If needed)" is checked
Make sure "Create Group for any added folder" is checked
Make sure "Add to Target" is checked for your project
Easiest technique for XCode 8....
Assuming you have files A,B,C in a logical group, but want them moved into a folder on your hard drive.
Create a destination folder via Finder
Add the folder in XCode (File -> Add Files ) using the Options pane to select a Folder Reference (not a group)
Drag files A,B,C from the (old) group to the (new) folder reference in the project navigator. XCode will move the files into the folder, both in the the project, and on disk.
Done.
On XCode 11 (I just validated this on XCode 11.6), you can select the files you would like to move under the project navigator, right click on the selected files, and click "New Group From Selection". This will create a folder on disk and move the files appropriately.

Resources