3

My company is performing a SVN repository migration and I would like to avoid overlapping of revision numbers between the two repositories (which are both active at the time being).

My requirement is to force the revision of the new repository to a specific revision number (say: 100.000).

By analyzing the FSFS repository I have come across the "db/current" file which sounds like the right place where to change the repository number.

Does anyone have any experience with this procedure? I would like to avoid strange things happening in the future!

PS: I understand I can create "100.000" dummy commits to the repository. Please share your experience with such procedure and possible performance issues of the repository during and after the prodecure

PS3: I understand that it might be a good idea to have everybody commit working copies before the procedure. This is not a problem for us (the new repository has very limited users right now). Still, if you have experience with this or similar requirements, please share! :)

PS3: I understand this is not a standard SVN procedure and many might object with the requirement itself. Let's just assume my requirement is sound! :)

bahrep
  • 29,961
  • 12
  • 103
  • 150
Pokot0
  • 562
  • 1
  • 7
  • 12

4 Answers4

2

Firstly, don't bother trying to frig this. If you are to merge the 2, you can use dump/load to put the new one on top of the old and revision numbers will be handled for you. So unless you need to know what revision number a particular version is (for externals perhaps, or tags) then you needn't worry about this at all.

If you can work with the tool, its always better than finding later that svnsync or svnadmin pack, for example, won't work with your modified repository.

OK, so if you still want to do it, update the last-revision number in revprop 0 and the db/current file and you should be ok.

I don't think you'll find anyone who has direct experience with this approach though!

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
  • Thanks! I was missing the revprop 0! btw: I am not going to merge the two repositories. We are moving "project-by-project" to the new repository and we will keep the old one stale as "history" once completed all projects. Thanks again! – Pokot0 Aug 19 '09 at 10:19
2

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=940194 :

Q: Is there a way to artificially increment the repository revision number in subversion?

A: The only way to do it would be to commit a number of dummy revisions.

pauldoo
  • 18,087
  • 20
  • 94
  • 116
2

One easy way to make dummy revisions...

As many times as required, repeat:

svnmucc propset dummy_prop 0 -m "increases revision" https://svn/repo/ --username me --password x7G_5-u1,W

Note:

  • The value "0" does not have to be different from one commit to the next. You can just repeat the same command.
  • Changes the repository directly, without a checkout or working copy.
  • Changes the root folder (referenced by the trailing / after "...svn/repo"). Thus it can even be performed on a fresh'n'empty repository.
  • Changes only a property of a folder. These exist only for SVN. So if you checkout or update, svn-unaware applications (like your operating system) will not notice any change about the folder itself. Only in the .svn subfolder, where these properties are stored, files are changed.
  • svnmucc is part of the official Subversion tools, at least in 1.8, maybe earlier, see also: http://svnbook.red-bean.com/en/1.8/svn.ref.svnmucc.re.html
  • Of course the password is just an example, don't worry that I disclosed any real credentials. :-)

I hope this saves others a few steps of research.

klaus thorn
  • 220
  • 3
  • 8
-3

With Subversion 1.7 you can use the svndumpfilter tool to filter out unwanted commits from a dump file created by svnadmin dump:

http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

From that page:

[svndumpfilter] acts as a path-based filter for repository dump streams

So this can be used to remove commit data from particular paths, which is helpful in some repo management scenarios (but not all); specifically, where commits to a repo are aggregated by folders (such as a release identifier), svndumpfilter will help to reduce the repo size, allowing you to remove unwanted folders.

Matthew Skelton
  • 2,220
  • 21
  • 21