ZyX_I committed 52a8630

@%aurum/drivers/mercurial: Improved support for old mercurial versions

  • Participants
  • Parent commits 3ba62db

Comments (0)

Files changed (2)

File autoload/aurum/drivers/mercurial.vim

             \ 'norev' : 'No revision %s in repository %s',
             \ 'nofile': 'File %s is not present in revision %s '.
             \           'from repository %s',
-            \  'csuns': 'Unable to get changeset from repository %s: '.
-            \           'operation not supported',
             \'statuns': 'Unable to get working directory status '.
             \           'of repository %s: operation not supported',
             \ 'comuns': 'Unable to commit to repository %s: '.

File python/aurum/

 from mercurial import hg, ui, commands, match
-from mercurial.repo import error
+    from mercurial.repo import error
+except ImportError:
+    from mercurial import error
 import vim
 import os
 import json
 import re
 import sys
+if hasattr(error, 'RepoLookupError'):
+    RepoLookupError=error.RepoLookupError
+    RepoLookupError=error.RepoError
 def outermethod(func):
         Decorator used to make functions omit showing python traceback in case vim_throw was used.
 def g_cs(repo, rev):
-        if not hasattr(repo, '__getitem__'):
-            vim.command('call s:_f.throw("csuns", '+nonutf_dumps(repo.path)+')')
-            raise AurumError()
         return repo[rev]
-    except error.RepoLookupError:
+    except RepoLookupError:
         vim_throw('norev', rev, repo.path)
 def g_fctx(cs, filepath):