Gretchen
Gretchen

Reputation: 31

svn commit all at once (queue)?

I am using Tortoise svn client on Windows, and I need to be able to commit changed files from different subfolders all at once - in a single commit. Like adding files to a queue prior to commit or something like that? How can I accomplish this?

Is there another svn client on Windows that can do that?

Upvotes: 3

Views: 2479

Answers (8)

Glenn
Glenn

Reputation: 1855

So, one feature that I use frequently with the TortoiseSVN that I think might be similar to your request is dragging folders or files on to the commit dialog. As long as they are all under a single rooted working folder, it will figure that out and let you commit them in a single commit. It's a very handy feature that I use all the time.

A further extension of this feature that I would like to see is what Araxis Merge provides. You can right click on a file or folder, then select 'Queue for Comparison':

Araxis Merge context menu selections - Queue for Comparison

Then when you right-click another folder/file it allows you to do a comparison with the one or more items that were queued up:

Araxis Merge context menu selections - Compare with Araxis Merge (+n in queue)

I'd really like the Tortoise shell to support 'Queue for Commit', then adding a 'Commit (with +n in queue)' menu if the queue isn't empty.

Upvotes: 1

Michael Sorens
Michael Sorens

Reputation: 36688

Several of the answers already provided give essentially the same (correct) answer--commit from your working copy root. But I think it is useful to give just a couple more details.

First, committing from the root does not imply you have to commit everything (in case you are concerned about not yet committing some unrelated edits). The commit dialog lets you select or deselect from the set of all changed files.

Second, and perhaps most relevant to your question, regardless of how many files you select to commit, the commit operation is atomic, i.e. it commits all the files or, if there was a problem with any one or more of them, it commits none. Thus, Subversion guarantees to keep your changes grouped together as a single change set.

Third, a point to be aware of that relates slightly less directly, but is still worth mentioning here: it is important to be aware that Subversion operations (outside the repo-browser) operate under a two-stage process: first you make a local change, then you commit the change. This seems almost a tautology when it comes to the edit operation: first you edit, then you commit; the act of editing itself does not affect the repository. Obvious, right? This is not nearly so obvious when you consider the add operation: first you add, then you commit; the act of adding also does not affect the repository! So relating this to your question, edit various files, add various files, delete various files, etc., as you build your change set. Once you have done that, open the commit dialog from the root of your working copy and select all the files in your change set and commit them in one atomic operation.

Upvotes: 2

Cédric Julien
Cédric Julien

Reputation: 80761

You can use the changelist feature of subversion (which is also available in TortoiseSVN > 1.5), that allows you to create a list of files to commit related to the same feature.

Upvotes: 0

manojlds
manojlds

Reputation: 301037

If your working copy has the root of all these folders, you can go to this root and commit. If you had checked out these subfolders separately without the root, you have to make multiple commits.

Upvotes: 5

Marc Bouvier
Marc Bouvier

Reputation: 702

Try to commit from your top folder. It will show you the modified and unversionned files , even if they are in subfolders.

Upvotes: 1

CodingWithSpike
CodingWithSpike

Reputation: 43698

If they are all part of the same repository, then you would just commit from the root folder of that repository. If they are from different repositories, then the concept somewhat doesn't make sense, because you would be making separate commits to separate repositories, so it can't really be "one commit". If you have subfolders that are all different repositories but you just want to perform 1 commit operation on the client to commit them all, then you could just make some kind of .bat script to iterate over the subfolders and run the same commit command with the same commit message.

Maybe add more detail as to what these "subfolders" are?

Upvotes: 1

Chewpers
Chewpers

Reputation: 2440

Go up 1 directory from the subdirectories, right click, and "SVN Commit.." from there. Then in the "Changes made" pane, select only (and all) the subdirectories that you would like to commit at once.

Upvotes: 0

Dan McClain
Dan McClain

Reputation: 11920

Are they all in the same repository? If so, just go to the root of your working copy and commit from there

Upvotes: 0

Related Questions