~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-15 03:10:36 UTC
  • mfrom: (4288.1.6 push.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090415031036-ikndntbkaaj5zjya
(robertc) 6 less round trips on smart push by using a verb to get
        bzrdir stacking policy and inheriting set_parent for
        RemoteBranch. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
297
297
            return FailedSmartServerResponse(('norepository', ))
298
298
 
299
299
 
 
300
class SmartServerBzrDirRequestConfigFile(SmartServerRequestBzrDir):
 
301
 
 
302
    def do_bzrdir_request(self):
 
303
        """Get the configuration bytes for a config file in bzrdir.
 
304
        
 
305
        The body is not utf8 decoded - it is the literal bytestream from disk.
 
306
        """
 
307
        config = self._bzrdir._get_config()
 
308
        if config is None:
 
309
            content = ''
 
310
        else:
 
311
            content = config._get_config_file().read()
 
312
        return SuccessfulSmartServerResponse((), content)
 
313
 
 
314
 
300
315
class SmartServerRequestInitializeBzrDir(SmartServerRequest):
301
316
 
302
317
    def do(self, path):