Re: Best way to correct directory error?

2018-08-11 Thread Daniel Shahaf
Bo Berglund wrote on Sat, 11 Aug 2018 16:41 +0200:
> Now he has put his project sources into:
> /Projectname/trunk/Projectname
> 
> What is the best way to fix this so it will reside in
> /Projectname/trunk instead?
> 
> - Check out /Projectname/trunk and receive subdir Projectname
> - Move to trunk on client
> - svn mv Projectname/* ./*
> - svn ci -m "log message"
> 

This is fine.  Note that * does not usually match dotfiles, so you
should make sure to also 'svn mv Projectname/.foo .foo' for every
dotfile in Projectname/.

There are other ways but in this case there's no need for them.
(They're more useful in the opposite case, when one wants to switch from
a ^/ structure to a ^/trunk/ structure; or if there were
branches of /Projectname/trunk/Projectname around.)

> Or after checkout:
> - Move to trunk/Projectname on client
> - svn mv * ../
> - mv ..
> - svn ci -m "log message"

Assuming the second 'mv' was meant to be a 'cd', that's equivalent.

Cheers,

Daniel


Best way to correct directory error?

2018-08-11 Thread Bo Berglund
A collegue has put a project into our SVN server. The server is
organized such that every project is a top level directory.
This shall contain subdirs trunk, tags and branches.
Trunk is where the sources for the project live.

Now he has put his project sources into:
/Projectname/trunk/Projectname

What is the best way to fix this so it will reside in
/Projectname/trunk instead?

- Check out /Projectname/trunk and receive subdir Projectname
- Move to trunk on client
- svn mv Projectname/* ./*
- svn ci -m "log message"

Or after checkout:
- Move to trunk/Projectname on client
- svn mv * ../
- mv ..
- svn ci -m "log message"

I don't want to mess up the repository, so that is why I am asking


-- 
Bo Berglund
Developer in Sweden