4. Working with your files
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!
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.
- Navigate to the file you wish to edit on your machine through the
- Right click on the file name to open the contextual menu
[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
- Right click on the file name in the
Working Copywindow 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.
- Find the file in the
Working Copywindow 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
[Commit]from the options
Commitdialogue box now opens
- Make a short note of what you did to the file in the Commit message box
- Click on the
- 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.
Consolewill 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
- 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-dirbutton (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 websitebutton
- 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
- Navigate to the folder containing the new file using the
Working Copywindow 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
Consolewindow and the overlaying icon on your new file will change to a small
- 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
Commitdialogue box appears. State that the file is new and click on the
consolewindow 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
- Navigate to the folder containing the file using the
- Highlight the file to be deleted by clicking on it
<delete>on your keyboard
- You will then be asked to confirm its deletion. Click on
Yesif you are sure you wish to delete the file in question
- The file will now be deleted from your
- You now need to commit the change back to the Subversion repository. Look at the
directory name and you will see the
- Right click on the directory name to open the contextual menu
- Select the Commit option
Commitdialogue box will open showing you what will happen to the file(s) in the commit. In the example below two files will be deleted.
Submitto confirm the action
- The file will now be deleted from the main Subversion repository
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.
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.