20
20
from cStringIO import StringIO
22
22
from bzrlib import branch, errors, lockdir, repository
23
from bzrlib.branch import BranchReferenceFormat
23
from bzrlib.branch import Branch, BranchReferenceFormat
24
24
from bzrlib.bzrdir import BzrDir, RemoteBzrDirFormat
25
25
from bzrlib.config import BranchConfig, TreeConfig
26
26
from bzrlib.decorators import needs_read_lock, needs_write_lock
991
996
return self._real_branch.append_revision(*revision_ids)
993
998
@needs_write_lock
994
def pull(self, source, overwrite=False, stop_revision=None):
999
def pull(self, source, overwrite=False, stop_revision=None,
1001
# FIXME: This asks the real branch to run the hooks, which means
1002
# they're called with the wrong target branch parameter.
1003
# The test suite specifically allows this at present but it should be
1004
# fixed. It should get a _override_hook_target branch,
1005
# as push does. -- mbp 20070405
995
1006
self._ensure_real()
996
1007
self._real_branch.pull(
997
source, overwrite=overwrite, stop_revision=stop_revision)
1008
source, overwrite=overwrite, stop_revision=stop_revision,
999
1011
@needs_read_lock
1000
1012
def push(self, target, overwrite=False, stop_revision=None):
1001
1013
self._ensure_real()
1002
1014
return self._real_branch.push(
1003
target, overwrite=overwrite, stop_revision=stop_revision)
1015
target, overwrite=overwrite, stop_revision=stop_revision,
1016
_override_hook_source_branch=self)
1005
1018
def is_locked(self):
1006
1019
return self._lock_count >= 1