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_at_subversion.tigris.org].
Received on 2008-12-04 01:19:41 CET