Difference between revisions of "Svn Walkthrough"

From Animation Master Wiki
Jump to navigation Jump to search
(Access)
(Access)
 
Line 5: Line 5:
 
# First you must be invited to contribute to the <span class="caps">TWO</span> movie project. See [[Getting Started]].
 
# First you must be invited to contribute to the <span class="caps">TWO</span> movie project. See [[Getting Started]].
 
# Then you must have followed the [[Dot Project]] instructions, and have the correct [[Dot Project]] access level.
 
# Then you must have followed the [[Dot Project]] instructions, and have the correct [[Dot Project]] access level.
# Then you must setup your [[ Svn Password]] by clicking here: http://www.hash.com/two/svn.php.
+
# Then you must setup your [[ Svn Password]] by clicking here: [http://www.hash.com/two/svn.php SVN Account Request].
  
 
===Install===
 
===Install===

Latest revision as of 15:17, 23 April 2007

Here is how to get started using SVN in the TWO project:

Access

  1. First you must be invited to contribute to the TWO movie project. See Getting Started.
  2. Then you must have followed the Dot Project instructions, and have the correct Dot Project access level.
  3. Then you must setup your Svn Password by clicking here: SVN Account Request.

Install

  1. If you don’t have SVN or a supported svn client installed, install one from the Svn Install page.
  2. Download and install the latest A:M v13.0

Checking out the svn data

To start working with the TWO data you need to get a local copy of it on your computer. This is called Checkout in svn. Checkout only needs to be done once.

If it is canceled, to continue it, use the Update command.

Here is the current suggested process for Windows users.

Tortoise Svn Checkout

OSX users see Animation Master Svn Checkout instead.

checkout url

http://project.hash.com/movie/svn/active

Steps

To work on the TWO project you need to get a local copy of the TWO data on your computer.

  1. Choose a spot on your computer where you would like the TWO data to be.
    1. Place a new folder there called twodata.
      1. This should be a fairly short path on your drive, and should be easy to remeber where it is.
      2. Suggested location
        1. c:\twodata
  2. Right click this new folder, and choose SVN Checkout...
    1. if you don't see any SVN options in the context menu, install Tortoise SVN.
  3. paste the checkout url into the "Url of repository" section of the dialog.
  4. press ok

Once it has started to Checkout, if it fails or you cancel, checkout will nolonger be available, just choose Update to get the parts that checkout missed.

The first time you Commit any changes or new files it will ask you for your svn login information. See SVN Password if you haven't already set one up.

Or you can use the svn feature of Animation Master instead of or in conjuction with Tortoise SVN

TWO Libraries

There is a .lbr library file available via SVN. If you want to use it, add "TWODATAFOLDER\Data\Libraries" to the “Tools”, “Options”, “Folders”, “Libraries (lbr files)”, “Folders:” list if you wish.

Daily Use

Remember to follow the filename and folder layout guidelines on the Data Management page.

  1. You can now open from or save files to the folders you checked out in the folder you choose to put the data in, to add or modify what has been assigned to you on Dot Project.
    1. To add new files.
      1. If you are using TortoiseSVN check “Show unversioned files”, check any unversioned files you want to add before pressing ok.
        Don’t add .hinfo files, or thumbs.db files.
      2. Or you can right click on a linked file in the PWS and pick “Add”.
    2. If you are going to be working on more than one file and want to send one before the other is finished you’ll need to use TortoiseSVN on the pc or SvnX on OSX to “commit” (svn for ‘send’) just the file you are finished with.
  2. When you have completed a step press the ’Commit’ button. An “Enter Log Message” dialog will appear. Enter a description of what changes you did, and press “Ok”. A:M will send all modified files in the TWO data folder you checked out above.
  3. Press ’ Update’ again and it will bring up a dialog listing all the files others have modified since you last updated.
  • Remember to update before you start work on a new task
  • Remember to save and then commit your changes often. That way you can get a previous commit of a file if you lose your work or don’t like a change you saved.
  • If you get an error saying something about "Cleanup", right click next to the commit button, and choose cleanup.
  • If you are using TortoiseSVN these commands can also be found in the explorer context menu of your working copys files and folders.


