You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Aaron P. Martinez" <ml...@proficuous.com> on 2008/12/03 15:17:30 UTC

reposity versioning

Hi All,

I have developers who I maintain subversion for and they have one
repository that they call "core", this is the base of many new projects. 
When they start on a new project they would like to start that project at
revision 1.0 but I'm not sure how to copy the core to a new repository and
get the revision numbers back down.  Is this even possible?

Thanks in advance,

aaron martinez

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: reposity versioning

Posted by Les Mikesell <le...@gmail.com>.
Aaron P. Martinez wrote:
> Hi All,
> 
> I have developers who I maintain subversion for and they have one
> repository that they call "core", this is the base of many new projects. 
> When they start on a new project they would like to start that project at
> revision 1.0 but I'm not sure how to copy the core to a new repository and
> get the revision numbers back down.  Is this even possible?

No, with subversion every change bumps the global revision number. 
Usually you want to establish a policy of copying any interesting 
revisions to tags where you can use a more meaningful name/numbering scheme.

-- 
   Les Mikesell
    lesmikesell@gmail.com

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: reposity versioning

Posted by Les Mikesell <le...@gmail.com>.
Giulio T wrote:
>
>> We wouldn't be keeping the same reposity, for every new project i create a
>> new repository.  I think the checking out from core and then importing to
>> the new repository is what will do the trick.
> 
> I dind't say checking out from core. I said copying, meaning copying with the OS command (not svn cp command).
> 
>> I agree about the revision numbers.  I think they are more concerned about
>> "version" numbers.  They always want the new project to start at version
>> 1.0, if that has any bearing.  That being said, i'm not a developer so I'm
>> still trying to get a handle on the whole process and they aren't the best
>> at describing what they want.  I think this will work fine for what I need
>> though.
> 
> If they actually meant "version 1.0" rather than "revision", maybe it would simpler to keep everything in one repository and use the tags instead. You create a new project copying (this time with svn) the core, then create the usual structure of branches and tags and then, I you really want, you create the first tag, called 1.0. Something like the following
> 
> svn mkdir <URL to new project> -m"Creating new project blah blah"
> svn copy <URL to core> <URL to new project>/trunk -m"Copying core"
> svn mkdir <URL to new projct>/branches -m"Creating branches"
> svn mkdir <URL to new project>/tags -m"Creating tags"
> svn copy <URL to new project>/trunk <URL to new project>/tags/1.0 -m"Tagging version 1.0)

If you are new to subversion concepts, you might want to browse the book 
to understand how trunk/branches/tags are typically used.  You might 
really want a 'release branch' policy where at certain points like a 
major version release number you copy to a branch for final 
testing/development to isolate it from larger changes that might be 
happening in the trunk.   In that scenario you might incorporate the 
product release/version number in the branch name.  This doesn't have 
anything to do with repository revision numbers.

-- 
   Les Mikesell
     lesmikesell@gmail.com

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: reposity versioning

