changeset 2949:d37b79ad0ae8 beta

Fixed issue with rm__ system that put removed repos in root location, it can lead to making a heavy copy, and remove operation.
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 22 Oct 2012 14:26:00 +0200
parents bd97aba292f1
children 528c7f210b12
files rhodecode/model/repo.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/model/repo.py	Mon Oct 15 22:00:01 2012 +0300
+++ b/rhodecode/model/repo.py	Mon Oct 22 14:26:00 2012 +0200
@@ -544,5 +544,8 @@
         _now = datetime.now()
         _ms = str(_now.microsecond).rjust(6, '0')
         _d = 'rm__%s__%s' % (_now.strftime('%Y%m%d_%H%M%S_' + _ms),
-                             repo.repo_name)
+                             repo.just_name)
+        if repo.group:
+            args = repo.group.full_path_splitted + [_d]
+            _d = os.path.join(*args)
         shutil.move(rm_path, os.path.join(self.repos_path, _d))