~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Patch Queue Manager
  • Date: 2011-11-18 15:57:50 UTC
  • mfrom: (6266.3.2 hpss-has-workingtree)
  • Revision ID: pqm@pqm.ubuntu.com-20111118155750-apia0a5k1mnt8qm8
(jelmer) Add HPSS call for ``BzrDir.has_workingtree``. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
672
672
 
673
673
    def has_workingtree(self):
674
674
        if self._has_working_tree is None:
675
 
            self._ensure_real()
676
 
            self._has_working_tree = self._real_bzrdir.has_workingtree()
 
675
            path = self._path_for_remote_call(self._client)
 
676
            try:
 
677
                response = self._call('BzrDir.has_workingtree', path)
 
678
            except errors.UnknownSmartMethod:
 
679
                self._ensure_real()
 
680
                self._has_working_tree = self._real_bzrdir.has_workingtree()
 
681
            else:
 
682
                if response[0] not in ('yes', 'no'):
 
683
                    raise SmartProtocolError('unexpected response code %s' % (response,))
 
684
                self._has_working_tree = (response[0] == 'yes')
677
685
        return self._has_working_tree
678
686
 
679
687
    def open_workingtree(self, recommend_upgrade=True):