Posted by Giulio T <gi...@uk.linedata.com>.
> -----Original Message-----
> From: Aaron Martinez [mailto:ml@proficuous.com]
> Sent: 03 December 2008 15:45
> To: Giulio Troccoli
> Cc: 'Aaron P. Martinez'; users@subversion.tigris.org
> Subject: RE: reposity versioning
>
> >>
> >
> >
> > Linedata Services (UK) Ltd
> > Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1
> 6DB
> > Registered in England and Wales No 3027851    VAT Reg No 778499447
> >
> > -----Original Message-----
> >
> >
> >> From: Aaron P. Martinez [mailto:ml@proficuous.com]
> >> Sent: 03 December 2008 15:18
> >> To: users@subversion.tigris.org
> >> Subject: reposity versioning
> >>
> >> Hi All,
> >>
> >> I have developers who I maintain subversion for and they have one
> >> repository that they call "core", this is the base of many new
> projects.
> >> When they start on a new project they would like to start that project
> >> at
> >> revision 1.0 but I'm not sure how to copy the core to a new repository
> >> and
> >> get the revision numbers back down.  Is this even possible?
> >>
> >
> > No, you cannot "reset" the revision if you keep the project in the same
> > repository.
> >
> > You can, however, create a new repository, check it out to a working
> copy
> > (which would be at revision 0), copy your "core" project in this WC, and
> > import it into the repository (or add and then commit). This will create
> > revision 1.
> >
> > Anyway, why is it important? The revision is just a number, you, or your
> > developers, should not give it any special meaning.
> >
> > Giulio
> >
> > ------------------------------------------------------
> >
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=
> 978924
> >
> > To unsubscribe from this discussion, e-mail:
> > [users-unsubscribe@subversion.tigris.org].
> >
> Thanks Giulio,
>
> We wouldn't be keeping the same reposity, for every new project i create a
> new repository.  I think the checking out from core and then importing to
> the new repository is what will do the trick.

I dind't say checking out from core. I said copying, meaning copying with the OS command (not svn cp command).

> I agree about the revision numbers.  I think they are more concerned about
> "version" numbers.  They always want the new project to start at version
> 1.0, if that has any bearing.  That being said, i'm not a developer so I'm
> still trying to get a handle on the whole process and they aren't the best
> at describing what they want.  I think this will work fine for what I need
> though.

If they actually meant "version 1.0" rather than "revision", maybe it would simpler to keep everything in one repository and use the tags instead. You create a new project copying (this time with svn) the core, then create the usual structure of branches and tags and then, I you really want, you create the first tag, called 1.0. Something like the following

svn mkdir <URL to new project> -m"Creating new project blah blah"
svn copy <URL to core> <URL to new project>/trunk -m"Copying core"
svn mkdir <URL to new projct>/branches -m"Creating branches"
svn mkdir <URL to new project>/tags -m"Creating tags"
svn copy <URL to new project>/trunk <URL to new project>/tags/1.0 -m"Tagging version 1.0)

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: reposity versioning

Posted by Magne Nordtveit <ma...@offsim.no>.
On Wednesday 03 December 2008 16:44:59 Aaron P. Martinez wrote:
> I agree about the revision numbers.  I think they are more concerned about
> "version" numbers.  They always want the new project to start at version
> 1.0, if that has any bearing.  That being said, i'm not a developer so I'm
> still trying to get a handle on the whole process and they aren't the best
> at describing what they want.  I think this will work fine for what I need
> though.

If it is versioning of the projects they want, I wouldn't suggest using the 
revision of the repository unless you want the version number to be 
incremented with every commit. I would suggest using a build system that eases 
the versioning of your software without the use of subversions rev. no. That 
way you can swap subversion with a different version control system, and it 
wouldn't effect the version of your software. 

Magne
-- 
Magne Nordtveit <ma...@offsim.no>
Systems Engineer
Offshore Simulator Centre AS
http://www.offsimcentre.no

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: reposity versioning

Posted by "Aaron P. Martinez" <ml...@proficuous.com>.
>>
>
>
> Linedata Services (UK) Ltd
> Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
> Registered in England and Wales No 3027851    VAT Reg No 778499447
>
> -----Original Message-----
>
>
>> From: Aaron P. Martinez [mailto:ml@proficuous.com]
>> Sent: 03 December 2008 15:18
>> To: users@subversion.tigris.org
>> Subject: reposity versioning
>>
>> Hi All,
>>
>> I have developers who I maintain subversion for and they have one
>> repository that they call "core", this is the base of many new projects.
>> When they start on a new project they would like to start that project
>> at
>> revision 1.0 but I'm not sure how to copy the core to a new repository
>> and
>> get the revision numbers back down.  Is this even possible?
>>
>
> No, you cannot "reset" the revision if you keep the project in the same
> repository.
>
> You can, however, create a new repository, check it out to a working copy
> (which would be at revision 0), copy your "core" project in this WC, and
> import it into the repository (or add and then commit). This will create
> revision 1.
>
> Anyway, why is it important? The revision is just a number, you, or your
> developers, should not give it any special meaning.
>
> Giulio
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=978924
>
> To unsubscribe from this discussion, e-mail:
> [users-unsubscribe@subversion.tigris.org].
>
Thanks Giulio,

