4. Working with your files

If you have already used TortoiseSVN, you will find the workflow associated with using Syncro SVN to be similar to that of TortoiseSVN. So in brief:

When you want to start work on a file you must remember to update your copy of a file before you start to work on it. If you forget to do this you may find that your copy is out of date and causes you to have a conflict between your revised copy and that found on the server. Please remember to update your working files before you start work!

Once you have finished working on a file, you should immediately return your revised version to the main repository. This will allow you to see your work on the preview web site.

The URL to do so is:

http://www.oucs.ox.ac.uk:81/folder name/filename .xml

For instance this document has a preview version found at:
http://www.oucs.ox.ac.uk:81/oucsweb/syncroclient.xml

You can also see our preview server when you are out of the building by using the secure version. So for the preview version of this document you would go to:

https://www.oucs.ox.ac.uk:4443/oucsweb/syncroclient.xml
(note the https and changed port number of 4443).

Exactly how to manage, edit, update etc your files is explained in more detail in the next few sections.

4.1. Updating your files

Before you start work on a file it is very good practice to update your working copy by synchronising with the main SVN repository. This will ensure that you have the very latest version of a given file on which to work, and reduces the chances of file conflict upon its return to the main repository.

To update your working copy using Syncro SVN client:

  • Navigate to the file you wish to edit on your machine through the Working Copy window
  • Right click on the file name to open the contextual menu
  • Select [Update] from the menu
  • The program will now update your working copy with the one currently in the server repository
  • The program will tell you if it has updated the file or not
  • You can now open the file for editing in oXygen

4.2. Open a file for editing

To edit a file in oXygen:

  • Right click on the file name in the Working Copy window and choose the [Open in <oXygen/>] option
  • oXygen will then open and you can edit the file as normal. (There are details about how to do this in the document entitled Using the oXygen XML editor .)
  • The final stage of your editing will be to save the latest version of the file you have been editing.

4.3. Commiting your changes to the main repository

The final part of the process is to return your changed file back to the server:

  • Find the file in the Working Copy window of Syncro SVN client
  • Your changed file should show a * icon. N.B. If you do not see the icon select the folder in the working copy window and press F5. This should force the client to refresh the folder view and the icon should now appear.
  • Right click on the file to open the contextual menu
  • Select [Commit] from the options
  • The Commit dialogue box now opens
  • Make a short note of what you did to the file in the Commit message box
  • Click on the Commit button
  • If this is the first time that you have attempted to commit a file back to the repository you will be asked for your SVN password before the file is accepted.
  • The Console will become active showing that your file is being returned to the server
  • If you see a box informing you that The file has been changed on the file system, click on the OK button
  • Go to the preview web site to check your file. If you are happy with the file, you can publish it to the live site directly from the Preview page. (in OUCS this is usually done using the publish button).

Publishing a file

  • Unless you have special access you can only publish files through the Preview web site.
  • At the top of the page that needs to be published there are a series of buttons, the most important of which is the red button p-file (means publish file). Click this button to publish the file
  • A new page appears stating that the file has been committed and that it is now live. You can either return to the preview page or visit the live one via links on this confirmation page

Publishing a directory of files

  • This is very similar to Publishing a file above but here you publish all files in a directory instead of a single file.
  • Go to the page which is inside the directory with new pages to publish
  • Click on the p-dir button (means publish directory) a new page opens listing all the unpublished files in that directory
  • Decide which files to publish and uncheck any that should not be published
  • Click the red Make the above changes to the website button
  • Your files are now published to the live server and are available for viewing
  • You will see a new page inviting you to return to the preview version of the page or to go and see the live version

4.4. Adding a new file

Sometimes you will want to add a new document to Subversion to be displayed on the web site. This is achieved by:

  • Navigate to the folder containing the new file using the Working Copy window of the Syncro SVN client
  • You will see that the new file has a small ? icon on it. N.B. If you do not see the icon select the folder in the working copy window and press F5. This should force the client to refresh the folder view and the icon should now appear.
  • Right click on the file to bring up the contextual menu
  • From the menu select [Add]. You will see some activity in the Console window and the overlaying icon on your new file will change to a small + icon
  • You can now submit this file back to the main Subversion repository. Right click to bring up the contextual menu again and this time select [commit]
  • The Commit dialogue box appears. State that the file is new and click on the Submit button
  • The console window will show you that the file is being committed back to the Subversion repository. When complete the file will not have any icons on it, indicating that it is now under subversion control

4.5. Deleting a file

To delete a file:

  • Navigate to the folder containing the file using the Working Copy window
  • Highlight the file to be deleted by clicking on it
  • Press <delete> on your keyboard
  • You will then be asked to confirm its deletion. Click on Yes if you are sure you wish to delete the file in question
  • The file will now be deleted from your Working Copy
  • You now need to commit the change back to the Subversion repository. Look at the directory name and you will see the changed icon
  • Right click on the directory name to open the contextual menu
  • Select the Commit option
  • The Commit dialogue box will open showing you what will happen to the file(s) in the commit. In the example below two files will be deleted.
    Add in a short message stating what has happened to the file(s) and then click Submit to confirm the action
  • The file will now be deleted from the main Subversion repository

4.6. Cancelling changes to files and directories

If you want to cancel all your changes since the last file update you need to select the file, right click to bring up the context menu and select [Revert] in the submenu. All your changes will be lost and the file is reverted.

4.7. Obtaining information about files and directories

There are occasions when you need more information about a particular file or directory. This information is available through the Properties dialog. Hover your mouse over the name of a file and you will see a pop-up box with information about the file. This includes the last change author, date of change, state of the file, etc.

Up: Contents Previous: 3. Connecting to the main Subversion Repository Next: 5. Potential problems