[svk-devel] unexpected behavior with pull

Jared Hardy jaredhardy at gmail.com
Tue Mar 6 20:23:08 EST 2007

On 3/6/07, Michael Peters <mpeters at plusthree.com> wrote:
> I have a project (http://svn.project.org/) full svn repo mirrored as
> //mirror/project. This project has several branches which can be found at
> something like //mirror/project/branches/foo
> (http://svn.project.org/branches/foo). And branch foo was at one point copied
> from from another branch "bar" (http://svn.project.org/branches/bar). This copy
> wasn't done in my svk setup but is the way project exists in svn.
> svk co //mirror/project/branches/foo project_foo

Now I assume you meant "svk push" here, not "svk pull":

> when I do an svk pull it actually pushes changes back, not just to
> http://svn.project.org/branches/foo but also to http://svn.project.org/branches/bar.

I made the same mistake when I started playing with SVK, so I hope I'm
experienced enough to clarify the situation now. The short answer:
this is by design.

Someone please correct me if I'm wrong, or even just mis-word
something, but this is my understanding of the design. "svk push" and
"svk pull" were designed for a situation where either you have your
own "working" branch on a remote Subversion repository, and you want
changes to propagate to/from your working branch to the copy source
"shared" branch, or you have a //local branch on your local machine's
SVK repository, which is copied from the //mirror of the "shared"
branch on the remote repository. In either case, push will smerge all
your branch's changes to the remote "shared" branch, and pull will
merge everything from the "shared" branch to your own working/local
branch, and Working Copy (WC) if specified.
    In the setup you describe, all merges between the local
//mirror/project to the remote svn://project happen automatically on
every sync or commit, including "svk update -s ..." and "svk commit
...". With your current setup, all you need to do is commit, and all
your WC changes will go to both your //mirror/project branch and the
remote svn://project branch, at the same time.  You would only use
"svk pull" or "svk push" if you want changes to propagate from/to
another "cp" source branch.

    While your current setup is convenient, when all you want SVK to
do is replace .svn as the WC cache, you are not getting the full power
of SVK. The real optimal use of SVK is to make your own //local
repository branch, to manipulate at will, while both online and
offline, without affecting any other developers.  When you use a WC
checked out from a //local branch, you can complete all the update,
commit, revert and related operations you want, without adversely
affecting anyone else, even while offline. You only have to be online
for push, pull, or sync operations. When you want to share your local
branch's state with others using the source shared branch, you use
"svk push [-l] ..." to push changes to that branch, either as a
verbatim copy of all your local commit operations serially, or as one
big atomic -l[ump]. When you want to get changes from the shared
branch, cleanly merged to your WC and/or //local branch, use "svk pull

    I hope this helps :)

More information about the svk-devel mailing list