Changeset - 06e49be38d78
kallithea/controllers/bookmarks.py
Show inline comments
 
@@ -44,13 +44,13 @@ class BookmarksController(BaseRepoContro
 
    @HasRepoPermissionAnyDecorator('repository.read', 'repository.write',
 
                                   'repository.admin')
 
    def index(self):
 
        if c.rhodecode_repo.alias != 'hg':
 
        if c.db_repo_scm_instance.alias != 'hg':
 
            raise HTTPNotFound()
 

	
 
        c.repo_bookmarks = OrderedDict()
 

	
 
        bookmarks = [(name, c.rhodecode_repo.get_changeset(hash_)) for \
 
                 name, hash_ in c.rhodecode_repo._repo._bookmarks.items()]
 
        bookmarks = [(name, c.db_repo_scm_instance.get_changeset(hash_)) for \
 
                 name, hash_ in c.db_repo_scm_instance._repo._bookmarks.items()]
 
        ordered_tags = sorted(bookmarks, key=lambda x: x[1].date, reverse=True)
 
        for name, cs_book in ordered_tags:
 
            c.repo_bookmarks[name] = cs_book
kallithea/controllers/branches.py
Show inline comments
 
@@ -54,11 +54,11 @@ class BranchesController(BaseRepoControl
 
                    bt_closed[bn] = tip
 
            return bt_closed
 

	
 
        cs_g = c.rhodecode_repo.get_changeset
 
        cs_g = c.db_repo_scm_instance.get_changeset
 

	
 
        c.repo_closed_branches = {}
 
        if c.db_repo.repo_type == 'hg':
 
            bt_closed = _branchtags(c.rhodecode_repo._repo)
 
            bt_closed = _branchtags(c.db_repo_scm_instance._repo)
 
            _closed_branches = [(safe_unicode(n), cs_g(binascii.hexlify(h)),)
 
                                for n, h in bt_closed.items()]
 

	
 
@@ -67,7 +67,7 @@ class BranchesController(BaseRepoControl
 
                                                    reverse=False))
 

	
 
        _branches = [(safe_unicode(n), cs_g(h))
 
                     for n, h in c.rhodecode_repo.branches.items()]
 
                     for n, h in c.db_repo_scm_instance.branches.items()]
 
        c.repo_branches = OrderedDict(sorted(_branches,
 
                                             key=lambda ctx: ctx[0],
 
                                             reverse=False))
kallithea/controllers/changelog.py
Show inline comments
 
