Xcode for the Rest of Us, Part II
Pages: 1, 2, 3
The Hidden "What If"
But wait--there's more (cue the Ginsu knives)! Pull up the slider from the bottom of the screen. What do you see? It reveals your "what if" scenario, should you take the highlighted difference and apply it to your original text file!
Figure 14. Your "what if" scenario graphically revealed
Merging Directories
If we can do this with individual files, what about directories (UNIX-speak for folders)? Of course! Here are two folders with a few differences between the two:
Figure 15. Two directories with a few differences
Let's see how we can compare the directories quickly. Do what you did before--drag and drop each directory into its own well, and click Compare.
Figure 16. Picking two directories for comparison
After initialization, you see a different view of the folders' contents:
Figure 17. Folder content comparison
You can filter out what is identical from one to the other, or show which files are different from one to the other (the Added/Deleted checkbox). You can choose to combine, remove or unmark files using the drop-down menu. I will chose to combine the files by highlighting them, and save all of the files with a new name:
Figure 18. Your directory merge choices
Let's see if that worked:
Figure 19. Creating a new directory from two merged directories
We Rock!
Figure 20. The merged directories as a new directory
Go ahead and get all those files merged and then put them in new merged directories--then go home to a great dinner. First, check your email. It's your boss again, asking if you make certain "things" happen when people launch Safari or other applications. You think, "Is he nuts?" He might be, but you can make applications sit up and beg--with Property List Editor. Tune in next time for more fun with Xcode tools.
Shelley Weiner is president of Business Rules, Inc., a technical training and Macintosh consultancy located in the beautiful Hudson Valley of New York State. She is an Apple Certified Trainer, an Apple Certified Systems Administrator, and a member of the Apple Consultants Network.
Return to the Mac DevCenter
You must be logged in to the O'Reilly Network to post a talkback.
Showing messages 1 through 4 of 4.
-
Xcode integration?
2006-05-25 20:49:12 hellokopter [Reply | View]
This is nice, but isn't there some way to automatically have Xcode pull up File Merge whenever it asks me to save a file (or maybe to check one into CVS)? I'm pretty sure I've seen Apple guys do this at WWDC demos.
-
XCODE made easy!!
2006-05-18 10:42:59 stefanburt [Reply | View]
I always wondered if there were functions xcode could offer me with regard to workflow issues so its nice to get practical useful answers.
I really wish I knew what filemerge could offer ages ago it would of helped me no end and helped with tasks such as achieving !!
Great articles "mine eyez are a opening" :)
-
Screen Shots
2006-05-06 09:22:14 rayola [Reply | View]
Good article, but you should really be sure your Terminal's transparency is turned off. It's really, really difficult to read that green text against your desktop.
-
opendiff
2006-05-03 01:24:56 vermeer [Reply | View]
Great article. Only thing I don't understand is, why try to use `opendiff' to open filemerge. `opendiff' takes the files that you want to compare as its arguments. If it is opened through the finder, the terminal session that is started first exits and then displays error messages: `2006-05-03 06:50:19.269 opendiff[20971] too few arguments
2006-05-03 06:50:19.765 opendiff[20971] usage: opendiff file1 file2 [-ancestor ancestorFile] [-merge mergeFile]'
I suggest instead, take the highway: Type `fil' into the spotlight window, et voila!





