Discipol
Discipol

Reputation: 3157

SVN Merge revisions into a single one

I have created a new repository and added some things inside, now i have a huge list of revisions because of the addition. I wish to collapse all of the revisions into a single one, but I couldn't find a solution to this.

All I could find is merging branch with trunk.

Anyone know how to do this?

Upvotes: 0

Views: 388

Answers (1)

Lazy Badger
Lazy Badger

Reputation: 97270

Short answer

You can't do it - history in Subversion is immutable

Longer answer

You can't do it easy and using only svn-client and single repo

Long answer

You have to create and use new repository, in which you'll store Revision 1 and (after handwork) state of the latest revision

Draft of process

  • export (as unversioned tree) revision 1
  • export into another location HEAD
  • create new repo
  • Import into it Rev1-tree
  • Checkout into (new) WC new repository
  • Update WC by files from HEAD-export (replace updated files, delete deleted, add added)
  • Commit
  • Delete all N-revisions repository

Note: Steps 1 and 4 can be

  • Create dump of repo with revision 1 only
  • Load dump from p.1

Upvotes: 3

Related Questions