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

490 views
Skip to first unread message

Dag Schmidt

unread,
Aug 15, 2015, 1:20:39 PM8/15/15
to us...@tortoisesvn.tigris.org
The Checkbox selection in the Repository Browser works by default as a recursive check on all subdirectories.

- Is there a simple way to keep my sticky selection and add only e.g. single files from other directories?


I'm using a sparse tree of the repository as working copy.
The working copy was generated by a a selection of partial subdirectories and single files. The "make depth sticky" option was used to store the current structure.

If I like to add other single directories or files my recent stored selection is updated recuresively with all existing subdirectories and files I unchecked before.
It seems due to the collapsed tree the root checkbox is working as a recursive checkout by default.

I would expect my sticky selection would not have been modified by just opening the collapsed Repository Browser view with the "choose items" button.

Opening the tree-view down to the final subdirectories shows my previous selection. With this view I can add single files as expected.
May be the completely unfolded tree for my previous selections could be shown with "choose items".

I found similar entries but no workaround or solution yet.
Looking forward for any comments.

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

To unsubscribe from this discussion, e-mail: [users-un...@tortoisesvn.tigris.org].

Dirk Hoffmann

unread,
Aug 15, 2015, 3:51:01 PM8/15/15
to us...@tortoisesvn.tigris.org
Le 15 août 2015 19:19:31 CEST, Dag Schmidt <dag.s...@messring.de> a écrit :
>The Checkbox selection in the Repository Browser works by default as a
>recursive check on all subdirectories.
>
>- Is there a simple way to keep my sticky selection and add only e.g.
>single files from other directories?
>
>
>I'm using a sparse tree of the repository as working copy.
>The working copy was generated by a a selection of partial
>subdirectories and single files. The "make depth sticky" option was
>used to store the current structure.
>
>If I like to add other single directories or files my recent stored
>selection is updated recuresively with all existing subdirectories and
>files I unchecked before.
>It seems due to the collapsed tree the root checkbox is working as a
>recursive checkout by default.
>
>I would expect my sticky selection would not have been modified by just
>opening the collapsed Repository Browser view with the "choose items"
>button.
>
>Opening the tree-view down to the final subdirectories shows my
>previous selection. With this view I can add single files as expected.
>May be the completely unfolded tree for my previous selections could be
>shown with "choose items".
>
>I found similar entries but no workaround or solution yet.
>Looking forward for any comments.
>

Looks like using svn ignore property would be of use for you.


--
Sent outdoor from mobile device. Apologies for being brief.
Envoyé par appareil mobile. Excusez brièveté.

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

Dag Schmidt

unread,
Aug 16, 2015, 9:08:30 AM8/16/15
to us...@tortoisesvn.tigris.org
I don't think "ignore" will help.
It is a matter of how the selection checkbox works.
Opening the collapsed tree-view again will ignore saved selections but uses all items selected in all subdirectories by default.

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

Dag Schmidt

unread,
Aug 16, 2015, 2:44:08 PM8/16/15
to us...@tortoisesvn.tigris.org
I added a document for better understanding.

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

Stefan Küng

unread,
Aug 17, 2015, 3:21:02 AM8/17/15
to us...@tortoisesvn.tigris.org
On 15.08.2015 19:19, Dag Schmidt wrote:
> The Checkbox selection in the Repository Browser works by default as a recursive check on all subdirectories.
>
> - Is there a simple way to keep my sticky selection and add only e.g. single files from other directories?
>
>
> I'm using a sparse tree of the repository as working copy.
> The working copy was generated by a a selection of partial subdirectories and single files. The "make depth sticky" option was used to store the current structure.
>
> If I like to add other single directories or files my recent stored selection is updated recuresively with all existing subdirectories and files I unchecked before.
> It seems due to the collapsed tree the root checkbox is working as a recursive checkout by default.
>
> I would expect my sticky selection would not have been modified by just opening the collapsed Repository Browser view with the "choose items" button.
>
> Opening the tree-view down to the final subdirectories shows my previous selection. With this view I can add single files as expected.
> May be the completely unfolded tree for my previous selections could be shown with "choose items".
>
> I found similar entries but no workaround or solution yet.
> Looking forward for any comments.

The problem is known, but there's no good solution.
If we would make the behavior as you expect, then we'd have to fetch all
data in the repo browser recursively when you click the "Choose
items..." button. But doing that could take several minutes for bigger
and remote repositories. So that's not an option.

Stefan


