[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: I created a branch with the same name as an existing branch !

From: Ryan Schmidt <subversion-2005_at_ryandesign.com>
Date: 2005-09-07 15:18:42 CEST

On Sep 7, 2005, at 14:57, Jérôme Conus wrote:

> Because of a bad manipulation, I created a branch with the same
> name as an existing branch (in the same repository).
> Apparently, this didn't corrupt the history of the existing branch,
> but just added a revision with the existing branch.
> I have several questions regarding this event :
> - Is it possible to revert what I did ?
> - Why did subversion accept to create a branch with the same name ?

Branches are nothing special to Subversion. They're just directories.
You're free to create new directories as you like (within the
permission structure you've set up for your repository, of course).

The Subversion copy command works like the Unix copy command.
Consider this:

$ svn cp $REPO/project/trunk $REPO/project/branches/1.0

- If branches/1.0 does not exist, then 1.0 becomes a copy of trunk;
this is what you most likely wanted
- If branches/1.0 already exists, then a new directory trunk is
created inside 1.0; this is most likely what happened

You can revert this change, like any other change, by doing a reverse
merge. This is described in the book:


> As my comment regarding the branch creation is now full-wrong (no
> branch has been created), I'd like to change it, but I get this
> error message :
> 'DAV request failed; it's possible that the repository's pre-
> revprop-change hook either failed or is non-existent
> At least one property change failed; repository is unchanged'
> Does anyone know what this means ?

The log message is a revision property, meaning the property is
attached to a specific revision. By definition, this means these
properties are not versioned. If you change a revision property, the
old value of the property is lost forever.

It is Subversion's intent that a repository should never lose
information. Because information is lost when you change revision
properties, you are not allowed to change revision properties by
default. If you want to allow people to change revision properties,
then you must enable this functionality by creating a pre-revprop-
change hook. Hooks are described in the book:


In your repository's hooks directory is a template of such a script
called pre-revprop-change.tmpl. If you're on a Unix server, you can
rename this to just pre-revprop-change and it'll allow the log
message to be changed, but no other revision properties. This is
acceptable if you trust your developers. A better script would send
out an email in response to revprop changes so that there is at least
an email record of the change being made. You could also log such
changes to a log file.

If you are on a Windows server, then you will need to rewrite the
script in a language available on the Windows platform, such as a
batch file. I can't help you with that, though.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Sep 7 15:20:35 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.