We wouldn't be keeping the same reposity, for every new project i create a
new repository.  I think the checking out from core and then importing to
the new repository is what will do the trick.

I agree about the revision numbers.  I think they are more concerned about
"version" numbers.  They always want the new project to start at version
1.0, if that has any bearing.  That being said, i'm not a developer so I'm
still trying to get a handle on the whole process and they aren't the best
at describing what they want.  I think this will work fine for what I need
though.

Thanks.

Aaron

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

RE: reposity versioning

Posted by Giulio T <gi...@uk.linedata.com>.
>


Linedata Services (UK) Ltd
Registered Office: Bishopsgate Court, 4-12 Norton Folgate, London, E1 6DB
Registered in England and Wales No 3027851    VAT Reg No 778499447

-----Original Message-----


> From: Aaron P. Martinez [mailto:ml@proficuous.com]
> Sent: 03 December 2008 15:18
> To: users@subversion.tigris.org
> Subject: reposity versioning
>
> Hi All,
>
> I have developers who I maintain subversion for and they have one
> repository that they call "core", this is the base of many new projects.
> When they start on a new project they would like to start that project at
> revision 1.0 but I'm not sure how to copy the core to a new repository and
> get the revision numbers back down.  Is this even possible?
>

No, you cannot "reset" the revision if you keep the project in the same repository.

You can, however, create a new repository, check it out to a working copy (which would be at revision 0), copy your "core" project in this WC, and import it into the repository (or add and then commit). This will create revision 1.

Anyway, why is it important? The revision is just a number, you, or your developers, should not give it any special meaning.

Giulio

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: reposity versioning

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Dec 3, 2008, at 09:17, Aaron P. Martinez wrote:

> I have developers who I maintain subversion for and they have one
> repository that they call "core", this is the base of many new  
> projects.
> When they start on a new project they would like to start that  
> project at
> revision 1.0 but I'm not sure how to copy the core to a new  
> repository and
> get the revision numbers back down.  Is this even possible?

Revisions in Subversion are integers, not dotted decimal numbers as  
they are in some other version control systems like CVS.

It sounds like what your developers want is to use this "core"  
repository as a template for how they want other projects to begin.  
If so, then yes, certainly, you can dump the state of the "core"  
repository as it currently is and load it into a new empty repository  
to start off a new project.

A simple "svnadmin dump /path/to/core > core.dump" would dump the  
entire history of "core" which sounds like it's not what they want.  
If they just want to get a single revision that contains the state of  
"core" as it exists now, then this is easily achieved with "svnadmin  
dump /path/to/core -rHEAD > core.dump".

Then you create a new repository for the new project with "svnadmin  
create /path/to/newproject" and then you load the core dump into it.  
For this step, it is imperative that you use the --ignore-uuid flag  
to svnadmin load. This ensures that the new project's repository  
retains the unique identifier that it got when the repository was  
created, and does not inherit the same unique identifier that the  
core repository has, which has been recorded into the core dump.  
Every repository's UUID must really be unique, as its name suggests.  
So, to load the dump into the new repository, use "svnadmin load / 
path/to/newproject --ignore-uuid < core.dump"

If you modify your repositories' conf files and/or hook scripts, you  
may find it useful to immediately delete the conf and hooks  
directories of the newly created repository and replace them with  
symlinks to a common copy of your hooks and configuration. That way  
all repositories can share the same hooks and the same configuration.

If you create repositories for new projects often, you may want to  
write a script to automate all of the above.

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].