comparison rhodecode/model/repos_group.py @ 1976:a76e9bacbedc beta

garden - unified logging formatting to use only %
author Marcin Kuzminski <marcin@python-works.com>
date Thu, 02 Feb 2012 00:31:00 +0200
parents 89efedac4e6c
children 87f0800abc7b
comparison
equal deleted inserted replaced
1975:9c5b33c4de4d 1976:a76e9bacbedc
56 :param repo_name: 56 :param repo_name:
57 :param parent_id: 57 :param parent_id:
58 """ 58 """
59 59
60 create_path = os.path.join(self.repos_path, group_name) 60 create_path = os.path.join(self.repos_path, group_name)
61 log.debug('creating new group in %s', create_path) 61 log.debug('creating new group in %s' % create_path)
62 62
63 if os.path.isdir(create_path): 63 if os.path.isdir(create_path):
64 raise Exception('That directory already exists !') 64 raise Exception('That directory already exists !')
65 65
66 os.makedirs(create_path) 66 os.makedirs(create_path)
74 74
75 if old == new: 75 if old == new:
76 log.debug('skipping group rename') 76 log.debug('skipping group rename')
77 return 77 return
78 78
79 log.debug('renaming repos group from %s to %s', old, new) 79 log.debug('renaming repos group from %s to %s' % (old, new))
80
81 80
82 old_path = os.path.join(self.repos_path, old) 81 old_path = os.path.join(self.repos_path, old)
83 new_path = os.path.join(self.repos_path, new) 82 new_path = os.path.join(self.repos_path, new)
84 83
85 log.debug('renaming repos paths from %s to %s', old_path, new_path) 84 log.debug('renaming repos paths from %s to %s' % (old_path, new_path))
86 85
87 if os.path.isdir(new_path): 86 if os.path.isdir(new_path):
88 raise Exception('Was trying to rename to already ' 87 raise Exception('Was trying to rename to already '
89 'existing dir %s' % new_path) 88 'existing dir %s' % new_path)
90 shutil.move(old_path, new_path) 89 shutil.move(old_path, new_path)