How to combine SVN commits?

How do I take a range of commits in my SVN repository and combine them?

For example, revisions 4-10 exist in the repository and I want to combine them into a new revision 4 that contains all the changes in the previous 4-10.

  • How to migrate code from SVN to GIT without losing commits history?
  • Delete file from the working copy only but not from the repository
  • IntelliJ won't save SVN authentication information
  • Where does TortoiseSVN store its settings (for example, Global Ignore Pattern)?
  • How to get the current revision number into a file after export?
  • Is there a wiki like that on Google Code Hosting that commits every change in the subversion repository?
  • I don’t want to break any existing tags, which were created via svn copy.

    This is because the repository was previously in ClearCase, and Polarion’s migration tool left a huge number of single file commits that need to be cleaned up.

  • How to get all SVN commits that do not include Jira bug key in the comment?
  • How to set svn:ignore with multiple values?
  • How to upgrade JavaHL on Ubuntu?
  • Subversion (SVN) and static libraries (.a files) compatibility?
  • Looking for a way to store versions in a binary compiled from git repo
  • rsync exclude according to .gitignore & .hgignore & svn:ignore like --filter=:C
  • 4 Solutions collect form web for “How to combine SVN commits?”

    You can create a branch at revision 3 and merge revisions 4-10 into the branch

    Reading between the lines, take a look at svk, which should let you run a local repository then commit a number of changes at once to the main repository.

    You can’t do that without creating a new repository, so better just get over it.

    If you really really need to do this you could probably do it with “svnadmin dump” and “svnadmin load”.

    Edit: If you just want to push the commits out of the history of the trunk but are fine with them remaining elsewhere in the repository then something similar to Manu’s proposal is a workable solution: Rename trunk to old_trunk, copy the revision before the range you want to merge to trunk, then merge the revisions in the range and commit.

    If you really need to do this, then check out each revision (not single-file commit) from ClearCase and then manually copy the files over a new SVN checkout using a tool like WinMerge to make sure all file adds and deletions are copied over as well as changes. Then do an SVN commit.

    If this is too much manual work due to the number of ClearCase commits (although you could probably automate this without too much difficulty), then consider just committing major revisions to SVN (e.g., point releases) manually.

    If that is not feasible, then consider not bringing over any revision history from ClearCase – just start fresh with SVN. Perhaps commit a text file with the old change log from ClearCase for historical purposes, so that if someone needs to go back and get some old code, they can figure out what revision to look for.

    Git Baby is a git and github fan, let's start git clone.