changeset 2222:e5abb9efaf2c beta

add option for graphmod to support both hg 2.2 and hg 2.1
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 02 May 2012 18:19:10 +0200
parents f219eb1f6bb3
children 528f987f2459
files rhodecode/controllers/changelog.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/changelog.py	Tue May 01 22:32:53 2012 +0200
+++ b/rhodecode/controllers/changelog.py	Wed May 02 18:19:10 2012 +0200
@@ -126,7 +126,12 @@
 
         elif repo.alias == 'hg':
             dag = graphmod.dagwalker(repo._repo, revs)
-            c.dag = graphmod.colored(dag, repo._repo)
+            try:
+                c.dag = graphmod.colored(dag)
+            except:
+                #HG 2.2+
+                c.dag = graphmod.colored(dag, repo._repo)
+
             for (id, type, ctx, vtx, edges) in c.dag:
                 if type != graphmod.CHANGESET:
                     continue