~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/branch.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-19 04:29:20 UTC
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20070419042920-fwr334s98mbcxh5e
Use 'null:' instead of '' to mean NULL_REVISION on the wire.

Show diffs side-by-side

added added

removed removed

Lines of Context:
97
97
        The revno is encoded in decimal, the revision_id is encoded as utf8.
98
98
        """
99
99
        revno, last_revision = branch.last_revision_info()
100
 
        if last_revision == NULL_REVISION:
101
 
            last_revision = ''
102
100
        return SmartServerResponse(('ok', str(revno), last_revision))
103
101
 
104
102
 
105
103
class SmartServerBranchRequestSetLastRevision(SmartServerLockedBranchRequest):
106
104
    
107
105
    def do_with_locked_branch(self, branch, new_last_revision_id):
108
 
        if new_last_revision_id == '':
 
106
        if new_last_revision_id == 'null:':
109
107
            branch.set_revision_history([])
110
108
        else:
111
109
            if not branch.repository.has_revision(new_last_revision_id):