Rev 23: Fix 4 tests by updating for changed hg apis. in http://bazaar.launchpad.net/~bzr/bzr-hg/trunk
Robert Collins
robertc at robertcollins.net
Wed Jul 11 09:22:50 BST 2007
At http://bazaar.launchpad.net/~bzr/bzr-hg/trunk
------------------------------------------------------------
revno: 23
revision-id: robertc at robertcollins.net-20070711082242-d6p2dl38loovp1gy
parent: robertc at robertcollins.net-20070711081236-ggxhdczjd8an7523
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Wed 2007-07-11 18:22:42 +1000
message:
Fix 4 tests by updating for changed hg apis.
modified:
__init__.py __init__.py-20060531211707-2fy7rwqqcmfgf8ve-1
=== modified file '__init__.py'
--- a/__init__.py 2007-07-11 08:12:36 +0000
+++ b/__init__.py 2007-07-11 08:22:42 +0000
@@ -32,6 +32,7 @@
import stat
import mercurial.commands
+import mercurial.cmdutil
import mercurial.hg
import mercurial.node
from mercurial.node import hex, bin
@@ -66,7 +67,9 @@
def __init__(self, hgrepo):
self._hgrepo = hgrepo
- def lock_write(self):
+ def lock_write(self, token=None):
+ if token is not None:
+ raise errors.TokenLockingNotSupported(self)
self._lock = self._hgrepo.wlock()
def lock_read(self):
@@ -78,6 +81,10 @@
def unlock(self):
self._lock.release()
+ def validate_token(self, token):
+ if token is not None:
+ raise errors.TokenLockingNotSupported(self)
+
class HgLockableFiles(bzrlib.lockable_files.LockableFiles):
"""Hg specific lockable files abstraction."""
@@ -454,12 +461,15 @@
@needs_write_lock
def commit(self, message, *args, **kwargs):
# TODO: selected file lists etc.
- files, matchfn, anypats = mercurial.commands.matchpats(self._hgrepo)
+ files, matchfn, anypats = mercurial.cmdutil.matchpats(self._hgrepo)
self._hgrepo.commit([], message, None, None, matchfn, wlock=self._control_files._lock)
# def read_working_inventory(self):
# """in hg terms, read the manifest."""
+ def _reset_data(self):
+ """Reset all cached data."""
+
def unlock(self):
"""Overridden to avoid hashcache usage - hg manages that."""
try:
More information about the bazaar-commits
mailing list