Aus Claudio's Wiki
Wechseln zu: Navigation, Suche



Most common usage

svn status -u
Zeigt sowohl lokale Aenderungen als auch die auf dem Server


status (stat, st): Print the status of working copy files and directories.
usage: status [PATH...]

  With no args, print only locally modified items (no network access).
  With -q, print only summary information about locally modified items.
  With -u, add working revision and server out-of-date information.
  With -v, print full revision information on every item.

  The first six columns in the output are each one character wide:
    First column: Says if item was added, deleted, or otherwise changed
      ' ' no modifications
      'A' Added
      'C' Conflicted
      'D' Deleted
      'I' Ignored
      'M' Modified
      'R' Replaced
      'X' item is unversioned, but is used by an externals definition
      '?' item is not under version control
      '!' item is missing (removed by non-svn command) or incomplete
      '~' versioned item obstructed by some item of a different kind
    Second column: Modifications of a file's or directory's properties
      ' ' no modifications
      'C' Conflicted
      'M' Modified
    Third column: Whether the working copy directory is locked
      ' ' not locked
      'L' locked
    Fourth column: Scheduled commit will contain addition-with-history
      ' ' no history scheduled with commit
      '+' history scheduled with commit
    Fifth column: Whether the item is switched relative to its parent
      ' ' normal
      'S' switched
    Sixth column: Repository lock token
      (without -u)
      ' ' no lock token
      'K' lock token present
      (with -u)
      ' ' not locked in repository, no lock token
      'K' locked in repository, lock toKen present
      'O' locked in repository, lock token in some Other working copy
      'T' locked in repository, lock token present but sTolen
      'B' not locked in repository, lock token present but Broken

  The out-of-date information appears in the eighth column (with -u):
      '*' a newer revision exists on the server
      ' ' the working copy is up to date

  Remaining fields are variable width and delimited by spaces:
    The working revision (with -u or -v)
    The last committed revision and last committed author (with -v)
    The working copy path is always the final field, so it can
      include spaces.

  Example output:
    svn status wc
     M     wc/bar.c
    A  +   wc/qax.c

    svn status -u wc
     M           965    wc/bar.c
           *     965    wc/foo.c
    A  +         965    wc/qax.c
    Status against revision:   981

    svn status --show-updates --verbose wc
     M           965       938 kfogel       wc/bar.c
           *     965       922 sussman      wc/foo.c
    A  +         965       687 joe          wc/qax.c
                 965       687 joe          wc/zig.c
    Status against revision:   981

Valid options:
  -u [--show-updates]      : display update information
  -v [--verbose]           : print extra information
  -N [--non-recursive]     : obsolete; try --depth=files or --depth=immediates
  --depth ARG              : limit operation by depth ARG ('empty', 'files',
                            'immediates', or 'infinity')
  -q [--quiet]             : print nothing, or only summary information
  --no-ignore              : disregard default and svn:ignore property ignores
  --incremental            : give output suitable for concatenation
  --xml                    : output in XML
  --ignore-externals       : ignore externals definitions
  --changelist ARG         : operate only on members of changelist ARG
                             [aliases: --cl]

Global options:
  --username ARG           : specify a username ARG
  --password ARG           : specify a password ARG
  --no-auth-cache          : do not cache authentication tokens
  --non-interactive        : do no interactive prompting
  --config-dir ARG         : read user configuration files from directory ARG








Most common usage

svn merge --reintegrate svn+ssh://svnserver/var/lib/svnroot/ishop/ishop-opo/branches/0906-bug_1827 --dry-run
tries to merge 0906-bug_1827 to trunk (if you are in the trunk) but makes no changes
--dry-run: try operation but make no changes





Recursively clean up the working copy, removing locks, resuming unfinished operations, etc.
usage: cleanup [PATH...]








Merge branch back to trunk

  1. Change to trunk
  2. Update trunk: svn up
  3. Merge:
    1. Try with --reintegrate --dry-run
      svn merge --reintegrate svn+ssh://svnserver/var/lib/svnroot/ishop/ishop-opo/branches/0906-bug_1827 --dry-run
      if it doesn't work:
    2. search the right revision:
      svn log -l 10 shows the last 10 changes (commits)
      when the right revision is found:
    3. svn merge -r 14804:HEAD svn+ssh://svnserver/var/lib/svnroot/ishop/ishop-opo/branches/0906-bug_1827 --dry-run

When the merge is successful, reuse the same command without --dry-run.


Subversion config file:


Windows:  %APPDATA%\Subversion


(comments removed)

# store-passwords = no
# store-auth-creds = no

# editor-cmd = editor (vi, emacs, notepad, etc.)
# diff-cmd = diff_program (diff, gdiff, etc.)
# diff3-cmd = diff3_program (diff3, gdiff3, etc.)
# diff3-has-program-arg = [true | false]
# merge-tool-cmd = merge_command

# ssh = $SVN_SSH ssh
# rsh = rsh
# rsh = /path/to/rsh -l myusername

# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo
#   *.rej *~ #*# .#* .*.swp .DS_Store
global-ignores = .classpath .project target

# log-encoding = latin1
# use-commit-times = yes
# no-unlock = yes
# mime-types-file = /path/to/mime.types
# preserved-conflict-file-exts = doc ppt xls od?
# enable-auto-props = yes
# interactive-conflicts = no

# *.c = svn:eol-style=native
# *.cpp = svn:eol-style=native
# *.h = svn:eol-style=native
# *.dsp = svn:eol-style=CRLF
# *.dsw = svn:eol-style=CRLF
# *.sh = svn:eol-style=native;svn:executable
# *.txt = svn:eol-style=native
# *.png = svn:mime-type=image/png
# *.jpg = svn:mime-type=image/jpeg
# Makefile = svn:eol-style=native