Changeset - 33c69eb9df9f
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-26 03:42:37
marcin@python-works.com
Fixed create function landing_rev. default branch can actually be different for new imported repos. Tip is always there
1 file changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/utils.py
Show inline comments
 
@@ -449,25 +449,27 @@ def repo2db_mapper(initial_repo_list, re
 
        group = map_groups(name)
 
        if not rm.get_by_repo_name(name, cache=False):
 
            log.info('repository %s not found creating default' % name)
 
            added.append(name)
 
            form_data = {
 
             'repo_name': name,
 
             'repo_name_full': name,
 
             'repo_type': repo.alias,
 
             'description': repo.description \
 
                if repo.description != 'unknown' else '%s repository' % name,
 
             'private': False,
 
             'group_id': getattr(group, 'group_id', None),
 
             'landing_rev': repo.DEFAULT_BRANCH_NAME
 
             'landing_rev': 'tip',
 
             'clone_uri': None,
 
             'repo_group': None,
 
            }
 
            rm.create(form_data, user, just_db=True)
 
    sa.commit()
 
    removed = []
 
    if remove_obsolete:
 
        # remove from database those repositories that are not in the filesystem
 
        for repo in sa.query(Repository).all():
 
            if repo.repo_name not in initial_repo_list.keys():
 
                log.debug("Removing non existing repository found in db %s" %
 
                          repo.repo_name)
 
                removed.append(repo.repo_name)
 
                sa.delete(repo)
0 comments (0 inline, 0 general)