2568
Comment: converted to 1.6 markup
|
← Revision 3 as of 2008-10-30 14:45:24 ⇥
2602
syntax repair
|
Deletions are marked like this. | Additions are marked like this. |
Line 4: | Line 4: |
{{{ svn co https://svnsrv.desy.de/desy/openafs-osd | {{{ svn co https://svnsrv.desy.de/desy/openafs-osd |
Line 9: | Line 10: |
{{{ cd openafs-osd/trunk | {{{ cd openafs-osd/trunk |
Line 13: | Line 15: |
{{{ svn status -q | {{{ svn status -q |
Line 17: | Line 20: |
{{{ svn log --limit=10 | {{{ svn log --limit=10 |
Line 21: | Line 25: |
{{{ svn ci -m "my comment" | {{{ svn ci -m "my comment" |
Line 25: | Line 30: |
{{{ svn ci | {{{ svn ci |
Line 33: | Line 39: |
{{{ svn log -r HEAD:1 | {{{ svn log -r HEAD:1 |
Line 37: | Line 44: |
{{{ svn mkdir branches/new-branch | {{{ svn mkdir branches/new-branch |
Line 42: | Line 50: |
{{{ svn copy -r 12 trunk/openafs-1.4.7 branches/newer-branch | {{{ svn copy -r 12 trunk/openafs-1.4.7 branches/newer-branch |
Line 46: | Line 55: |
{{{ svn merge -r 12:15 trunk/ branches/newer-branch/ | {{{ svn merge -r 12:15 trunk/ branches/newer-branch/ |
Line 49: | Line 59: |
{{{ svn merge trunk@12 trunk@15 branches/newer-branch | {{{ svn merge trunk@12 trunk@15 branches/newer-branch |
Line 53: | Line 64: |
Don't forget {{{ svn ci -m "+ merged in changes between 12:15" | Don't forget {{{ svn ci -m "+ merged in changes between 12:15" |
Line 58: | Line 70: |
{{{ svn merge -r 15:12 . . }}} or {{{ svn merge .@15 .@12 . |
{{{ svn merge -r 15:12 . . }}} or {{{ svn merge .@15 .@12 . |
Line 66: | Line 80: |
You can undo all local changes, but you would-be checkin is <!> lost then, too: {{{ svn revert . -R | You can undo all local changes, but you would-be checkin is <!> lost then, too: {{{ svn revert . -R |
Line 69: | Line 84: |
It can be wise to back up local changes before updating: {{{ svn export . /tmp/my-checkout | It can be wise to back up local changes before updating: {{{ svn export . /tmp/my-checkout |
Line 74: | Line 90: |
{{{ svn resolve openafs-1.4.7/src/fsint/afsint.xg | {{{ svn resolve openafs-1.4.7/src/fsint/afsint.xg |
Contents
URL
svn co https://svnsrv.desy.de/desy/openafs-osd
Common usage
Updating local copy before starting to work
cd openafs-osd/trunk svn up
To find out about local modifications:
svn status -q
To see recent changes
svn log --limit=10
Check in quickly
svn ci -m "my comment"
Check in thoroughly
svn ci
Opens an $EDITOR for you to input a comment. Shows a list of changed files and allows you to abort by leaving the editor without saving.
Other uses
Viewing the log
svn 1.4.2 has been known to create insufficient log output in cases. Apparently it helps then to specify the (default) revision range:
svn log -r HEAD:1
Creating a branch
svn mkdir branches/new-branch svn copy trunk/openafs-1.4.7 branches/new-branch/ svn ci -m "created new-branch"
It is often desirable to branch an earlier revision of the trunk or another branch:
svn copy -r 12 trunk/openafs-1.4.7 branches/newer-branch
Including changes into branches
svn merge -r 12:15 trunk/ branches/newer-branch/
which can alternatively be written as
svn merge trunk@12 trunk@15 branches/newer-branch
and that's more intuitive at times.
Don't forget
svn ci -m "+ merged in changes between 12:15"
(keywords like "merge" or ":" in log messages can help later when grepping can become necessary, but not to my personal experience.)
Rolling back to earlier revisions
svn merge -r 15:12 . .
or
svn merge .@15 .@12 .
which in both cases means "compare . in revision 15 with . in revision 12 and apply the changes to file/directory ."
When commit fails
...because some files are outdated, it can be harmful to just "svn up" because that may bring files into conflict states that are difficult to resolve, and svn cannot automatically undo that.
You can undo all local changes, but you would-be checkin is lost then, too:
svn revert . -R
It can be wise to back up local changes before updating:
svn export . /tmp/my-checkout
If things go haywire, use revert and then copy your files back from the export. You cannot svn import them, as that servers a different purpose.
Resolving conflicts
Should conflicts occur, after resolving them (as in CVS), one must tell SVN that they are in order again:
svn resolve openafs-1.4.7/src/fsint/afsint.xg
Only then will svn commit be allowed.