svntransactionscopypvcs

Subversion: Can multiple copy operations be done in a single revision?


From what I understand about transactions in Subversion this should be possible in principle, but I don't know any tool that supports it.

The background is that we are discussing a migration from PVCS Dimensions to Subversion, and the main feature cited as missing in Subversion is "Design Parts". A design part is an arbitrary collection of files that can be handled together, e.g. all the source files needed for a subproject.

One idea to replace this is by copy operations in a Makefile, which copy the relevant files into a branch. But if all files are copied separately this may lead to a lot of revisions, which may clutter the history, so it would be nice to avoid that.

EDIT: Some more background information:

The project consists of several (5-10) subprojects which are released separately, but which share some common source files and external libraries imported from other projects.

One reason cited for the design parts is restricting dependencies on source files, another is for managing the products of subprojects, so that all of them can be updated in version control in one operation. Both kinds of files are somewhat sprinkled across directories.

We are about 5 developers on the project.


Solution

  • You can make the copies in a working-copy and commit them all at once later. That creates only one revision.

    With the command-line-client it could look like that:

    svn copy file1 directory
    svn copy file2 directory
    svn copy file3 directory
    svn commit
    

    The main downside is you need a working-copy and this working-copy has to include source- and target-directory.