~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Jelmer Vernooij
  • Date: 2009-04-06 02:54:14 UTC
  • mfrom: (4253 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4255.
  • Revision ID: jelmer@samba.org-20090406025414-65tpjwcmjp5wa5oj
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
 
81
81
        The body is not utf8 decoded - its the literal bytestream from disk.
82
82
        """
83
 
        # This was at one time called by RemoteBranchLockableFiles
84
 
        # intercepting access to this file; as of 1.5 it is not called by the
85
 
        # client but retained for compatibility.  It may be called again to
86
 
        # allow the client to get the configuration without needing vfs
87
 
        # access.
88
83
        try:
89
84
            content = branch._transport.get_bytes('branch.conf')
90
85
        except errors.NoSuchFile:
153
148
            return FailedSmartServerResponse(('TipChangeRejected', msg))
154
149
 
155
150
 
 
151
class SmartServerBranchRequestSetConfigOption(SmartServerLockedBranchRequest):
 
152
    """Set an option in the branch configuration."""
 
153
 
 
154
    def do_with_locked_branch(self, branch, value, name, section):
 
155
        if not section:
 
156
            section = None
 
157
        branch._get_config().set_option(value.decode('utf8'), name, section)
 
158
        return SuccessfulSmartServerResponse(())
 
159
 
 
160
 
156
161
class SmartServerBranchRequestSetLastRevision(SmartServerSetTipRequest):
157
162
 
158
163
    def do_tip_change_with_locked_branch(self, branch, new_last_revision_id):