Commits

Marcin Kuzminski committed 0d3706c

small fixes for git support

Comments (0)

Files changed (3)

rhodecode/controllers/changelog.py

         :param size: number of commits to show
         :param p: page number
         """
-        if not repo.revisions or repo.alias == 'git':
+        if not repo.revisions:
             c.jsdata = json.dumps([])
             return
 
         rev_start = repo.revisions.index(repo.revisions[(-1 * offset)])
         rev_end = max(0, rev_start - revcount)
 
-        dag = graph_rev(repo._repo, rev_start, rev_end)
-        c.dag = tree = list(colored(dag))
         data = []
-        for (id, type, ctx, vtx, edges) in tree:
-            if type != CHANGESET:
-                continue
-            data.append(('', vtx, edges))
+        if repo.alias == 'git':
+            for _ in xrange(rev_end, rev_start):
+                vtx = [0, 1]
+                edges = [[0, 0, 1]]
+                data.append(['', vtx, edges])
+
+        elif repo.alias == 'hg':
+            dag = graph_rev(repo._repo, rev_start, rev_end)
+            c.dag = tree = list(colored(dag))
+            for (id, type, ctx, vtx, edges) in tree:
+                if type != CHANGESET:
+                    continue
+                data.append(['', vtx, edges])
 
         c.jsdata = json.dumps(data)

rhodecode/controllers/summary.py

 
         if stats and stats.languages:
             c.no_data = False is dbrepo.enable_statistics
-            lang_stats = json.loads(stats.languages)
+            lang_stats_d = json.loads(stats.languages)
             c.commit_data = stats.commit_activity
             c.overview_data = stats.commit_activity_combined
 
             lang_stats = [(x, {"count": y,
                                "desc": LANGUAGES_EXTENSIONS_MAP.get(x)})
-                          for x, y in lang_stats.items()]
+                          for x, y in lang_stats_d.items()]
 
             c.trending_languages = json.dumps(OrderedDict(
                                        sorted(lang_stats, reverse=True,

rhodecode/templates/summary/summary.html

 			      <label>${_('Clone url')}:</label>
 			  </div>
 			  <div class="input-short">
-			      <input type="text" id="clone_url" readonly="readonly" value="hg clone ${c.clone_repo_url}" size="70"/>
+			      <input type="text" id="clone_url" readonly="readonly" value="${c.rhodecode_repo.alias} clone ${c.clone_repo_url}" size="70"/>
 			  </div>
 			 </div>