You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by be...@aol.com on 2010/12/01 12:45:31 UTC

Specifying a start revision number for a new repository

Hello!

I'm developing and hosting an open source project 
(treegraph.bioinfweb.info) and want to start using subversion to
manage the source codes (including a webinterface with sventon).
Until now the source codes revisions were organized manually without
any version controol system in formof f backups and the current 
revision is 197. I have already set up a svn server with an empty 
repository and want the revision numbers in svn to start with 198, 
when uploading my source codes there, to avoid having different 
revision numbers in svn and the download section of the website. 
Is there any way to set an initial revision number when doing the 
first import to svn?

I have not found any information on that, and the only idea I have
until now is to make 197 more or less senseless commits before 
committing the first real change to my source codes. I would really
appreciate if anyone known a more elegant (and faster) way of doing
that.

Thanks a lot,
Ben


Re: Specifying a start revision number for a new repository

Posted by Ulrich Eckhardt <ul...@dominolaser.com>.
On Wednesday 01 December 2010, benstoever@aol.com wrote:
> Until now the source codes revisions were organized manually without
> any version controol system in formof f backups and the current
> revision is 197. I have already set up a svn server with an empty
> repository and want the revision numbers in svn to start with 198,
> when uploading my source codes there, to avoid having different
> revision numbers in svn and the download section of the website.

Don't. There is one easy (and even clean) way to do it, and that is to create 
a repository and then import each of the previous releases (using 
svn_load_dirs). However, I'm not even sure if this works, because a single 
import could create more than one revision if it needs to create the target 
directory in advance or somesuch.

However, you should still do that. After importing each existing release, you 
create a "tag", which is a copy of the release in a dedicated folder. Then, 
via the URL svn://your-repository/tags/release-190 you can refer to release 
190, regardless of the SVN-internal revision of the repository.

This is also the reason for the initial "Don't", that these revision numbers 
are for internal use of SVN rather than for something that is publically 
visible. For that, every project uses its own schema, some tag a date to it, 
some use a triple or quadruple of numbers, and other have even weirder 
approaches. Still, using the tag name that you like you can map all of these 
onto Subversion without problem.

Lastly, even if you could import it like that, it would only allow a single 
change between releases, because every change bumps the repo's revision 
number by one.

Make sure you understand the intentions for the customary trunk/tags/branches 
approach. These are outlined in the book and extremely useful!

Good luck!

Uli

-- 
ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/


**************************************************************************************
Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Visit our website at <http://www.dominolaser.com/>
**************************************************************************************
Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden.
E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************


Re: Specifying a start revision number for a new repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 1, 2010, at 06:45, benstoever@aol.com wrote:

> I'm developing and hosting an open source project 
> (treegraph.bioinfweb.info) and want to start using subversion to
> manage the source codes (including a webinterface with sventon).
> Until now the source codes revisions were organized manually without
> any version controol system in formof f backups and the current 
> revision is 197. I have already set up a svn server with an empty 
> repository and want the revision numbers in svn to start with 198, 
> when uploading my source codes there, to avoid having different 
> revision numbers in svn and the download section of the website. 
> Is there any way to set an initial revision number when doing the 
> first import to svn?
>  
> I have not found any information on that, and the only idea I have
> until now is to make 197 more or less senseless commits before 
> committing the first real change to my source codes. I would really
> appreciate if anyone known a more elegant (and faster) way of doing
> that.

Creating 197 throwaway revisions is the only thing that occurs to me as well.

However, the revision number is really only "the number of changes that have been made to the repository" so you shouldn't attach too much meaning to it.

If you have kept backups of each (or some) of your existing 197 revisions that you managed by hand, perhaps you'd like to import these into the repository. You could use the svn_load_dirs.pl script to help you with this, assuming each revision is in its own complete directory somewhere. Then your 197 revisions in the repository wouldn't be senseless; they'd be your existing history.