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

Re: new svn command/feature

From: B. W. Fitzpatrick <fitz_at_red-bean.com>
Date: 2000-10-20 19:49:01 CEST

>
> Fitz and I were working on the client README, fleshing out commands
> and their options a couple nights ago. We came across and interesting
> idea (Fitz's really) for a feature that CVS does not have that
> Subversion might want to have (given that software can want anything).
> It's in the README, but I just wanted to draw attention to it to get
> some feedback from the group.
>
> Here is the snippet from the README:
>
> --cut--
>
> sync
> ====
>
> This is going to take a bit of explaining. Imagine an intelligent
> update that knows to add new files and remove files that you've
> removed, and all recursively (without having to svn add, svn rm, ad
> nauseam). More to come!
>
> --cut--
>
> We had originally thought that it might be an option to update, like:
>
> $ svn up --force
>
> But we reasoned that it might be better to have a separate command
> since it is so much more than just updating.
>
> So if I have a working copy like so:
>
> $ ls
> SVN/ main.c foo.c bar/
>
> where main.c is in the repository, foo.c needs a checkin and bar.c is
> absent from the repository.
>
> And I do:
>
> $ svn sync
>
> What happens is foo.c gets checked in and bar and its contents get
> automagically added and checked in.

Actually, I had envisioned it as Adding and Removing, not checking in.

So, for example, you've got:

$ ls -1
  foo.c
  bar.c

$ touch qux
$ touch qux/fizzle
$ touch qux/smootch

$svn up
  ? qux
  M foo.c

$ rm bar.c

*

$ svn sync
  A qux
  A qux/fizzle
  A qux/smootch
  M foo.c
  R bar.c

$ svn ci -m "Boy have I been busy."
  ...

* Note, that if you were to do an update at this point, bar.c would be
  pulled from the repository

-Fitz
Received on Sat Oct 21 14:36:12 2006

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