Re: SCM: Saving Compare-to-Revision
Re: SCM: Saving Compare-to-Revision
- Subject: Re: SCM: Saving Compare-to-Revision
- From: Andrew Pontious <email@hidden>
- Date: Mon, 5 Nov 2007 12:52:32 -0800
On Oct 31, 2007, at 5:06 PM, Fritz Anderson wrote:
Summary: In Xcode 3, when you select SCM -> Compare With ->
Revision, you get a file-merge window containing the specified
revision and what appears to be the working copy of the file.
But edits to the apparent working copy can't be saved.
This seems to defeat the purpose of the command. How can I do what I
want to do? Or should I report this as a bug?
The Xcode SCM comparison window in Xcode 3.0 is not yet as full-
featured as the comparison window in FileMerge.
Much more is planned, but for Xcode 3.0, it is primarily meant to be
an in-app convenience for looking at SCM diffs, not a full-featured,
integrated editing environment.
For one, unlike in the refactoring window (which is the other place
this UI is employed in Xcode 3.0), you can't edit the contents of the
right-hand side other than by flipping arrows.
For two, the window does not represent the original file in the way a
regular Xcode editor does. Under the covers, the documents on the left
and right-hand sides of the window are actually temporary files. This
is why Cmd-S doesn't work, and why modifying the contents of the right-
hand side document by flipping arrows doesn't affect the original text
file.
To save the right-hand document in the Xcode SCM comparison window, go
to the File menu and hold down the Option key. You'll see the option
"Save a Copy As", with the keystroke shortcut Command-Option-Shift-S,
become active. (There is no way to save the left-hand text contents,
other than by copying it and pasting it into a new document.)
It's unfortunate in this case that "Save a Copy As" and "Save As" were
combined into one menu item, with the latter being the default option
shown, because only the former is possible in this window, so it's not
an easily discoverable option. The Xcode documentation will be updated
at some point to describe all this.
If you want editing and comparison combined, you should probably
switch back to using FileMerge for now. This option is available in
the Xcode preferences window, SCM toolbar icon, Options tab, "View
comparison using:" popup button.
-- Andrew
On 30 Oct 2007, at 4:35 PM, Fritz Anderson wrote:
Xcode 3.0 on Leopard.
Suppose I have a project under version control by Subversion. It
contains FileA.h, of which there are several revisions. I have
revision 10. I want to bring parts of the file back to the way it
was at revision 5.
I select SCM -> Compare With -> Revision..., and I select revision
5 from the resulting sheet.
A comparison window appears, and I use the arrows in the middle
gutter to pick and choose among the differences.
What do I do now? Command-S results in a beep. Closing the window
results in a "Save All" dialog (odd); if I press the save-all
button, a save-file sheet appears briefly on the comparison window,
which promptly disappears. My working copy for FileA.h is unchanged.
I'd have expected the comparison window would have been between the
revision-5 version of the file and my actual working copy. This
seems not to be the case, and I must do a Select All on the edited
text, and paste it wholesale into my working copy.
Do others find this to be the case? Should I try killing my old
preferences file? Is there a way to do what I actually want? Is it
a bug (which would surprise me)?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden