Search code examples
svncommitchangelist

Subversion: Can I commit several checked-out folders at once?


Let's say I have working copies of several different folders from my SVN repository scattered across my file system. Their parent directories are not part of the repository. E.g.

somedir1\
   workingcopyOfA\
   workingcopyOfB\
somedir2\
   somedir3\
       workingcopyOfC\
   workingcopyOfD\

Now they all contain changes which I would like to check-in at once (calling svn only once for convenience, using only one new revision number for simplicity).

Is this possible? Is this what changelists are meant for? What can I do if I use svn < v1.5?

(There are some similar questions here on SO, but they refer to different problems.)

EDIT: To clarify: The working copies all belong to the same repository, but to different parts, i.e. the repository looks like this:

RepoDirA\
RepoDirB\
RepoDirC\
RepoDirD\

Solution

  • As other noted, it is not possible as is for good reasons (see D Garcia's answer notably).

    If eclipse supports something like it, I suspect it creates multiple checkins behind your back.

    What is possible however is to diff the changes in one working directory and apply those changes to the other working directory (if they overlap). Once you've done that, all your changes are in the single working directory where you can check in from. The merging issues D Garcia pointed at are now your responsibility to resolve at patch time.

    If your working directories don't overlap, and the only reason you have multiple working directories is because e.g. you did not want to pull the whole repository, I suggest checking out the hierarchy to the common root of your working directories, but non-recursively (using svn co -N root) and then get the specific working directories with svn update path/to/subsetOfInterest for the intermediate directories). That way, they all live inside the same working directory, and allow to work on them atomically.