[svk-users] SVK/SVN Mirror use

Gerald Loeffler gerald.loeffler at googlemail.com
Fri Aug 15 09:31:55 EDT 2008


hi mark,

to be honest, i can't follow you completely. instead of trying to
understand your precise needs, i'll keep this reply simple by telling
you how i implement a scenario that seems to be very similar to what
you are describing. it works fine for me - please judge for yourself
whether it is of any use to you:

i'm mirroring projects from a remote SVN repo (located in the USA,
hence the naming below) and create local branches of that. i then
commit changes to the local branches which need to be mirrored back to
the remote SVN repo. in addition, changes to the remote SVN repo need
to be synced to my local mirror and merged into my local branches. the
remote SVN repo is on a linux box, the local SVN repo (holding the
mirror and the local branches) is on windows. no problems with EOLs
that i can see.

1. create a local SVN repo
    svk depotmap -i USA C:\path.to\svkdepots\USA\.svk

2. set-up a mirror of a project in the remote SVN repo
    svk mirror svn://remote.host/path.to/project /USA/mirror/project

3. sync from remote to local mirror
    svk sync -a

4. create a directory in your local SVN repo for local branches of the mirror
    svk mkdir -m "created local directory" /USA/local

5. create local branch of mirrored project
    svk cp -p -m "created local branch of mirrored project"
/USA/mirror/project /USA/local/project

6. merge from mirror into local branch
    svk smerge -I -l /USA/mirror/project /USA/local/project

7. commit changes against local branch using any SVN client

8. merge from local branch into mirror (and hence into remote SVN repo)
    svk smerge -l /USA/local/project /USA/mirror/project

repeat 3, 6, 7 and 8 ad nauseam...

  hope that helps,
  gerald

2008/8/14 L. Mark Pilant <Mark.Pilant at sun.com>:
> Greetings.
>
> I've been using Subversion for a while, and SVK for a shorter while.
> I'm trying to set up an effective use of a remote repository, and
> although I'm almost there, I've run into one last problem.  BTW,
> this is all on Windows.
>
> Here's the problem:  I need to be able to take a remote repository
> as a "vendor drop", preserving the svn:eol-etyle, and merge it with
> code written locally.
>
> At the moment, I'm doing an "svn export" from the remote repository
> to a local directory tree, and then merging it into a local repository
> using the "svn_load_dirs" Perl script.  (Just as described in the
> SVN Book documentation.)
>
> This worked fine as long as I was only building on a single platform
> (Windows or Linux/Solaris) but falls apart because the eol type is
> lost as a result of the export and the Perl script.
>
> Now I need to build on Windows, Linux, and Solaris so I need to make
> sure the eol-style is set correctly.  (In reality, I just need to
> set it to be the same as what the remote repository has for the
> various files.)
>
>
> So... what I've got so far is a script which regularly does an svk
> sync to a mirrored repository.  (BTW< this works great.)  The eol-
> style is fine.  Now I need get the files from the mirror to the
> local repository so it can then be merged with the local code.
>
> I haven't been able to come up with any real good way to do this.
> About the only thing I can think of to do is do the export from the
> mirror and modify the Perl script to look at the properties for any
> added files in the mirror and set the properties to be the same when
> the local repository is updated.
>
> This seems like a real hack, and there ought to be a better way.
>
> Any suggestions?
>
> Thanks in advance.
>
> - Mark
>
>
>
> _______________________________________________
> svk-users mailing list
> svk-users at lists.bestpractical.com
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/svk-users
>



-- 
http://www.gerald-loeffler.net


More information about the svk-users mailing list