Commit

Here is what can happen when you commit your changes.
  • If nobody else changed the files you changed it will commit them without a hitch.
  • Or if someone changed a file you changed it will notify you with an error like this.


Modified: somefile.ext
Error: Commit failed (details follow):
Error: Your file or directory 'Action.cpp' is probably out-of-date
Error: The version resource does not correspond to the resource within the transaction.  Either the requested version resource is out of date (needs to be updated), or the requested version resource is newer than the transaction root (restart the commit).

This means that you need to press ’ Update’ for svn to get the changes and merge them into your changes. Then one of two things can happen.

    • A merge because another person has changed a separate part of the file. Svn will automatically merge those changes into yours.
      • Then just ’Commit’ to send the merged file.
    • Or a conflict because another person has changed the same part of the file you did. You will get an error telling you that you need to resolve a Conflict before commiting.
      • Resolve the conflict. See Svn Conflict.
      • Commit’ the resolved files.

How to avoid Svn Conflicts

The easiest way to avoid conflicts is to make sure that the last person working on a file has successfully sent the file with the ‘Commit’ button on the TWO community tab. And you have updated that version of the file. As long as no one else commits before you complete your work and commit there will be no conflicts.

  • Coordinate files with Dot Project tasks
  • Make sure you are assigned to a task for the files you are working on.
  • Make sure the last task assignee has sent his work.
  • update before editing
  • commit right after editing
Two people can collaborate on a file, but you must be willing deal with the possibility of conflicts.

Here is a list of some of the ways you can get conflicts and how to avoid them.

  • Two people adding something to the same part of the file will cause a conflict
    • Starting with the same empty choreography Thom adds a model and Diane adds a light.
      • If Thom and Diane knew that they were going to have this conflict they could have avoided it by having Thom add a new folder to the choreography, and ‘commit’ it. Then Diane could ‘update’ it. Thom could add the model and Diane could add the light inside of the folder.
        • Or they could have decided that Thom would add objects to the top of the choreography in the PWS, and Diane would only add objects to the bottom of the PWS
    • Two people can’t make new actions in the same project. The folder trick above will help avoid this.
    • Two people shouldn’t add cps to the same .mdl. If you get a conflict in the MESH section and both files have added cps please send the three conflict files: filename.r(lownumber), filename.mine, and filename.r(highnumber); to a Technical Director and let him merge the differences and send the resolved file back to you. cpid conflicts are bad news (—Noel)
Here is a list of things that shouldn’t cause conflicts:
  • Two people can work in two separate files.
  • Two people can work in a totally separate section of the same file.
    • Two people moving control points as long as they don’t move the same ones
    • Two people adding keys to a channel as long as they add them on either side of an existing keyframe.
  • Two people can make exactly the same change.
    • Two people correct a misspelled group name exactly the same way.

Most importantly only work on what is assigned to you in dotproject, and if more than one contributor is assigned to the same file make sure you communicate about who is going to do what. If in doubt feel free to ask someone on the forum.

Tips

  • Do not copy or drag folders in your svn folders. Copying single files to use them as a template for a new file is ok, but if you try to copy a whole folder you will mess stuff up, as svn has hidden folders that contain the svn database.
  • Right click in the space next to the commit button and choose “Locate on disk” to explore the two data you have received with the update command.
  • Task Specific Update

If you want to start on a task right away and don’t want to wait for a full update, you can do the folowing.

    • Update the parent folder that contains the file(s) for task you were assigned.
    • Load the project or other file(s) needed for your task. If it asks for any files navigate as far down the path it is looking for as you can and then update that folder. Then continue looking for that file.
    • Once everything is loaded save your project and start a full update while you work.
    • When the update is done save and reload your project, this is in case a linked file that your work depends on was modified in the update. Double check your work to see if any updated files affected you.