##// END OF EJS Templates
fixed issues with removed repos was accidentally added as groups, after...
marcink -
r2069:003c504d beta
parent child Browse files
Show More
@@ -18,6 +18,8 b' fixes'
18 +++++
18 +++++
19
19
20 - fixed some python2.5 compatibility issues
20 - fixed some python2.5 compatibility issues
21 - fixed issues with removed repos was accidentally added as groups, after
22 full rescan of paths
21
23
22 1.3.2 (**2012-02-28**)
24 1.3.2 (**2012-02-28**)
23 ----------------------
25 ----------------------
@@ -24,6 +24,7 b''
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
24 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25
25
26 import os
26 import os
27 import re
27 import logging
28 import logging
28 import datetime
29 import datetime
29 import traceback
30 import traceback
@@ -56,6 +57,8 b' from rhodecode.model.repos_group import '
56
57
57 log = logging.getLogger(__name__)
58 log = logging.getLogger(__name__)
58
59
60 REMOVED_REPO_PAT = re.compile(r'rm__\d{8}_\d{6}_\d{6}__.*')
61
59
62
60 def recursive_replace(str_, replace=' '):
63 def recursive_replace(str_, replace=' '):
61 """Recursive replace of given sign to just one instance
64 """Recursive replace of given sign to just one instance
@@ -393,6 +396,10 b' def map_groups(groups):'
393 # group = rgm.create(group_name, desc, parent, just_db=True)
396 # group = rgm.create(group_name, desc, parent, just_db=True)
394 # sa.commit()
397 # sa.commit()
395
398
399 # skip folders that are now removed repos
400 if REMOVED_REPO_PAT.match(group_name):
401 break
402
396 if group is None:
403 if group is None:
397 log.debug('creating group level: %s group_name: %s' % (lvl, group_name))
404 log.debug('creating group level: %s group_name: %s' % (lvl, group_name))
398 group = RepoGroup(group_name, parent)
405 group = RepoGroup(group_name, parent)
@@ -38,7 +38,7 b' from rhodecode.lib import helpers as h'
38 from rhodecode.lib import safe_str
38 from rhodecode.lib import safe_str
39 from rhodecode.lib.auth import HasRepoPermissionAny, HasReposGroupPermissionAny
39 from rhodecode.lib.auth import HasRepoPermissionAny, HasReposGroupPermissionAny
40 from rhodecode.lib.utils import get_repos as get_filesystem_repos, make_ui, \
40 from rhodecode.lib.utils import get_repos as get_filesystem_repos, make_ui, \
41 action_logger, EmptyChangeset
41 action_logger, EmptyChangeset, REMOVED_REPO_PAT
42 from rhodecode.model import BaseModel
42 from rhodecode.model import BaseModel
43 from rhodecode.model.db import Repository, RhodeCodeUi, CacheInvalidation, \
43 from rhodecode.model.db import Repository, RhodeCodeUi, CacheInvalidation, \
44 UserFollowing, UserLog, User, RepoGroup
44 UserFollowing, UserLog, User, RepoGroup
@@ -182,6 +182,9 b' class ScmModel(BaseModel):'
182 repos = {}
182 repos = {}
183
183
184 for name, path in get_filesystem_repos(repos_path, recursive=True):
184 for name, path in get_filesystem_repos(repos_path, recursive=True):
185 # skip removed repos
186 if REMOVED_REPO_PAT.match(name):
187 continue
185
188
186 # name need to be decomposed and put back together using the /
189 # name need to be decomposed and put back together using the /
187 # since this is internal storage separator for rhodecode
190 # since this is internal storage separator for rhodecode
General Comments 0
You need to be logged in to leave comments. Login now