Changeset e7e82226b776…
Parent fcb23a0e6416…
by
Changes to 2 files · Browse files at e7e82226b776 Showing diff from parent fcb23a0e6416 Diff from another changeset...
@@ -16,9 +16,13 @@ import win32api
import _winreg
from mercurial import hg
-from mercurial import repo as _repo
from thgutil import *
+try:
+ from mercurial.error import RepoError
+except ImportError:
+ from mercurial.repo import RepoError
+
# FIXME: quick workaround traceback caused by missing "closed"
# attribute in win32trace.
import sys
@@ -64,7 +68,7 @@ try:
repo = hg.repository(ui.ui(), path=root)
return repo
- except _repo.RepoError:
+ except RepoError:
pass
return None
|
@@ -8,10 +8,14 @@ from win32com.shell import shell, shellcon
import _winreg
from mercurial import hg, cmdutil, util
-from mercurial import repo as _repo
import thgutil
import sys
+try:
+ from mercurial.error import RepoError
+except ImportError:
+ from mercurial.repo import RepoError
+
# FIXME: quick workaround traceback caused by missing "closed"
# attribute in win32trace.
from mercurial import ui
@@ -143,7 +147,7 @@ overlay_cache = {None : None}
cache_tick_count = win32api.GetTickCount()
return NOT_IN_REPO
- except _repo.RepoError:
+ except RepoError:
# We aren't in a working tree
print "%s: not in repo" % pdir
overlay_cache[path] = UNKNOWN
|
Loading...