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

Re: Re: "Update to revision" recursively checks out unwanted items with "choose items" in Repository Browser

From: Dirk Hoffmann <hoffmann_at_cppm.in2p3.fr>
Date: Mon, 17 Aug 2015 19:01:02 +0200 (CEST)

> Yes. But the OP already has a partial checkout, using the "choose items"
> dialog from the checkout or "update to revision" dialogs in TortoiseSVN.

If that is the problem, I think I gave a solution, which works for
commandline SVN.

> The OPs problem, is that his partial checkout is converted automatically to
> a fully recursive checkout, when he is only trying to add a single item to
> his partial checkout.
>
> The workaround is to re-specify every single piece of the sparse checkout
> every time he modifies the checkout. This is not a very usable solution, but
> as Stefan points out, there are usability concerns with fixing it.

Yes, I am concerned about that as well.

Maybe TortoiseSVN could just behave in the way the command line interface
does with the "depth" parameter. The way I described it is kind of abuse of
the "depth" parameter, at least in its litteral sense. But it allows you to
checkout single files or directories, which are then the only ones which are
updated in the sequel.

Assuming :
  MYREPO/mydir/subdir
  MYREPO/mydir/file1.1
  MYREPO/mydir/file1.2
  MYREPO/mydir/subdir/file2.1
  MYREPO/mydir/subdir/file2.2

$ svn co MYREPO/mydir --depth empty
$ cd mydir
$ svn up subdir --depth empty
$ svn up file1.1
$ cd subdir
$ svn up file2.2
$ cd ..
$ svn status -v
  or
$ svn update

The latter two commands will only consider checked out files, but not files
1.2 or 2.1.

A more common example would be

$ svn co MYREPO/project/branches --depth empty # better do not forget latter
$ cd branches
$ svn ls -v # shows them all from the repository, if needed
$ svn up br1 br2

Now a

$ cd ..
$ svn update

will *only* update br1/ and br2/ directories from the repo.

Unfortunately this "active" or "checked-out" flag is hidden (and misnamed
"depth"), and in commandline there are only four possibilities to manipulate
it: empty, files, immediates or infinity. But it comes quite handy. Maybe
TortoiseSVN could handle it in a more fine-grained way.

This is known under the name "sparse directories", and I hope we did not
drift away from what the OP really needs.
                                                                         Dirk

PS: Ref.: http://svnbook.red-bean.com/en/1.7/svn.advanced.sparsedirs.html

For the implementer in TortoiseSVN, this is likely to be more interesting:
  http://svn.apache.org/repos/asf/subversion/trunk/notes/sparse-directories.txt

------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=3132505

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2015-08-17 19:01:09 CEST

This is an archived mail posted to the TortoiseSVN Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.