> > UPDATE:
> > CORRECT BEHAVIOUR would be:
> > 0. tortoise sees missing folder project1
> > 1. tortoise sees new folder project-master
> > 2. tortoise sees: it's already SVN enabled!
> > 3. tortoise realizes: but it was my missing project1 last time
>
> how would it realise that?
Let's write a small logic in my dirty syntax:
0:
string[] missingSubFolders = GetMissingSubFolders()
1:
2:
3:
string[] existingFolders = GetCurrentSubFolders()
string CurrentFolderPathInSvn = GetFolderSvnPath(CurrentFolder) //e.g.
https://www.myserver.net/svn/myrepository/trunk/
foreach (string folderName in existingFolders)
{
if (GetFolderSvnPath(folderName) == null)
{
//new folder --> add and commit it!
}
else if (GetFolderSvnPath(folderName) == GetFolderSvnPath
(CurrentFolder) + "/" + folderName)
{
//now we've found a subfolder which hasn't been renamed --> no
special action required
}
else if (GetParentDirectory(GetFolderSvnPath(folderName)) ==
GetFolderSvnPath(CurrentFolder))
{
if (missingSubFolders.contains(folderName))
{
//NEW -- TODO -- NEW -- TODO -- NEW -- TODO -- NEW -- TODO:
//the subfolder has got the same SVN base path as the current
directory - so, the subfolder just has got a different name, but keeps
in the same directory.
//HERE we need to
// 1. report a "folder rename action" to the svn server
repository
// 2. either drop the folder and download it again from the svn
server OR just change the references inside of the subfolder structure
to the new path of the directory in the SVN server repository
}
else
{
//NEW -- TODO -- NEW -- TODO -- NEW -- TODO -- NEW -- TODO:
//the subfolder has got the same SVN base path as the current
directory, but the folder is just a COPY.
//HERE we need to show the folder in the commit dialog as
INVALID COPY of another folder and prevent the user from committing
this folder
}
}
else if (GetSvnRepositoryBasePath(folderName) <>
GetSvnRepositoryBasePath(CurrentFolder)
{
// an svn project from a foreign SVN repository has been placed
into our current local SVN repository folder structure
// usually, this is an unwanted situation since updating the top
parent path doesn't update the foreign project folder
// NEW -- TODO -- NEW -- TODO -- NEW -- TODO -- NEW -- TODO:
// --> it is recommended to show a warning in commit dialog for
this folder to the user that there has been found a foreign SVN
checkout folder and that this is often considered (by the user itself)
to be a unwanted situation
}
else
{
// NEW -- TODO -- NEW -- TODO -- NEW -- TODO -- NEW -- TODO:
// it is a folder from the same SVN repository which has been
relocated within the repository directory structure
// because the folder has been relocated in the structure, this
must be changed in the server repository, too
}
}
string GetFolderSvnPath(string folderName)
{
// reads in the related .svn folder for the svn server repository
path of this folder; a sample return value is:
// http://www.myserver.com/svn/myrepository/trunk/project-master
// if there is no .svn sub folder, we just return null
}
string GetSvnRepositoryBasePath(string folderName)
{
// reads in the related .svn folder for the svn server repository
path of this folder; a sample return value is:
// http://www.myserver.com/svn/myrepository
// if there is no .svn sub folder, we just return null
}
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=4061&dsMessageId=1108060
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2009-02-05 17:25:39 CET