@@ -53,7 +53,7 @@ def _load_changelog_summary():
 
        return url('changelog_summary_home',
 
                   repo_name=c.db_repo.repo_name, size=size, **kw)
 

	
 
    collection = c.rhodecode_repo
 
    collection = c.db_repo_scm_instance
 

	
 
    c.repo_changesets = RepoPage(collection, page=p,
 
                                 items_per_page=size,
 
@@ -81,7 +81,7 @@ class ChangelogController(BaseRepoContro
 
        """
 

	
 
        try:
 
            return c.rhodecode_repo.get_changeset(rev)
 
            return c.db_repo_scm_instance.get_changeset(rev)
 
        except EmptyRepositoryError, e:
 
            if not redirect_after:
 
                return None
 
@@ -137,8 +137,8 @@ class ChangelogController(BaseRepoContro
 
        p = safe_int(request.GET.get('page', 1), 1)
 
        branch_name = request.GET.get('branch', None)
 
        if (branch_name and
 
            branch_name not in c.rhodecode_repo.branches and
 
            branch_name not in c.rhodecode_repo.closed_branches and
 
            branch_name not in c.db_repo_scm_instance.branches and
 
            branch_name not in c.db_repo_scm_instance.closed_branches and
 
            not revision):
 
            return redirect(url('changelog_file_home', repo_name=c.repo_name,
 
                                    revision=branch_name, f_path=f_path or ''))
 
@@ -149,7 +149,7 @@ class ChangelogController(BaseRepoContro
 
            if f_path:
 
                log.debug('generating changelog for path %s' % f_path)
 
                # get the history for the file !
 
                tip_cs = c.rhodecode_repo.get_changeset()
 
                tip_cs = c.db_repo_scm_instance.get_changeset()
 
                try:
 
                    collection = tip_cs.get_file_history(f_path)
 
                except (NodeDoesNotExistError, ChangesetError):
 
@@ -162,7 +162,7 @@ class ChangelogController(BaseRepoContro
 
                        redirect(h.url('changelog_home', repo_name=repo_name))
 
                collection = list(reversed(collection))
 
            else:
 
                collection = c.rhodecode_repo.get_changesets(start=0,
 
                collection = c.db_repo_scm_instance.get_changesets(start=0,
 
                                                        branch_name=branch_name)
 
            c.total_cs = len(collection)
 

	
 
@@ -182,15 +182,15 @@ class ChangelogController(BaseRepoContro
 

	
 
        c.branch_name = branch_name
 
        c.branch_filters = [('', _('All Branches'))] + \
 
            [(k, k) for k in c.rhodecode_repo.branches.keys()]
 
        if c.rhodecode_repo.closed_branches:
 
            [(k, k) for k in c.db_repo_scm_instance.branches.keys()]
 
        if c.db_repo_scm_instance.closed_branches:
 
            prefix = _('(closed)') + ' '
 
            c.branch_filters += [('-', '-')] + \
 
                [(k, prefix + k) for k in c.rhodecode_repo.closed_branches.keys()]
 
                [(k, prefix + k) for k in c.db_repo_scm_instance.closed_branches.keys()]
 
        _revs = []
 
        if not f_path:
 
            _revs = [x.revision for x in c.pagination]
 
        self._graph(c.rhodecode_repo, _revs, c.total_cs, c.size, p)
 
        self._graph(c.db_repo_scm_instance, _revs, c.total_cs, c.size, p)
 

	
 
        return render('changelog/changelog.html')
 

	
 
@@ -199,7 +199,7 @@ class ChangelogController(BaseRepoContro
 
                                   'repository.admin')
 
    def changelog_details(self, cs):
 
        if request.environ.get('HTTP_X_PARTIAL_XHR'):
 
            c.cs = c.rhodecode_repo.get_changeset(cs)
 
            c.cs = c.db_repo_scm_instance.get_changeset(cs)
 
            return render('changelog/changelog_details.html')
 
        raise HTTPNotFound()
 

	
kallithea/controllers/changeset.py
Show inline comments
 
@@ -193,10 +193,10 @@ class ChangesetController(BaseRepoContro
 
                enable_comments = False
 
                rev_start = rev_range[0]
 
                rev_end = rev_range[1]
 
                rev_ranges = c.rhodecode_repo.get_changesets(start=rev_start,
 
                rev_ranges = c.db_repo_scm_instance.get_changesets(start=rev_start,
 
                                                             end=rev_end)
 
            else:
 
                rev_ranges = [c.rhodecode_repo.get_changeset(revision)]
 
                rev_ranges = [c.db_repo_scm_instance.get_changeset(revision)]
 

	
 
            c.cs_ranges = list(rev_ranges)
 
            if not c.cs_ranges:
 
@@ -257,11 +257,11 @@ class ChangesetController(BaseRepoContro
 
            context_lcl = get_line_ctx('', request.GET)
 
            ign_whitespace_lcl = ign_whitespace_lcl = get_ignore_ws('', request.GET)
 

	
 
            _diff = c.rhodecode_repo.get_diff(cs1, cs2,
 
            _diff = c.db_repo_scm_instance.get_diff(cs1, cs2,
 
                ignore_whitespace=ign_whitespace_lcl, context=context_lcl)
 
            diff_limit = self.cut_off_limit if not fulldiff else None
 
            diff_processor = diffs.DiffProcessor(_diff,
 
                                                 vcs=c.rhodecode_repo.alias,
 
                                                 vcs=c.db_repo_scm_instance.alias,
 
                                                 format='gitdiff',
 
                                                 diff_limit=diff_limit)
 
            cs_changes = OrderedDict()
 
@@ -441,7 +441,7 @@ class ChangesetController(BaseRepoContro
 
    def changeset_info(self, repo_name, revision):
 
        if request.is_xhr:
 
            try:
 
                return c.rhodecode_repo.get_changeset(revision)
 
                return c.db_repo_scm_instance.get_changeset(revision)
 
            except ChangesetDoesNotExistError, e:
 
                return EmptyChangeset(message=str(e))
 
        else:
 
@@ -453,7 +453,7 @@ class ChangesetController(BaseRepoContro
 
    @jsonify
 
    def changeset_children(self, repo_name, revision):
 
        if request.is_xhr:
 
            changeset = c.rhodecode_repo.get_changeset(revision)
 
            changeset = c.db_repo_scm_instance.get_changeset(revision)
 
            result = {"results": []}
 
            if changeset.children:
 
                result = {"results": changeset.children}
 
@@ -467,7 +467,7 @@ class ChangesetController(BaseRepoContro
 
    @jsonify
 
    def changeset_parents(self, repo_name, revision):
 
        if request.is_xhr:
 
            changeset = c.rhodecode_repo.get_changeset(revision)
 
            changeset = c.db_repo_scm_instance.get_changeset(revision)
 
            result = {"results": []}
 
            if changeset.parents:
 
                result = {"results": changeset.parents}
kallithea/controllers/feed.py
Show inline comments
 
@@ -93,7 +93,7 @@ class FeedController(BaseRepoController)
 
        #branches, tags, bookmarks
 
        if cs.branch:
 
            desc_msg.append('branch: %s<br/>' % cs.branch)
 
        if h.is_hg(c.rhodecode_repo):
 
        if h.is_hg(c.db_repo_scm_instance):
 
            for book in cs.bookmarks:
 
                desc_msg.append('bookmark: %s<br/>' % book)
 
        for tag in cs.tags:
 
@@ -128,7 +128,7 @@ class FeedController(BaseRepoController)
 
                 ttl=self.ttl
 
            )
 

	
 
            for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])):
 
            for cs in reversed(list(c.db_repo_scm_instance[-self.feed_nr:])):
 
                feed.add_item(title=self._get_title(cs),
 
                              link=url('changeset_home', repo_name=repo_name,
 
                                       revision=cs.raw_id, qualified=True),
 
@@ -160,7 +160,7 @@ class FeedController(BaseRepoController)
 
                ttl=self.ttl
 
            )
 

	
 
            for cs in reversed(list(c.rhodecode_repo[-self.feed_nr:])):
 
            for cs in reversed(list(c.db_repo_scm_instance[-self.feed_nr:])):
 
                feed.add_item(title=self._get_title(cs),
 
                              link=url('changeset_home', repo_name=repo_name,
 
                                       revision=cs.raw_id, qualified=True),
kallithea/controllers/files.py
Show inline comments
 
@@ -80,7 +80,7 @@ class FilesController(BaseRepoController
 
        """
 

	
 
        try:
 
            return c.rhodecode_repo.get_changeset(rev)
 
            return c.db_repo_scm_instance.get_changeset(rev)
 
        except EmptyRepositoryError, e:
 
            if not redirect_after:
 
                return None
 
@@ -143,7 +143,7 @@ class FilesController(BaseRepoController
 

	
 
        # prev link
 
        try:
 
            prev_rev = c.rhodecode_repo.get_changeset(cur_rev).prev(c.branch)
 
            prev_rev = c.db_repo_scm_instance.get_changeset(cur_rev).prev(c.branch)
 
            c.url_prev = url('files_home', repo_name=c.repo_name,
 
                         revision=prev_rev.raw_id, f_path=f_path)
 
            if c.branch:
 
@@ -153,7 +153,7 @@ class FilesController(BaseRepoController
 

	
 
        # next link
 
        try:
 
            next_rev = c.rhodecode_repo.get_changeset(cur_rev).next(c.branch)
 
            next_rev = c.db_repo_scm_instance.get_changeset(cur_rev).next(c.branch)
 
            c.url_next = url('files_home', repo_name=c.repo_name,
 
                     revision=next_rev.raw_id, f_path=f_path)
 
            if c.branch:
 
@@ -172,7 +172,7 @@ class FilesController(BaseRepoController
 
                                    if c.changeset.revision < file_last_cs.revision
 
                                    else file_last_cs)
 
                #determine if we're on branch head
 
                _branches = c.rhodecode_repo.branches
 
                _branches = c.db_repo_scm_instance.branches
 
                c.on_branch_head = revision in _branches.keys() + _branches.values()
 
                _hist = []
 
                c.file_history = []
 
@@ -402,7 +402,7 @@ class FilesController(BaseRepoController
 
                return redirect(url('changeset_home', repo_name=c.repo_name,
 
                                    revision='tip'))
 
            try:
 
                self.scm_model.commit_change(repo=c.rhodecode_repo,
 
                self.scm_model.commit_change(repo=c.db_repo_scm_instance,
 
                                             repo_name=repo_name, cs=c.cs,
 
                                             user=self.rhodecode_user.user_id,
 
                                             author=author, message=message,
 
@@ -434,7 +434,7 @@ class FilesController(BaseRepoController
 
        c.cs = self.__get_cs_or_redirect(revision, repo_name,
 
                                         redirect_after=False)
 
        if c.cs is None:
 
            c.cs = EmptyChangeset(alias=c.rhodecode_repo.alias)
 
            c.cs = EmptyChangeset(alias=c.db_repo_scm_instance.alias)
 
        c.default_message = (_('Added file via RhodeCode'))
 
        c.f_path = f_path
 

	
 
@@ -521,13 +521,13 @@ class FilesController(BaseRepoController
 
            if not dbrepo.enable_downloads:
 
                return _('Downloads disabled')
 

	
 
            if c.rhodecode_repo.alias == 'hg':
 
            if c.db_repo_scm_instance.alias == 'hg':
 
                # patch and reset hooks section of UI config to not run any
 
                # hooks on fetching archives with subrepos
 
                for k, v in c.rhodecode_repo._repo.ui.configitems('hooks'):
 
                    c.rhodecode_repo._repo.ui.setconfig('hooks', k, None)
 
                for k, v in c.db_repo_scm_instance._repo.ui.configitems('hooks'):
 
                    c.db_repo_scm_instance._repo.ui.setconfig('hooks', k, None)
 

	
 
            cs = c.rhodecode_repo.get_changeset(revision)
 
            cs = c.db_repo_scm_instance.get_changeset(revision)
 
            content_type = settings.ARCHIVE_SPECS[fileformat][0]
 
        except ChangesetDoesNotExistError:
 
            return _('Unknown revision %s') % revision
 
@@ -625,7 +625,7 @@ class FilesController(BaseRepoController
 
            return redirect(_url)
 
        try:
 
            if diff1 not in ['', None, 'None', '0' * 12, '0' * 40]:
 
                c.changeset_1 = c.rhodecode_repo.get_changeset(diff1)
 
                c.changeset_1 = c.db_repo_scm_instance.get_changeset(diff1)
 
                try:
 
                    node1 = c.changeset_1.get_node(f_path)
 
                    if node1.is_dir():
 
@@ -634,14 +634,14 @@ class FilesController(BaseRepoController
 
                except NodeDoesNotExistError:
 
                    c.changeset_1 = EmptyChangeset(cs=diff1,
 
                                                   revision=c.changeset_1.revision,
 
                                                   repo=c.rhodecode_repo)
 
                                                   repo=c.db_repo_scm_instance)
 
                    node1 = FileNode(f_path, '', changeset=c.changeset_1)
 
            else:
 
                c.changeset_1 = EmptyChangeset(repo=c.rhodecode_repo)
 
                c.changeset_1 = EmptyChangeset(repo=c.db_repo_scm_instance)
 
                node1 = FileNode(f_path, '', changeset=c.changeset_1)
 

	
 
            if diff2 not in ['', None, 'None', '0' * 12, '0' * 40]:
 
                c.changeset_2 = c.rhodecode_repo.get_changeset(diff2)
 
                c.changeset_2 = c.db_repo_scm_instance.get_changeset(diff2)
 
                try:
 
                    node2 = c.changeset_2.get_node(f_path)
 
                    if node2.is_dir():
 
@@ -650,10 +650,10 @@ class FilesController(BaseRepoController
 
                except NodeDoesNotExistError:
 
                    c.changeset_2 = EmptyChangeset(cs=diff2,
 
                                                   revision=c.changeset_2.revision,
 
                                                   repo=c.rhodecode_repo)
 
                                                   repo=c.db_repo_scm_instance)
 
                    node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
            else:
 
                c.changeset_2 = EmptyChangeset(repo=c.rhodecode_repo)
 
                c.changeset_2 = EmptyChangeset(repo=c.db_repo_scm_instance)
 
                node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
        except (RepositoryError, NodeError):
 
            log.error(traceback.format_exc())
 
@@ -710,7 +710,7 @@ class FilesController(BaseRepoController
 
        diff2 = request.GET.get('diff2', '')
 
        try:
 
            if diff1 not in ['', None, 'None', '0' * 12, '0' * 40]:
 
                c.changeset_1 = c.rhodecode_repo.get_changeset(diff1)
 
                c.changeset_1 = c.db_repo_scm_instance.get_changeset(diff1)
 
                try:
 
                    node1 = c.changeset_1.get_node(f_path)
 
                    if node1.is_dir():
 
@@ -719,14 +719,14 @@ class FilesController(BaseRepoController
 
                except NodeDoesNotExistError:
 
                    c.changeset_1 = EmptyChangeset(cs=diff1,
 
                                                   revision=c.changeset_1.revision,
 
                                                   repo=c.rhodecode_repo)
 
                                                   repo=c.db_repo_scm_instance)
 
                    node1 = FileNode(f_path, '', changeset=c.changeset_1)
 
            else:
 
                c.changeset_1 = EmptyChangeset(repo=c.rhodecode_repo)
 
                c.changeset_1 = EmptyChangeset(repo=c.db_repo_scm_instance)
 
                node1 = FileNode(f_path, '', changeset=c.changeset_1)
 

	
 
            if diff2 not in ['', None, 'None', '0' * 12, '0' * 40]:
 
                c.changeset_2 = c.rhodecode_repo.get_changeset(diff2)
 
                c.changeset_2 = c.db_repo_scm_instance.get_changeset(diff2)
 
                try:
 
                    node2 = c.changeset_2.get_node(f_path)
 
                    if node2.is_dir():
 
@@ -735,10 +735,10 @@ class FilesController(BaseRepoController
 
                except NodeDoesNotExistError:
 
                    c.changeset_2 = EmptyChangeset(cs=diff2,
 
                                                   revision=c.changeset_2.revision,
 
                                                   repo=c.rhodecode_repo)
 
                                                   repo=c.db_repo_scm_instance)
 
                    node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
            else:
 
                c.changeset_2 = EmptyChangeset(repo=c.rhodecode_repo)
 
                c.changeset_2 = EmptyChangeset(repo=c.db_repo_scm_instance)
 
                node2 = FileNode(f_path, '', changeset=c.changeset_2)
 
        except (RepositoryError, NodeError):
 
            log.error(traceback.format_exc())
 
@@ -761,7 +761,7 @@ class FilesController(BaseRepoController
 
            changesets defined in this list
 
        """
 
        # calculate history based on tip
 
        tip_cs = c.rhodecode_repo.get_changeset()
 
        tip_cs = c.db_repo_scm_instance.get_changeset()
 
        if changesets is None:
 
            try:
 
                changesets = tip_cs.get_file_history(f_path)
 
@@ -781,11 +781,11 @@ class FilesController(BaseRepoController
 
            changesets_group[0].append((chs.raw_id, n_desc,))
 
        hist_l.append(changesets_group)
 

	
 
        for name, chs in c.rhodecode_repo.branches.items():
 
        for name, chs in c.db_repo_scm_instance.branches.items():
 
            branches_group[0].append((chs, name),)
 
        hist_l.append(branches_group)
 

	
 
        for name, chs in c.rhodecode_repo.tags.items():
 
        for name, chs in c.db_repo_scm_instance.tags.items():
 
            tags_group[0].append((chs, name),)
 
        hist_l.append(tags_group)
 

	
kallithea/controllers/home.py
Show inline comments
 
@@ -113,7 +113,7 @@ class HomeController(BaseController):
 
        if request.is_xhr:
 
            c.db_repo = Repository.get_by_repo_name(repo_name)
 
            if c.db_repo:
 
                c.rhodecode_repo = c.db_repo.scm_instance
 
                c.db_repo_scm_instance = c.db_repo.scm_instance
 
                return render('/switch_to_list.html')
 
        raise HTTPBadRequest()
 

	
kallithea/controllers/summary.py
Show inline comments
 
@@ -74,12 +74,12 @@ class SummaryController(BaseRepoControll
 
        branches_group = ([], _("Branches"))
 
        tags_group = ([], _("Tags"))
 

	
 
        for name, chs in c.rhodecode_repo.branches.items():
 
        for name, chs in c.db_repo_scm_instance.branches.items():
 
            #chs = chs.split(':')[-1]
 
            branches_group[0].append((chs, name),)
 
        download_l.append(branches_group)
 

	
 
        for name, chs in c.rhodecode_repo.tags.items():
 
        for name, chs in c.db_repo_scm_instance.tags.items():
 
            #chs = chs.split(':')[-1]
 
            tags_group[0].append((chs, name),)
 
        download_l.append(tags_group)
 
@@ -230,8 +230,8 @@ class SummaryController(BaseRepoControll
 
                sorted(lang_stats, reverse=True, key=lambda k: k[1])[:10]
 
            )
 
            last_rev = stats.stat_on_revision + 1
 
            c.repo_last_rev = c.rhodecode_repo.count()\
 
                if c.rhodecode_repo.revisions else 0
 
            c.repo_last_rev = c.db_repo_scm_instance.count()\
 
                if c.db_repo_scm_instance.revisions else 0
 
            if last_rev == 0 or c.repo_last_rev == 0:
 
                pass
 
            else:
kallithea/controllers/tags.py
Show inline comments
 
@@ -46,8 +46,8 @@ class TagsController(BaseRepoController)
 
    def index(self):
 
        c.repo_tags = OrderedDict()
 

	
 
        tags = [(name, c.rhodecode_repo.get_changeset(hash_)) for \
 
                 name, hash_ in c.rhodecode_repo.tags.items()]
 
        tags = [(name, c.db_repo_scm_instance.get_changeset(hash_)) for \
 
                 name, hash_ in c.db_repo_scm_instance.tags.items()]
 
        ordered_tags = sorted(tags, key=lambda x: x[1].date, reverse=True)
 
        for name, cs_tag in ordered_tags:
 
            c.repo_tags[name] = cs_tag
kallithea/lib/base.py
Show inline comments
 
@@ -369,7 +369,7 @@ class BaseRepoController(BaseController)
 
    Base class for controllers responsible for loading all needed data for
 
    repository loaded items are
 

	
 
    c.rhodecode_repo: instance of scm repository
 
    c.db_repo_scm_instance: instance of scm repository
 
    c.db_repo: instance of db
 
    c.repository_followers: number of followers
 
    c.repository_forks: number of forks
 
@@ -398,8 +398,8 @@ class BaseRepoController(BaseController)
 
                return redirect(check_url)
 

	
 
            dbr = c.db_repo = _dbr
 
            c.rhodecode_repo = c.db_repo.scm_instance
 
            if c.rhodecode_repo is None:
 
            c.db_repo_scm_instance = c.db_repo.scm_instance
 
            if c.db_repo_scm_instance is None:
 
                log.error('%s this repository is present in database but it '
 
                          'cannot be created as an scm instance', c.repo_name)
 

	
kallithea/templates/base/base.html
Show inline comments
 
@@ -186,7 +186,7 @@
 
                  </a>
 
                  </li>
 
                  <li><a href="${h.url('repo_fork_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Fork')}</a></li>
 
                  %if h.is_hg(c.rhodecode_repo):
 
                  %if h.is_hg(c.db_repo_scm_instance):
 
                  <li><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}"><i class="icon-code-fork"></i> ${_('Create Pull Request')}</a></li>
 
                  %endif
 
              %endif
kallithea/templates/changelog/changelog.html
Show inline comments
 
@@ -119,7 +119,7 @@ ${self.repo_context_bar('changelog')}
 
                                            </div>
 
                                        </div>
 
                                    %endif
 
                                    %if h.is_hg(c.rhodecode_repo):
 
                                    %if h.is_hg(c.db_repo_scm_instance):
 
                                        %for book in cs.bookmarks:
 
                                            <div class="booktag" title="${_('Bookmark %s') % book}">
 
                                                ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
kallithea/templates/changelog/changelog_summary_data.html
Show inline comments
 
@@ -45,7 +45,7 @@
 
        </td>
 
        <td title="${cs.author}">${h.person(cs.author)}</td>
 
        <td>
 
            %if h.is_hg(c.rhodecode_repo):
 
            %if h.is_hg(c.db_repo_scm_instance):
 
                %for book in cs.bookmarks:
 
                    <div class="booktag" title="${_('Bookmark %s') % book}">
 
                        ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
 
@@ -94,15 +94,15 @@ ${c.repo_changesets.pager('$link_previou
 

	
 
<h4>${_('Push new repo')}</h4>
 
<pre>
 
    ${c.rhodecode_repo.alias} clone ${c.clone_repo_url}
 
    ${c.rhodecode_repo.alias} add README # add first file
 
    ${c.rhodecode_repo.alias} commit -m "Initial" # commit with message
 
    ${c.rhodecode_repo.alias} push ${'origin master' if h.is_git(c.rhodecode_repo) else ''} # push changes back
 
    ${c.db_repo_scm_instance.alias} clone ${c.clone_repo_url}
 
    ${c.db_repo_scm_instance.alias} add README # add first file
 
    ${c.db_repo_scm_instance.alias} commit -m "Initial" # commit with message
 
    ${c.db_repo_scm_instance.alias} push ${'origin master' if h.is_git(c.db_repo_scm_instance) else ''} # push changes back
 
</pre>
 

	
 
<h4>${_('Existing repository?')}</h4>
 
<pre>
 
%if h.is_git(c.rhodecode_repo):
 
%if h.is_git(c.db_repo_scm_instance):
 
    git remote add origin ${c.clone_repo_url}
 
    git push -u origin master
 
%else:
kallithea/templates/changeset/changeset.html
Show inline comments
 
@@ -88,7 +88,7 @@ ${self.repo_context_bar('changelog')}
 
                        <span class="merge">${_('merge')}</span>
 
                        %endif
 

	
 
                        %if h.is_hg(c.rhodecode_repo):
 
                        %if h.is_hg(c.db_repo_scm_instance):
 
                          %for book in c.changeset.bookmarks:
 
                          <span class="booktag" title="${_('Bookmark %s') % book}">
 
                             ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}
kallithea/templates/changeset/changeset_range.html
Show inline comments
 
@@ -88,7 +88,7 @@ ${self.repo_context_bar('changelog')}
 
                %if len(cs.parents)>1:
 
                <span class="merge">${_('merge')}</span>
 
                %endif
 
                %if h.is_hg(c.rhodecode_repo):
 
                %if h.is_hg(c.db_repo_scm_instance):
 
                  %for book in cs.bookmarks:
 
                  <span class="booktag" title="${_('Bookmark %s') % book}">
 
                     ${h.link_to(h.shorter(book),h.url('files_home',repo_name=c.repo_name,revision=cs.raw_id))}
kallithea/templates/changeset/patch_changeset.html
Show inline comments
 
%if h.is_hg(c.rhodecode_repo):
 
# ${c.rhodecode_repo.alias.upper()} changeset patch
 
%if h.is_hg(c.db_repo_scm_instance):
 
# ${c.db_repo_scm_instance.alias.upper()} changeset patch
 
# User ${c.changeset.author |n}
 
# Date ${c.changeset.date}
 
# Node ID ${c.changeset.raw_id}
 
${c.parent_tmpl}
 
${c.changeset.message |n}
 

	
 
%elif h.is_git(c.rhodecode_repo):
 
%elif h.is_git(c.db_repo_scm_instance):
 
From ${c.changeset.raw_id} ${c.changeset.date}
 
From: ${c.changeset.author |n}
 
Date: ${c.changeset.date}
kallithea/templates/summary/summary.html
Show inline comments
 
@@ -115,7 +115,7 @@ summary = lambda n:{False:'summary-short
 
                  <label>${_('Download')}:</label>
 
              </div>
 
              <div class="input ${summary(c.show_stats)}">
 
                %if len(c.rhodecode_repo.revisions) == 0:
 
                %if len(c.db_repo_scm_instance.revisions) == 0:
 
                  ${_('There are no downloads yet')}
 
                %elif not c.enable_downloads:
 
                  ${_('Downloads are disabled for this repository')}
 
@@ -311,7 +311,7 @@ $(document).ready(function(){
 
    });
 

	
 
    var tmpl_links = {};
 
    %for cnt,archive in enumerate(c.rhodecode_repo._get_archives()):
 
    %for cnt,archive in enumerate(c.db_repo_scm_instance._get_archives()):
 
      tmpl_links["${archive['type']}"] = '${h.link_to('__NAME__', h.url('files_archive_home',repo_name=c.db_repo.repo_name, fname='__CS__'+archive['extension'],subrepos='__SUB__'),class_='btn btn-small')}';
 
    %endfor
 
})
kallithea/templates/switch_to_list.html
Show inline comments
 
## -*- coding: utf-8 -*-
 
<li>
 
    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-code-fork"></i> ${'%s (%s)' % (_('Branches'),len(c.rhodecode_repo.branches.values()),)}</a>
 
    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-code-fork"></i> ${'%s (%s)' % (_('Branches'),len(c.db_repo_scm_instance.branches.values()),)}</a>
 
    <ul>
 
    %if c.rhodecode_repo.branches.values():
 
        %for cnt,branch in enumerate(c.rhodecode_repo.branches.items()):
 
    %if c.db_repo_scm_instance.branches.values():
 
        %for cnt,branch in enumerate(c.db_repo_scm_instance.branches.items()):
 
            <li><div><pre>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=(branch[0] if '/' not in branch[0] else branch[1]), at=branch[0]))}</pre></div></li>
 
        %endfor
 
    %else:
 
@@ -11,21 +11,21 @@
 
    %endif
 
    </ul>
 
</li>
 
%if c.rhodecode_repo.closed_branches.values():
 
%if c.db_repo_scm_instance.closed_branches.values():
 
<li>
 
    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-code-fork"></i> ${'%s (%s)' % (_('Closed Branches'),len(c.rhodecode_repo.closed_branches.values()))}</a>
 
    <a href="${h.url('branches_home',repo_name=c.repo_name)}" class="childs"><i class="icon-code-fork"></i> ${'%s (%s)' % (_('Closed Branches'),len(c.db_repo_scm_instance.closed_branches.values()))}</a>
 
    <ul>
 
        %for cnt,branch in enumerate(c.rhodecode_repo.closed_branches.items()):
 
        %for cnt,branch in enumerate(c.db_repo_scm_instance.closed_branches.items()):
 
            <li><div><pre>${h.link_to('%s - %s' % (branch[0],h.short_id(branch[1])),h.url('files_home',repo_name=c.repo_name,revision=(branch[0] if '/' not in branch[0] else branch[1]), at=branch[0]))}</pre></div></li>
 
        %endfor
 
    </ul>
 
</li>
 
%endif
 
<li>
 
    <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"><i class="icon-tag"></i> ${'%s (%s)' % (_('Tags'),len(c.rhodecode_repo.tags.values()),)}</a>
 
    <a href="${h.url('tags_home',repo_name=c.repo_name)}" class="childs"><i class="icon-tag"></i> ${'%s (%s)' % (_('Tags'),len(c.db_repo_scm_instance.tags.values()),)}</a>
 
    <ul>
 
    %if c.rhodecode_repo.tags.values():
 
        %for cnt,tag in enumerate(c.rhodecode_repo.tags.items()):
 
    %if c.db_repo_scm_instance.tags.values():
 
        %for cnt,tag in enumerate(c.db_repo_scm_instance.tags.items()):
 
         <li><div><pre>${h.link_to('%s - %s' % (tag[0],h.short_id(tag[1])),h.url('files_home',repo_name=c.repo_name,revision=(tag[0] if '/' not in tag[0] else tag[1]), at=tag[0]))}</pre></div></li>
 
        %endfor
 
    %else:
 
@@ -33,12 +33,12 @@
 
    %endif
 
    </ul>
 
</li>
 
%if c.rhodecode_repo.alias == 'hg':
 
%if c.db_repo_scm_instance.alias == 'hg':
 
<li>
 
    <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"><i class="icon-bookmark"></i> ${'%s (%s)' % (_('Bookmarks'),len(c.rhodecode_repo.bookmarks.values()),)}</a>
 
    <a href="${h.url('bookmarks_home',repo_name=c.repo_name)}" class="childs"><i class="icon-bookmark"></i> ${'%s (%s)' % (_('Bookmarks'),len(c.db_repo_scm_instance.bookmarks.values()),)}</a>
 
    <ul>
 
    %if c.rhodecode_repo.bookmarks.values():
 
        %for cnt,book in enumerate(c.rhodecode_repo.bookmarks.items()):
 
    %if c.db_repo_scm_instance.bookmarks.values():
 
        %for cnt,book in enumerate(c.db_repo_scm_instance.bookmarks.items()):
 
         <li><div><pre>${h.link_to('%s - %s' % (book[0],h.short_id(book[1])),h.url('files_home',repo_name=c.repo_name,revision=(book[0] if '/' not in book[0] else book[1]), at=book[0]))}</pre></div></li>
 
        %endfor
 
    %else:
0 comments (0 inline, 0 general)