I have a project that has a revision number of 3960. But unfortunately it is not under source control. Now I would like to put it under SVN and use Tortoise SVN. But when I put it there it will have revision from 1,2,3,4 and so on.
Is there a way to change the revision number to 3960?
The safest way I can think of would be to make a dump file with an appropriate number of empty revisions, than load it. The format would be something like:
SVN-fs-dump-format-version: 2
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2009-01-12T14:58:15.449041Z
PROPS-END
Revision-number: 1
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2009-01-12T14:58:40.758271Z
PROPS-END
Revision-number: 2
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2009-01-12T14:58:44.509698Z
PROPS-END
You could omit the svn:date and it would still be a valid svn repository, but queries by {date} wouldn't work (just like they don't in any case where the dates are not monotonically increasing with revision). So it's probably best to fake up a string of plausible dates.
If you want 3960 such revisions, you probably want to write a script to generate the dump file. I leave that as an exercise to the reader :-)
It is possible in theory, but not very useful.
If you need somehow to keep track of this information, you may consider creating a tag '3960', but otherwise leaving the normal revision process taking place.
As said in the manual:
Global Revision Numbers
Unlike those of many other version control systems, Subversion's revision numbers apply to entire trees, not individual files. Each revision number selects an entire tree, a particular state of the repository after some committed change.
Another way to think about it is that revision N represents the state of the repository filesystem after the Nth commit. When a Subversion user talks about “revision 5 of foo.c”, they really mean “foo.c as it appears in revision 5.”
A revision number is different than an **application version number" (the version number of your application): the latter is represented by a tag.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With