开发者

SVN Noob: quick summary of how to use it?

[for those not following along a开发者_开发问答t home, this is the sequel to Rolling My Own Version Control ;)]

So i gave in and installed TortoiseSVN (to work with a friend on a project, my personal version control is alive, well, and working as i want it). Having never seriously used one of these before, can someone give me (a link to a) concise explanation of such things as tags and how to use them, and anything else i should know before using it to work on a project with one other user?

I've seen this eBook and i'll certainly read it, however i'm looking for something to the effect of a "cheat sheet" or maybe something a little larger.

Forgot to mention, i'm on windows.


Check out the RedBean SVN free ebook. It's an excellent reference, containing info on branching, Tags etc

Also: Phil Haack's article Quickstart Guide to Subversion on SourceForge


Setup your repository with something like:

/tags

/trunk

/branch

  • Put the latest version of your code in trunk
  • Tag releases or builds into a version-named folder in tags (consider these readonly)
  • Branch releases into a version-named folder in branch (these are readwrite bugfix branches)

Tags/branches do not use up extra space until new revisions are committed into them. To that end, our build process automatically creates a tag for each build (not necessary, but simply an example of their usage)

The general flow is:

  1. Checkout a repository (usually a specific branch or trunk) locally
  2. Make changes
  3. Update to merge changes (and resolve conflicts)
  4. Commit the changes back into the repository

Other things to consider:

  • Renaming files/folders. Use SVN -> Rename whenever possible to ensure you keep your history.
  • Complex changes. If you are going to rename a folder and move files within it, try to commit one change at a time. Multiple deletes/moves/renames/adds within the same tree can sometimes cause SVN to get confused. You'll learn which specific scenarios to be careful of yourself over time.

The only other feature of note is adding a property (files Properties -> Subversion -> Properties) "needs-lock" with the value of "*". This will restrict the file to be modified by one user at a time (until they release the lock). Useful for file databases like SQLite, since they are binary and cannot be merged.

You can learn the rest yourself by simply playing around with it.


There are a lot of free resources on that topic on the internet. Like:

  • SVN Book
  • Short Tutorial

Best wishes,
Fabian

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