~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.py

  • Committer: Jelmer Vernooij
  • Date: 2011-11-17 11:09:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6280.
  • Revision ID: jelmer@samba.org-20111117110931-qfpxsemxhmvgj7p5
Add HPSS call for BzrDir.has_workingtree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from bzrlib.bzrdir import (
22
22
    BzrDir,
23
23
    BzrDirFormat,
24
 
    BzrDirMetaFormat1,
25
24
    BzrProber,
26
25
    )
27
26
from bzrlib.controldir import (
121
120
        return '/'.join(segments)
122
121
 
123
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
 
124
139
class SmartServerBzrDirRequestCloningMetaDir(SmartServerRequestBzrDir):
125
140
 
126
141
    def do_bzrdir_request(self, require_stacking):