--
___
oo // \\ "De Chelonian Mobile"
(_,\/ \_/ \ TortoiseSVN
\ \_/_\_/> The coolest interface to (Sub)version control
/_/ \_\ http://tortoisesvn.net

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

Dirk Hoffmann

unread,
Aug 17, 2015, 3:23:35 AM8/17/15
to us...@tortoisesvn.tigris.org
On Aug 16, Dag Schmidt wrote:

> I don't think "ignore" will help.
> It is a matter of how the selection checkbox works.
> Opening the collapsed tree-view again will ignore saved selections but uses all items selected in all subdirectories by default.

I understand.

The svn:ignore property is rather to avoid permanently that documents
contained in your sandbox / workdir are *committed* into the repository. I
misunderstood your need.

What you want is a partial *checkout*. I wonder why. In principle that is
exactly what a VCS is made for: to assure that all files are in sync with the
same release from the repository.

But here is how it would work on commandline:

$ svn update --set-depth emtpy
$ svn update ./file1_i_want # fetch a file I want to "connect" to the repo
$ svn update ./file2_i_want
$ # [all other files]
$ svn update # will now only update previously fetched files

Maybe there is an equivalent with TortoiseSVN, but I do not know it enough for
these fineprints of SVN.

Eventually you want to do that copy in a particular checkout workdir and copy
other files there in addition. If they are in the repository, that will be a
mess later on to re-sync and merge everything, but it is what you wanted.
(Does that list of files change often?)

Alternatively, you could work with branches, which contain only that fraction
of the files, which you exactly want.

Your request, to make TortoiseSVN remember which files you selected last
time for update, would break an important other function: If new files show up
in the repository (commited by someone else), then they would not be checked
out by default.

Hope this helps!
Dirk

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

Ben Fritz

unread,
Aug 17, 2015, 12:21:18 PM8/17/15
to us...@tortoisesvn.tigris.org


On Mon, Aug 17, 2015 at 2:23 AM, Dirk Hoffmann <hoff...@cppm.in2p3.fr> wrote:
>
> On Aug 16, Dag Schmidt wrote:
>
> > I don't think "ignore" will help.
> > It is a matter of how the selection checkbox works.
> > Opening the collapsed tree-view again will ignore saved selections but uses all items selected in all subdirectories by default.
>
> I understand.
>
> The svn:ignore property is rather to avoid permanently that documents
> contained in your sandbox / workdir are *committed* into the repository. I
> misunderstood your need.
>
> What you want is a partial *checkout*.

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

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.

Dirk Hoffmann

unread,
Aug 17, 2015, 1:01:10 PM8/17/15
to us...@tortoisesvn.tigris.org
> 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

Dag Schmidt

unread,
Aug 28, 2015, 12:40:53 PM8/28/15
to us...@tortoisesvn.tigris.org
> On 15.08.2015 19:19, Dag Schmidt wrote:
> > The Checkbox selection in the Repository Browser works by default as a recursive check on all subdirectories.
> >
> > - Is there a simple way to keep my sticky selection and add only e.g. single files from other directories?
> >
> >
> > I'm using a sparse tree of the repository as working copy.
> > The working copy was generated by a a selection of partial subdirectories and single files. The "make depth sticky" option was used to store the current structure.
> >
> > If I like to add other single directories or files my recent stored selection is updated recuresively with all existing subdirectories and files I unchecked before.
> > It seems due to the collapsed tree the root checkbox is working as a recursive checkout by default.
> >
> > I would expect my sticky selection would not have been modified by just opening the collapsed Repository Browser view with the "choose items" button.
> >
> > Opening the tree-view down to the final subdirectories shows my previous selection. With this view I can add single files as expected.
> > May be the completely unfolded tree for my previous selections could be shown with "choose items".
> >
> > I found similar entries but no workaround or solution yet.
> > Looking forward for any comments.



>
> The problem is known, but there's no good solution.
> If we would make the behavior as you expect, then we'd have to fetch all
> data in the repo browser recursively when you click the "Choose
> items..." button. But doing that could take several minutes for bigger
> and remote repositories. So that's not an option.
>
> Stefan
>
>
> --
> ___
> oo // \\ "De Chelonian Mobile"
> (_,\/ \_/ \ TortoiseSVN
> \ \_/_\_/> The coolest interface to (Sub)version control
> /_/ \_\ http://tortoisesvn.net



Sorry for taking notice "so late".

Stefan, I can't get what you describe to be honest.

There is a sparse checkout as I can see if I unfold the tree-view and observe all checkboxes. That means to me I got all necessary information on my local machine.

So I see no need to fetch recursively data in the repro browser. Currently it is that way. I get files recuresively I don't want.


Doing an "update" gets the latest version of my sparse checkout or structures that changed.

In the next step a simple way would be to unfold by default the complete shown tree view down to the level I got files in my sparse checkout. With this view my wanted behavior is already working well.
A manual unfold of all directories and subdirectories takes a long time and is boring.

- So is there a way to implement this automatic "unfold" function?

btw. we are using the SVN not only for code but for related independent documents. The sparse checkout keeps the structure of the repository on my local machine and reduces the risk to take code with me I don't want to touch and I "should not have available" localy.

Thanks to all for your attention.
Dag

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

Michael Diers

unread,
Oct 12, 2016, 6:42:10 AM10/12/16
to us...@tortoisesvn.tigris.org
This problem has been addressed by a patch from Patrick Steinhardt:

Fix issues with "update to revision" on sparse checkouts:
* update items that were not expanded in the repo browser with the
existing depth
* if the user toggles a checkbox of a folder, only then update that
folder recursively

https://sourceforge.net/p/tortoisesvn/code/27489/

Also see
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3189503.

--
Michael Diers, elego Software Solutions GmbH, http://www.elegosoft.com/

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

inde...@googlemail.com

unread,
Dec 19, 2018, 10:55:41 AM12/19/18
to TortoiseSVN
Is this Patch incorporated into future releases ?
I'm still having this issue, and it makes me #*!@%$?

TortoiseSVN 1.10.1, Build 28295 - 64 Bit , 2018/07/15 12:14:12
ipv6 enabled
Subversion 1.10.2, -release
apr 1.6.3
apr-util 1.6.1
serf 1.3.9
OpenSSL 1.1.0h 27 Mar 2018
zlib 1.2.11
SQLite 3.23.1
Reply all
Reply to author
Forward
0 new messages