The Commands

This chapter describes the available commands for handling your projects.

Checkout a Working Copy

To work on a project you need a working copy. You create a working copy by checking it out from a repository. There are two ways in subcommander to do this: from a repository item or from a working copy item. Normally you checkout from a repository item in the Project Folder View.

Checkout from a Repository Item

To checkout a working copy from a repository select a bookmark in the Project Folder View or an item in the Repository View and choose checkout from the context menu.

You can enter a Working Copy Path or select one by using browse Filesystem. You can not edit the repository URL. It is filled with the URL of the selected repository item.

By default subcommander checks out the head revision from the repository. If you need another revision you can select it from the Revision control.

Enabling Add To Project tells subcommander to add the new working copy to the current Project. The working copy name will be the last section of its path.

Figure 2.6. subcommander Checkout from Repository Item

subcommander Checkout from Repository Item

Checkout from a Working Copy Item

Selecting a working copy item in the Project Folders View normally shows the status of the working copy. In case your working copy path is just a path and not a real working copy, for example because you didn't select an existing working copy but an empty folder in the project setup, subcommander will ask you to checkout a working copy.

Figure 2.7. subcommander Checkout from Working Copy Item

subcommander Checkout from Working Copy Item

The working copy path is filled with the path from the selected working copy item. You can't modify it. This time you can only select the Repository URL you want to checkout. The repository URL is populated with the trunk, branches and tags URL you have configured in the project. You can modify it or select another URL from the browse Repository button.

Export from Working Copy or Repository

You can export from a repository URL or from a working copy path. Select the Source URL or Path in the project folder view or a folder in the Working Copy View and choose export from the context menu.

In the export dialog you can enter the Destination Path for the export. You may also change the Source Revsion or change the EOL style.

Figure 2.8. subcommander Export Repository or Working Copy Item

subcommander Export Repository or Working Copy Item

Update a Working Copy

To get the latest changes for your working copy from the repository select the working copy item in the Project Folder View and select update from the context menu or from the WcFolder menu.

If you want to update a working copy to a specific revision use update.. instead of update. update.. will open a dialog where you can choose the revision. The dialog based update is also available in te working copy view on individual items.

Add, Delete and Revert Items in a Working Copy

You can add new items (files or folders) to a working copy, delete items from a working copy and revert items (undo changes made to an item) simply by selecting them in the Working Copy View and choosing the corresponding add, delete or revert item from the Wc menu.

All three commands honor the current Recursive setting (see the section called “Tool Bar”).

Add Items to a Working Copy

Unversioned items are displayed as unknown in the Working Copy View (see Figure 2.4, “subcommander Working Copy View”). Select the unversioned item and choose add from the context menu or the Wc menu to add it to the working copy. You can select multiple items to add them in one step.

After reloading (using the R tool bar button, see the section called “Tool Bar”) the Working Copy View subcommander shows the added item(s) with a blue background.

Adding a folder will recursively add all sub items of that folder.

Delete Items from a Working Copy

To delete an item from your working copy select it in the Working Copy View and choose delete from the Wc menu. You can also select multiple items to delete them in one step. Since by default subcommander shows only modified items in the Working Copy View you may need to toggle the View All button in the tool bar (See the sidebar Recursive and View All in the section called “Tool Bar”).

Deleting an added file does not only remove it from the working copy but it also deletes it from the file system.

From time to time your working copy will contain unversioned items you don't want to add to version control and you don't want to ignore. You can remove those items (files or folders) in the same way but note that you won't be able to restore them.

After reloading the Working Copy View the deleted items (when they were versioned) are shown with a red background.

Revert Items in a Working Copy

You revert a modified item (green background) back to its unmodified version by selecting it in the Working Copy View and choosing revert from the Wc menu. You can select multiple items to revert all of them in one step.

Reverting an added item does only remove it from the working copy. It does not delete it in the file system.

Reload the Working Copy View to update the working copy status. The reverted items are no longer shown as modified.

Rename Items in a Working Copy

You rename an item in a working copy by clicking it a second time after selecting it in the Working Copy View. The item will change to edit mode and you can modify its name. Press enter to execute the change or escape to cancel it.

Note that the change is not visible before you reload the view.

Rename Items in a Repository

Renaming an item in a repository is as simple as renaming it in the working copy. It is done by in-place editing its name. Press enter to execute the change or escape to cancel it. The only difference is that subcommander will ask for a commit message.

