[svk-devel] 2.0-pre "svk pull" tries to merge back to mirror source?

Russ Brown pickscrape at gmail.com
Wed Oct 11 12:33:04 EDT 2006

On Wed, 2006-10-11 at 10:57 -0400, Derek Atkins wrote:
> Quoting Daniel Jacobowitz <drow at false.org>:
> >> I just don't want to have to think about whether $PWD is a WC of
> >> a mirror or a WC of a local branch.  I could have tens or hundreds
> >> of WCs lying around as I work on different projects.  What I want
> >> is a single command that is:
> >>
> >>   sync
> >>   smerge (if necessary)
> >>   update
> >>
> >> I /thought/ that "pull" would do what I wanted, but clearly not..  It's
> >> not smart enough to notice that there's no "branch" to merge from and
> >> instead it should skip the merge step and just perform the sync and update.
> >
> > No, it's doing exactly what you asked it to.  It's syncing, smerging
> > from where the current directory was copied from to the current
> > directory's depotpath, and updating.  The fact that this particular
> > branch lives in a mirrored directory doesn't make a difference; it's a
> > copy off of trunk, so pull does an smerge from trunk.
> It may be doing what I asked but it's NOT doing what I want OR what I mean.
> Maybe it's because I've used Teamware and Bitkeeper, so I think of Push and
> Pull in THOSE terms..   I consider push/pull a push/pull across a mirror,
> not just a push/pull across a COPY.
> Let's say I have:
>   svk mirror svn+ssh...   //mirrors/gnucash
>   svk copy //mirrors/gnucash/branches/foo //local/gnucash/branches/foo
>   svk co //local/gnucash/branches/foo
>   cd foo
> so now $PWD is a LOCAL copy of a REMOTE copy of REMOTE Trunk..  Now
> if I "svk pull" it will pull from the REMOTE copy (the branch)..  It
> doesn't pull from trunk.  So in this configuration pull does exactly
> what I've come to expect (and want and mean) -- I want it to take
> the updates in the remote repo, sync them into my repo, then merge
> those changes into my local branch copy, and then update my WC.
> This is what I mean about having to think about my WC and what it is!
> The tool should do this thinking for me, I shouldn't have to think
> about it.
> So I guess what I REALLY want is for pull to do:
>   sync
>   smerge IFF $PWD is NOT a checkout from the mirror
>   update
> In this case, where $PWD is a WC from a mirror (instead of a local
> branch), I think it's perfectly reasonable to require the user to
> perform an explicit smerge if what they really want to do is merge
> from Remote Trunk into Remote Branch.   Because honestly, I can't
> think of ANY case where this is the right thing when the user uses
> "svk pull".

It happens to be the right thing to do in *every* case where I work. :)
We use mirrored branches exclusively.

> -derek

More information about the svk-devel mailing list