Xcode SCM - Need help with checking files back in! - iphone

Okay, I have another newbie question. I'm starting to work with a remote code repository, remotehosting.com, and have been given a username, password, and URL. I've been able to successfully associate my project with a remote source code repository, have checked out/pulled down the source files, and have now made a small change to a single file. Here's where my questions start.
1) I can't see anywhere in my GUI where Xcode realizes that I have made a change to a file
2) How do I check my files back in?
I gotta be missing something. The docs I've been reading point to more menu items that I currently see under my SCM menu item. Anybody have any ideas? Thanks in advance for your assistance!!!

File -> Source Control -> Commit, Select the files that you want to commit, add a comment and hit commit button.
This is the flow for xcode 4

In Xcode 3...
The Project window should have a column which displays the SCM status for your files. This can appear both in the "Groups & Files" outline view in the left pane and the file list in the right pane. The icon for the column is a little cylinder shape, a black-and-white version of the yellow cylinder that's shown when you manage repositories. If this column is not displayed, you can right-click on the header of either of those panes to bring up a menu with a list of columns. Select "SCM" from that. The status will display as the same one-letter codes that SVN uses on the command line.
In order to commit files, you can either a) select the particular files, or group you want to commit and use the menu command SCM>Commit Changes..., or b) Select SCM>Commit Entire Project... (which I personally have bound to ⌥-⌘-C in the Xcode key bindings preferences).
Either of these will display a sheet in which you can enter your commit message; the text field in this is very handy in that it accepts the Return key as a newline, rather than passing it to the "Commit" button, but could be confusing the first few times. Press ⌘-Return to activate the button and perform the commit.

Related

How to view inline diff of multiple files at once in VS Code?

In VS Code, for a given commit I would like to see inline diffs from all files in one view or page, so that I would not have to click to see diffs for each file separately.
I can't find any extension that would do this.
Basically I'm looking for a feature like there is in Bitbucket when you click on a given commit, and you see all the differences in one page. Something like in the picture below.
in the SCM bar you have a COMMITS view
context click a commit and Select for Compare
context click another commit and Compare with Selected
Now in SEARCH & COMPARE view you can click a changed file and see a diff

Asterisk beside files in Team Explorer, changes panel

We use AzureDevops. In Team Explorer, the changes area shows the modified files to check in. Some have an asterisk beside them. What does the asterisk mean? I think they are files that have been touched / modified, but are still identical to the ones in the git repository. Is that correct? They are definitely saved, unlike the asterisks on file tabs.
Some have an asterisk beside them. What does the asterisk mean?
Normally the asterisks in changes panel should correspond to the asterisks on file tabs. See:
The asterisk besides Program.cs file change panel means that we've done some changes to Program.cs file in solution explore while we haven't save this change in file system.
Normally if we click the Save All(Ctrl+Shift+S) button, then the asterisks should disappear both on file tabs and in Changes Panel. If that doesn't work well in your current project, save all changes and then restart VS or reload the project to check if the issue goes away.

Eclipse - Showing changes before saving

I run into this problem a lot. Sometimes I would edit and forget about it in Eclipse or maybe keyboard moved randomly and input random characters. How do I view current changes compared to the last save easily in Eclipse? That way, I would know what changes took effect before I save.
If you just want to see what lines have changed, then you can follow the instructions in this answer in order to show a highlight of the changed lines on the left-hand side of your editor.
Aside from that I don't think it's easy to tell what's recently been changed without saving. If you do save then you have the option of comparing with the previous version: right-click on the file in the tree and choose "Compare With -> Local History" and then choose a version you saved earlier.
If you save it you can also compare against what's in source control, of course. You are using some sort of source control?
You can use either
compare editor-show changes between 2 or 3 files by showing each file side-by-side
First select the files on the Project Explorer with control-click.
Now right-click -> Select Compare With / Each Other.
or
Quick Diff - General > Editors > Text Editors > Quick Diff

Eclipse with Subversive - regular svn diff view

Previously I've used command line SVN without any wrappers.
Few days ago I switched to Eclipse with Subversive and have problems with diffs.
Team Sync perspective with Compare view is OK, but it displays whole file, not just changes.
Where I can find something similar to "svn diff" output? I need only changes.
Eclipse Compare views show the entire file which makes sense, as its a GUI. In the Compare view, there are buttons in the top right that enable you to skip from diff to diff (down and up), and the right-hand margin shows locations. So, while its not exactly the same as the command-line, its just as functional. Also, it gives you context for the changes, not just the changed line.
If you need to output a report, that's a little different. You might be able to just click int the top pane, type Ctl-A to select all, Ctl-C to copy, and then paste into a text editor. That might give you just the changes.

perforce label does not list files

I created a label using the new label context menu:
I defined the parameters as follows: (unlocked)
Label:
ms_test
Description:
Created by ms
view:
//depot/Projects/Shared/...
//depot/Projects/AddIn/...
The label is created and shown in the label pane but when I select the label and click on the "List files at ms_test" menu item the log message states "Label ms_test points to 0 files".
Any ideas about why the label is not pointing to any files? How can I make this label to work?
thank you in advance.
Note: I have checked that the view paths are correct and there are file contents and subfolders under then.
I am using P4 client version 2006.1.105584 with no filter on the depot and my client is set to client view of the depot
That means no p4 labelsync or p4 tag commands occurred after the p4 label took place.
Did you create the label as described here?
The following instructions apply to the Windows client (P4WIN) only.
Click the label toolbar button to show the labels page.
Make a new label (right-click in the list); Give it a useful description.
Restrict the View to that needed by the project being labelled (See Using Wildcards and - - Excluding Files for examples).
Drag the project files from the depot over to the label;
Select Add/Replace Files Listed in Label… from the popup menu.
Perforce will open a dialog offering to replace the contents of the label.
Click Ok to add the files.
Even if your label currently references no files, you still can sync it with files:
Select the label from the Labels pane
Right-click to bring up the shortcut menu
Select Sync specific files to bring up a sync dialog
Click Select All
Click Ok
I suspect VonC's answer is pointing in the right direction. On a sidenote, it is worth pointing out that Perforce Labels are badly named and work very very differntly to Labels in virtually any other SCM system.
From the Docs
A Perforce label is a set of tagged file revisions. You can use labels to reproduce the state of these files within a client workspace.
Labels provide a method of naming important sets of file revisions for future reference. For example, you might want to tag the file revisions that compose a particular release with the label release2.0.1. At a later time, you can retrieve all the tagged revisions into a client workspace by syncing the workspace to the label.
Create a label when you want to:
keep track of all the file revisions contained in a particular release of software,
distribute a particular set of file revisions to other users, or
branch from a known set of file revisions.
Essentially what this goobledygook means is that whereas most people use Labels to do exactly what a Changelist number does (eg. Mark a particular point in time) it infact marks the set of files currently synced to in a particular client. This is a bizarre quirk of Perforce and possibly the worst design decision they made in an otherwise wonderful product.
You are probably better off taking note of the changelist number you want (generally the latest at a point in time) and the paths you wish to sync to , that is all the information you need to sync to a point in time.
As of Perforce 2010.1, the correct way to do this is using automatic labels, which are really just a way to name a changelist.