svk mirror — Manage mirrors
mirror DEPOTPATH URL
mirror --list [DEPOTNAME...]
mirror --relocate DEPOTPATH URL
mirror --detach DEPOTPATH
mirror --recover DEPOTPATH
mirror --upgrade /DEPOTNAME/
The first form sets up a new mirror of the repository at URL in DEPOTPATH. DEPOTPATH must not yet exist, nor can any of it's parent directories already be a mirror. The URL can either be a Subversion repository URL, or something that vcp understands if you have that installed. Subversion repository mirrors are read/write, vcp based mirrors (such as a mirror of a CVS repository) are read only. For more details on valid URL values, see ##TODO.
The second form lists all the mirrors in the depots
DEPOTNAME, or all
mirrors if no
The third form detaches the specified path from it's mirrored URL, causing that path and it's children to be treated as regular DEPOTPATHs from now one. The contents of DEPOTPATH remain unchanged, so any revisions retrieved into the mirror prior to the detaching remain available.
To completely remove a mirror you can use svk delete on the mirrored path. However when doing so be careful not to delete the parent of an attached mirror since doing so will confuse svk greatly right now.
If you accidentally do an SVN commit onto a mirrored
path—because you used the svn
client to commit directly to the depot's repository, or
--direct switch to
svk, running svk mirror
--recover can undo it (reverse apply the
commit(s), and set the appropriate revprop), to get the
mirror working again.
The final form is used to upgrade the mirrors inside a
DEPOTNAME to the current
standard way of tracking mirrored revisions. This command
is only relevant if you are upgrading from an older
version of SVK. ##TODO—How old? Which
To mirror the svkbook sources in the /mirror/svkbook directory of the default depot (the mirror directory will get created automatically if it doesn't yet exist), run:
$ svk mirror svn://svn.clkao.org/svkbook //mirror/svkbook Committed revision 12.
Setting up a mirrored path doesn't actually mirror anything yet. To do so you need to run svk sync.
To view which repositories you have set up to mirror and where they are being mirrored to you would use:
$ svk mirror --list Path Source ============================================================ //mirror/svkbook svn://svn.clkao.org/svkbook
Sometimes an administrator might change the “base location” of the repository you are mirroring—in other words, the contents of the repository doesn't change, but the main URL used to reach the root of the repository does. For example, the hostname may change, the URL scheme, or any part of the URL which leads to the repository itself. Rather than create a new mirror, you can use the svn mirror --relocate command to point the depot to the new location of the mirrored repository.
For the sake of this example let's assume that the
book repository we mirrored, switched from using the
instead, and that the hostname changed from svn to
svkbook, and that the svkbook virtual host has the repos
at it's root. To change our depot to refer to the mirrored
repository by it's new URL we would run:
$ svk mirror --relocate //mirror/svkbook http://svkbook.clkao.org/ Committed revision 13.
SVK won't let you relocate a mirror unless the new mirrored repository has the same UUID as the original mirror had. This prevents you from accidentally using relocate to point a mirror at something that isn't really the same repository after all.