comparison rhodecode/model/repo.py @ 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 1b275d04ac07
children 6104dfd35b16
comparison
equal deleted inserted replaced
2948:bd97aba292f1 2949:d37b79ad0ae8
542 os.path.join(rm_path, 'rm__.%s' % alias)) 542 os.path.join(rm_path, 'rm__.%s' % alias))
543 # disable repo 543 # disable repo
544 _now = datetime.now() 544 _now = datetime.now()
545 _ms = str(_now.microsecond).rjust(6, '0') 545 _ms = str(_now.microsecond).rjust(6, '0')
546 _d = 'rm__%s__%s' % (_now.strftime('%Y%m%d_%H%M%S_' + _ms), 546 _d = 'rm__%s__%s' % (_now.strftime('%Y%m%d_%H%M%S_' + _ms),
547 repo.repo_name) 547 repo.just_name)
548 if repo.group:
549 args = repo.group.full_path_splitted + [_d]
550 _d = os.path.join(*args)
548 shutil.move(rm_path, os.path.join(self.repos_path, _d)) 551 shutil.move(rm_path, os.path.join(self.repos_path, _d))