InDefero

Sign in or create your account | Project List | Help

Issue 204: Deleting a project does not remove the repository

Reported by Mehdi Kabab, Apr 21, 2009

When a user delete a project from the admin board, the repository 
has not removed.

But, if the user re-create a project with the same shortname, he 
will not work from a empty repository.

See attached patch.

Comment 1 by Loïc d'Anterroches, Apr 23, 2009

For git one need effectively to do that at the cron time as using a 
signal the web process will not have the rights to drop the 
repository. 

Maybe using the queue would allow us not to go through all the 
repositories but just drop "as needed".

Comment 2 by Sindre Myren, Apr 26, 2009

would it not be better to rename to repo-name~, then to actually 
delete it? Or atleast make the deletion optional?

Comment 3 by Loïc d'Anterroches, Jun 19, 2009

Applied in commit e235242, thanks a lot. I have added the 
'idf_plugin_syncgit_remove_orphans' configuration variable which 
default to false. This means that by default, the orphan 
repositories are not deleted.
Labels: Type:Enhancement, -Type:Defect
Status: Fixed

Comment 4 by Sindre Myren, Aug 31, 2009

Hi I have now tested this on two servers, and reached a conclusion:

This seems to work:
$cfg['idf_plugin_syncsvn_remove_orphans'] = true;

This does not seem to work:
$cfg['idf_plugin_syncgit_remove_orphans'] = true;

On neither of the servers the git repository was removed, while the 
svn repository was. The reason seems to be that a SYNC-GIT file is 
not touched upon deleting.

Upon deleting a project, and creating a new one with a different 
name, the repository is deleted.

Created: 1 year 4 months ago by Mehdi Kabab

Updated: 1 year 10 days ago

Status: Fixed

Followed by: 2 persons

Labels:
Priority:Medium
Type:Enhancement