Commits

Anonymous committed a962cd7

hg 2.3+ compat

  • Participants
  • Parent commits 62f2226

Comments (0)

Files changed (2)

infocalypse/__init__.py

 
 # Starting an FTP repo. Not yet used, except for throwing errors for missing commands and faking the lock.
 
-from mercurial import peer, util
+from mercurial import util
+try:
+    from mercurial.peer import peerrepository
+except ImportError:
+    from mercurial.repo import repository as peerrepository
 try:
     from mercurial.error import RepoError
 except ImportError:
     from mercurial.repo import RepoError
 
-class InfocalypseRepository(peer.peerrepository):
+class InfocalypseRepository(peerrepository):
     def __init__(self, ui, path, create):
         self.create = create
         self.ui = ui

infocalypse/freenetrepo.py

 # This software may be used and distributed according to the terms
 # of the GNU General Public License, incorporated herein by reference.
 
-from mercurial import repo, util
+from mercurial import util
+try:
+    from mercurial.peer import peerrepository
+except ImportError:
+    from mercurial.repo import repository as peerrepository
 try:
     from mercurial.error import RepoError
 except ImportError:
     from mercurial.repo import RepoError
 
-class freenetrepo(repo.repository):
+class freenetrepo(peerrepository):
     capabilities = ['lookup']
 
     def __init__(self, ui, path, create):