[svk-users] update directory without checking out all new subdirs?

Chia-liang Kao clkao at clkao.org
Wed Oct 29 12:07:54 EDT 2008


Derek,

2008/10/25 Derek Atkins <warlord at mit.edu>:
> I've got SVK mirroring a fairly deep and wide SVN tree.  Let's
> say that it's huge, so I don't have the whole thing pulled out
> into my WC.  So for example:
>
>  cd TOPDIR
>  svk co -N /path/to/some/dir
>  cd dir
>  svk ls
>    subdir
>  svk revert subdir
>  cd subdir
>  svk revert -R subsubdir
>
> This works great, until I find out that someone added a new
> subdir of 'dir' that I need.  Actually, a dozen people added
> new subdirs of 'dir', but I only want one of them.  So if I
> do:
>
>  svn ls svn+ssh://URL/to/some/dir
>
> I get:
>
>  subdir
>  foo
>  bar
>  baz
>  quux
>  red
>  blue
>  green
>
> I know that I need 'foo' but I don't want anything else in my WC.  So
> I svk sync the repository down to my copy, but if I 'svk ls
> TOPDIR/dir' it still only lists "subdir".
>
> So how do I update "TOPDIR/dir" so that I can then "svk revert -R foo"?
>
> If I just run "svk update" from TOPDIR/dir then it will checkout ALL
> the new directories.

one tricky way to do is to touch a file of those directories you
*don't* want, and then do the up.  those directories will have a
collision and not being checked out...

> If I run "svk -N update" it gives me an error that that isn't supported.
>
> If I run "svk revert" from TOPDIR/dir it doesn't appear to do anything.
>
> The only way I could figure out how to do it is to delete the checkout
> and start over again, but that's not a viable long-term solution.

the easiest way is probably go to ~/.svk/config and update the
revision of your 'dir' to the latest HEAD, and do the revert -R for
the subdir you wanted.


Cheers,
CLK


More information about the svk-users mailing list