Can you merge revisions with Subversion

Can I make multiple revisions in Subversion and combine them into one?

I would like to be able to make multiple commits that involve some intermediate blind lanes that I no longer care about and create a single revision. For some reason other than to tidy up the svn error history, fix a litle bit.

+2


source to share


4 answers


You can do this with svnadmin dump

, then manually edit the dump file and svnadmin load

over again, but it is not recommended because it is error prone and somewhat defeats the purpose of version control.



Do not do this.

+4


source


Not

If you can do that, you can change the history of your subversion server. How can you trust your code if you can change older versions?



Indeed, I mean, you shouldn't. If you have old commits that you don't like, even though you can "delete" them, you shouldn't. They are part of this HEAD story. Only the tip should be great. You will make many more mistakes in this code ... just fix them and move on.

+5


source


Not. You can not.

You can edit commit notes if you install a pre-revpp hook in the repository that is as close to you as possible.

0


source


This is not something standard or desirable in version control systems. You could, of course, with a lot of work, start incremental checks, copy the file to another new local database with the commits where you want them to be (and even so, moving or deleting would be difficult to manage).

What you can easily do is remove files and paths from the repository using svnadmin dump

in combination with svndumpfilter

. It can help you get rid of files that don't have a place in the repository, which is an easy mistake (deleting them with SVN still leaves them in the repository, which sometimes results in huge ones). Use with care.

0


source







All Articles