Note that the change is not visible before you reload the view.

Move and Copy Items in a Working Copy

To move items in a working copy select them in the Working Copy View and drag them to the destination folder in the Working Copy View. After dropping on the destination folder reload the Working Copy View to update the status.

To copy the items instead of moving them hold down the control key while dropping them.

Move and Copy Items in a Repository

Moving and copying in a repository works in the same way as in the Working Copy View: by drag and drop. The only difference is that you can only move single items in the repository (which is currently a limitation of subversion). Since this operation takes place in the repository subcommander will ask for a commit message after dropping the item.

To copy an item instead of moving it hold down the control key while dropping it.

Import into the Repository

To import new files and folders into a repository select the target Destination URL in the Repository View and choose import from the Repos menu. Enter the Source Path to the folder you like to import. You can browse the file system with browse Filesystem.

To import a single file you need to add the name it should have in the repository to the Destination URL.

Figure 2.9. subcommander Import to Repository Item

subcommander Import to Repository Item

If you select a folder as the source the import will add the files in the selected folder to the Destination URL. You have to add the folder name to the Destination URL if the import should include the folder itself.

View File Differences in a Working Copy

You can review the changes you have made to an item by selecting it in the Working Copy View and choosing diff from the context menu.

In case the item is a file subcommander runs submerge to display the original and the modified version of the file side by side. In case it its a folder subcommander will display the modifications as a patch file. Submerge is described in Chapter 3, submerge.

Commit Changes from a Working Copy

You have several options to select the items you like to commit to the repository. You can select a working copy bookmark in the Project Folder View or in the Working Copy View to commit all changes below that folder. You can also choose them by selecting multiple items in the Working Copy View.

After you have selected the item(s) you like to commit, choose commit from the context menu. The commit dialog opens and you can set the Commit Options and enter a Log Message that describes your changes. The Commit Log History keeps your latest commit messages. Selecting a message from the history appends it to the current log message.

Any changes to the commit options have to be done before triggering List Items. Finally, choosing Commit does transfer everything to the repository.

Figure 2.10. subcommander Commit Dialog

subcommander Commit Dialog

Create Folders in a Working Copy or a Repository

To create a new folder in the working copy or the repository select the parent folder of your new directory in the Repository or Working Copy View. You may need to toggle recursive and view all to navigate to the parent folder (see the sidebar in the section called “Tool Bar”). Then choose mkdir from the context menu and enter the name of the new folder.

If you create a folder in the repository subcommander will ask for a commit message.

Figure 2.11. subcommander Mkdir Dialog

subcommander Mkdir Dialog

Set, Edit and Delete Properties in a Working Copy

Setting, editing or and deleting properties is done from the properties dialog. You open the dialog by selecting properties from the context menu in the working copy view.

On its left side the dialog lists the current Properties of the item. By selecting a property from the list its value gets displayed in the Property Value field on the right side.

Figure 2.12. subcommander Properties Dialog

subcommander Properties Dialog

To change a property value edit the Property Value and press Set Property Value to store its new value.

To add a new property select or enter its name in the New Property field and press New. The new property name is added to the properties list. To actually set the new property enter a value and press Set Property Value.

If the item on which you add or change the property is a folder you can select the recursive flag to set the property on all items in and below the folder.

You delete a property by pressing Delete Property after selecting it from the properties list.

Add Items to the svn:ignore Property

If you have some files in your working copy that are needed or generated by your build environment and which are not under version control they are displayed as unknown items in the Working Copy View. You can hide those items in the Working Copy View by ignoring them.

Select the items you want to hide and choose svn:ignore from the context menu to hide them. You can select multiple items at any depth. Subcommander adds each item to its parents svn:ignore property.

To temporarily unhide the ignored files toggle the View Ignore button in the tool bar (see the section called “Tool Bar”). To unhide an item permanently remove it from its parent folders svn:ignore property (see the section called “Set, Edit and Delete Properties in a Working Copy”).

Create Branches and Tags

You create a branch or tag by selecting the source folder in the Repository Folder View and running branch or tag from the context menu.

The Source URL is filled with the selected item. The Destination URL is filled with the branches URL from the Project if you choose branch and with the tags URL from the Project if you choose tag. You only need to enter a Branch/Tag Name for the new branch or tag. If necessary you can specify a Revision for the source URL.

