[cvsnt] Re: is there a problem if I move files from one folder to the other in the repository

Bo Berglund bo.berglund at telia.com
Wed Jun 9 20:44:23 BST 2004


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


On Wed, 9 Jun 2004 19:46:58 +0530, "Aditya Gandhi"
<agandhi at sapient.com> wrote:

>Hi all,
>We on our project are re-organizing the way we store data and as part of
>that I need to move an existing folder to a different location.
> 
>Say for example right now I have a folder named A in the repository
>which has a lot of subfolders and files 
>Eg. 
>A
>|-----A1
>|      |------A11
>|      |------A12
>|
>|-----A2
>|-----A3
>
>I am planning to create a new directory structure where I will be moving
>the complete folder A into a new folder called X as shown below
>Say 
>	X
>	|----------A
>	|	     |-----A1
>	|	     |      |------A11
>  	|	     |      |------A12
>	|	     |	
>	|	     |-----A2
>	|	     |-----A3
>	Y
>	|----------B
>	|----------C
>etc.
>
>My question is how can I go about doing this without disturbing the
>history.
>
>As per my understanding simply creating the new folder X using a CVS
>client and then copying the folder A on the repository (server) from
>/rep_root/A to /rep_root/X/A will work.
>
>I just want a confirmation on whether tags/ branches/ dates or anything
>else will be a problem after the move. I will be bringing down the
>repository for this time period and obviously will ask everybody to do a
>fresh checkout after the move is complete.
>
>Note: I do not have any customized admin files. 
>

If you are talking about *reorganizing* the server as I think you are,
then you can safely do this.
But you should not *copy* the file tree over to X, you should *move*
it! There should be only one copy of your module in the repository,
right?
All of the history and tags and other stuff is stored in the
individual RCS files (those that end with ,v in the repository) and
you can move them like you want.
Of course any user with a checked out sandbox will be affected, so
your solution to tell them to re-checkout after the reorganization is
the simplest to get things in order afterwards.

I have done this many times even across repositories and I have yet
some such cleaning left to do at work.

Notice:
The CVSROOT/history file will contain unusable data afterwards, so you
might as well erase its contents. It is not really used anyway.

As always, having a backup of the situation before the operation helps
the mind....


/Bo
(Bo Berglund, developer in Sweden)



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook