mark
mark

Reputation: 6559

How to do non-recursive commits with TortoiseSVN?

When I modify a property (say, svn:ignore) on the top most directory I checked out (most of the time it's trunk, anyway), using TortoiseSVN the client(s) recursively go through the complete project.

Big tree, much data, takes a long time.

How can I avoid this? There may be changes somewhere else but I know that I'm just not interested in them and uncheck them anyway.

I'm aware of the sparse checkout feature but I don't see how I can apply this here as I don't have a sparse checkout. Do I need to create a second, sparse checkout, apply the changes/commit and then update my other copy?

Upvotes: 1

Views: 7793

Answers (2)

John Feminella
John Feminella

Reputation: 311536

Try:

svn commit --non-recursive [target]

[Edit: The OP updated his question to clarify that he's referring to TortoiseSVN, not the regular Subversion command-line.]

No, TortoiseSVN does not provide a direct way to non-recursively commit. However, if you commit something at the top level of a directory but not something at a lower level (for example, you deselect it), this by necessity causes a non-recursive commit to occur. See here.

Thus, there's a workaround. If you really, really want to do this and you don't like the command line, just make a trivial change to a file in an underlying directory, commit your real file while deselecting the dummy change, then revert the dummy change. This will force TortoiseSVN to do a non-recursive commit.

Upvotes: 7

cdeszaq
cdeszaq

Reputation: 31280

Since you are doing an operation on a directory, tortoise assumes that it might affect everything inside it, and so looks all the way down inside your working copy.

The check on the working copy should be fairly fast, even for a large repo, since it is a local operation on the file system with no network operations involved

After Tortoise has found all of the modified files, you can select just the one(s) you care about and commit just those.

In any case, the difference lies in how directories are treated differently than plain files, and this difference in treatment may even relay on how subversion itself behaves, not just Tortoise.

Upvotes: 0

Related Questions