~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

Get BranchConfig working somewhat on RemoteBranches (Robert Collins, Vincent Ladeuil).

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        return self.do_with_branch(branch)
40
40
 
41
41
 
 
42
class SmartServerBranchGetConfigFile(SmartServerBranchRequest):
 
43
    
 
44
    def do_with_branch(self, branch):
 
45
        """Return the content of branch.control_files.get('branch.conf').
 
46
        
 
47
        The body is not utf8 decoded - its the literal bytestream from disk.
 
48
        """
 
49
        try:
 
50
            content = branch.control_files.get('branch.conf').read()
 
51
        except errors.NoSuchFile:
 
52
            content = ''
 
53
        return SmartServerResponse( ('ok', ), content)
 
54
 
 
55
 
42
56
class SmartServerRequestRevisionHistory(SmartServerBranchRequest):
43
57
 
44
58
    def do_with_branch(self, branch):