~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Andrew Bennetts
  • Date: 2009-07-22 10:55:35 UTC
  • mto: This revision was merged to the branch mainline in revision 4573.
  • Revision ID: andrew.bennetts@canonical.com-20090722105535-t2iv2j8zbj2230q2
Add Branch.set_tags_bytes RPC, with HPSS call count acceptance test.  Also fixes serialisation of LockDir, and uses external_url() in LockDir's repr and contention message.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
 
182
182
        self._report_function = note
183
183
 
 
184
    def _url(self):
 
185
        try:
 
186
            url = self.transport.external_url()
 
187
        except errors.InProcessTransport:
 
188
            url = self.transport.base
 
189
        return url
 
190
 
184
191
    def __repr__(self):
185
192
        return '%s(%s%s)' % (self.__class__.__name__,
186
 
                             self.transport.base,
187
 
                             self.path)
 
193
                             self._url(), self.path)
188
194
 
189
195
    is_held = property(lambda self: self._lock_held)
190
196
 
521
527
                if deadline_str is None:
522
528
                    deadline_str = time.strftime('%H:%M:%S',
523
529
                                                 time.localtime(deadline))
524
 
                lock_url = self.transport.abspath(self.path)
 
530
                lock_url = self._url()
525
531
                self._report_function('%s %s\n'
526
532
                                      '%s\n' # held by
527
533
                                      '%s\n' # locked ... ago