~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.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:
120
120
        return '/'.join(segments)
121
121
 
122
122
 
 
123
class SmartServerBzrDirRequestHasWorkingTree(SmartServerRequestBzrDir):
 
124
 
 
125
    def do_bzrdir_request(self, name=None):
 
126
        """Check whether there is a working tree present.
 
127
 
 
128
        New in 2.5.0.
 
129
 
 
130
        :return: If there is a working tree present, 'yes'.
 
131
            Otherwise 'no'.
 
132
        """
 
133
        if self._bzrdir.has_workingtree():
 
134
            return SuccessfulSmartServerResponse(('yes', ))
 
135
        else:
 
136
            return SuccessfulSmartServerResponse(('no', ))
 
137
 
 
138
 
123
139
class SmartServerBzrDirRequestDestroyRepository(SmartServerRequestBzrDir):
124
140
 
125
141
    def do_bzrdir_request(self, name=None):