[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svnsync

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-09-15 02:18:48 CEST

On 9/14/06, Duncan Murdoch <murdoch@stats.uwo.ca> wrote:

> These are the things I'd like to do, off the top of my head:
>
> - use the sync'd copy to tell me the history of a file in a working
> copy from the original repos (when I'm offline, without access to the
> original). Would I need to switch the WC, get the log, and switch back?

Sure, although in order to actually switch (actually, switch
--relocate) to the read-only mirror you'd need to make sure that your
mirror has the same UUID as the destination repository. There's a
kinda hacky way to make this work via svnadmin load:

$ cat - <<EOF | svnadmin load repos
SVN-fs-dump-format-version: 2
UUID: 65390229-12b7-0310-b90b-f21a5aa7ec8e
EOF

Replacing the UUID with whatever the UUID of your source repository is.

> - use the sync'd copy instead of having the text-base originals for
> the purpose of doing a "revert", to save disk space.

Nope.

> - check out a read-only working copy, and be warned if I tried to use
> it in a dangerous way (e.g. by committing from it or otherwise treating
> it as if it was from a regular repos).

Assuming you've played the UUID trick, sure, you just need to set up a
pre-commit-hook script on your mirror that only allows commits from a
particular user (that's used for the sync) and disallows all others,
that way you can't accidentally commit to it.

> - be able to switch from the working copy checked out above to the
> original one at the appropriate revision.

Works fine with switch --relocate, so long as you've made sure the
UUIDs are the same.

> - be able to make a backup of a repository when I have read access,
> but not administrative access. I would have thought this was the main
> idea, but then the description of how to convert between master and
> slave makes it sound as though it's not.

Sure you can use it to make a backup, and that was one of the main
goals, it's just that if you start making commits to that backup
you're not going to be able to sync it anymore. So if you hit that
disaster case where your main repository is offline and you have to
start using your backup as your new repository you need to turn your
backup into the new master once the problem is corrected.

Another use case that this was intended for was for true read-only
mirrors. For example, svn.apache.org is a pretty busy subversion
server, but a LOT of its traffic is from non-committers, so some time
in the future we might switch it to committer-only access, but provide
read-only mirrors for anonymous users that are maintained via svnsync.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Sep 15 02:19:22 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.