Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I do a single SVN commit across multiple externals at the command line?

Tags:

This may be impossible, but I'm going to ask anyway.

Without going into the details of why it's like this, I have two primary checkouts that I work in, one for the production release branch, and one for trunk. Each of them is a small collection of svn:externals references to sub-projects, with no direct content under the checked-out svn directory.

That is, the four svn:externals directives add all of the content in each of the checkout directories.

When I do a commit via Eclipse(/Subclipse) I can commit changes across all of the external projects in one go, which is good because they're just separate sub-projects in the same repository and this allows me to avoid doing 4 separate commits in a row to the same repo.

Is it not possible to do the same thing from the command line? Commits for each of the externals could certainly be scripted and aliased to one command, but I'd rather avoid cluttering the commit log with separate commits for related changes if possible.

like image 982
Trevor Bramble Avatar asked Apr 20 '09 17:04

Trevor Bramble


People also ask

How do I commit multiple files in svn?

Use a changeset. You can add as many files as you like to the changeset, all at once, or over several commands; and then commit them all in one go.

How do I commit all files in svn?

svn add --force . will add all the files and directories below your current working directory that aren't added yet (and aren't ignored) to your working copy. A svn ci -m "" will then handle the commit. The only way without 'svn add' would be to use 'svn import', but this assumes a new location.


2 Answers

You can specify all files and folders you want to commit in the command line client, including the externals. Since the CL doesn't recurse into externals, you have to specify those in your commit command separately:

svn ci working_copy externals1 externals2 -m "log message" 

Haven't tried this though. If it doesn't work, you have to specify all the modified files and folders separately, not just the 'root' folders of the externals.

like image 163
Stefan Avatar answered Sep 20 '22 12:09

Stefan


With the latest SVN you can do: --include-externals

like image 29
jgmjgm Avatar answered Sep 22 '22 12:09

jgmjgm