Figure 2.13. subcommander Copy Dialog

subcommander Copy Dialog

Switch a Working Copy

You switch your working copy to a branch or tag by selecting the branch or tag in the Repository Folder View and then running switch from the context menu. Your working copy gets switched to the head revision of the branch or tag.

Subcommander does request a confirmation so you don't switch by accident.

View History of Repository Items

To view the history (commit (or log) messages) of an item select the item either in the Project Folder View, the Repository View or the Working Copy View. Then choose log from the context menu to open the log dialog. The log dialog is explained in the section called “The Log Dialog”.

Merge into a Working Copy

Merging changes into a working copy is done with the Merge Dialog. Select the Merge Source in the project folder view and choose merge from the context menu to open it. In the dialog you can select the Source Revisions and the Merge Destination working copy.

The peg revision is only available if you use a single Merge Source. It will be disabled if you want to merge the differences between two Merge Sources, for example two tags, into a working copy.

The easiest way to merge a number of known revisions into a working copy, like merging bugfixes from trunk to a branch, is to open the log dialog on the Merge Source. Select the revisions you like to merge and choose merge from the context menu. This will open the Merge Dialog with already filled revisions. You just need to press Ok in the dialog to make the merge happen. This is described in more detail in the section called “The Log Dialog”.

Figure 2.14. subcommander. Merge Dialog

subcommander. Merge Dialog

Resolve Merge Conflicts in a Working Copy

If you need to resolve conflicts caused by merging changes into your working copy select the file in the working copy view. Choose edit conflict from the context menu to run submerge and resolve the conflicts. See the section called “Merge” for a description of merging a file in submerge. TODO mention the temporary files used to do the three way merge.

After you have resolved the conflicts you have to tell subversion that you resolved the conflict. To do that run resolved conflicts from the context menu on the same file.

View Blame Information

Sometimes if you like to know who or when a line in a file was changed the last time run blame on it. Select the file in the working copy view and choose blame from the Wc menu.

After running the blame you can see the previously mentioned information. You can restrict the information to a revision range by modifying the Start Revision or the Stop Revision. If a line was changed the last time before or after the given range the blame won't list the revision, date and author info for it. The columns will be empty.

Figure 2.15. subcommander. Blame Dialog

subcommander. Blame Dialog

Cleanup a Working Copy

Cleanup cleans up the working copy and removes working copy locks that have not been removed by previous commands. This usually happens if a command stoped because of errors.

Lock and Unlock Files

To lock working copy items in the repository so no one else can modify them select the items in the working copy view and run lock from the Wc menu.

In the same way use unlock from the Wc menu to unlock the items again.

View Differences between Repository URLs

Typically there are two scenarios for running a diff on a repository. First a diff between two different revision of the same URL. For example comparing the latest trunk with the trunk as it looked like a few revisions earlier. Second a diff between two different repository URLs. For example to view the differences between two tags.

Differences between two Revisions of the same Repository URL

To run a diff between two revision of a single repository URL select the corresponding repository item in the Project Folder View and select diff.. from the ReposFolder menu.

Figure 2.16. subcommander Diff Dialog

subcommander Diff Dialog

In the Diff Dialog you can set the two revision you like to diff. If you are done run Preview to show a list of the modifications between the two revisions. By double clicking an item from the Preview List you can run submerge to visually display the differences. Note that running submerge will only work on text files. By running Patch you will see a patch file of the differences.

The Text Status, Property Status and Folder/File columns show the type of modification and if an item is a folder or a file. The two status columns use the same codes as used in the Working Copy View. The Folder/File column contains an 'F' if the item is a folder and is empty if the item is a file.

You can also run the diff between two revision from the Log Dialog (the section called “The Log Dialog”). The advantage is that you don't have to enter the revisions manually. You simply select the two revision from the revision list and run diff.

Differences between two different Repository URLs

Running a diff between two URLs requires to select the two URLs. You can either run diff and then select the second URL from the diff dialog using browse Repository or you can select both URLs in the Project Folder View.

Select the first source URL normally by left clicking the repository item. To preselect the second source URL hold down the CTRL key and right-click the second repository item to open the context menu. Then select diff.. to open the diff dialog und run Preview to see the differences between the two URLs.

This is a bit unusal but the Project Folder View can't currently use the typical multi-select option because it interferes with the normal handling.