~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-12-10 15:38:44 UTC
  • mfrom: (4873.3.1 2.1.0b4-win32-diff-failure)
  • Revision ID: pqm@pqm.ubuntu.com-20091210153844-efqie2ybl6owgojv
(jam) Fix a failing test on Windows now that diff uses wt files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
242
242
        # incorrect.  It's possible some other servers or filesystems will
243
243
        # have a similar bug allowing someone to think they got the lock
244
244
        # when it's already held.
245
 
        #
246
 
        # See <https://bugs.edge.launchpad.net/bzr/+bug/498378> for one case.
247
 
        #
248
 
        # Strictly the check is unnecessary and a waste of time for most
249
 
        # people, but probably worth trapping if something is wrong.
250
245
        info = self.peek()
251
246
        self._trace("after locking, info=%r", info)
252
 
        if info is None:
253
 
            raise LockFailed(self, "lock was renamed into place, but "
254
 
                "now is missing!")
255
247
        if info['nonce'] != self.nonce:
256
248
            self._trace("rename succeeded, "
257
249
                "but lock is still held by someone else")
534
526
                    deadline_str = time.strftime('%H:%M:%S',
535
527
                                                 time.localtime(deadline))
536
528
                lock_url = self.transport.abspath(self.path)
537
 
                # See <https://bugs.edge.launchpad.net/bzr/+bug/250451>
538
 
                # the URL here is sometimes not one that is useful to the
539
 
                # user, perhaps being wrapped in a lp-%d or chroot decorator,
540
 
                # especially if this error is issued from the server.
541
529
                self._report_function('%s %s\n'
542
 
                    '%s\n' # held by
543
 
                    '%s\n' # locked ... ago
544
 
                    'Will continue to try until %s, unless '
545
 
                    'you press Ctrl-C.\n'
546
 
                    'See "bzr help break-lock" for more.',
547
 
                    start,
548
 
                    formatted_info[0],
549
 
                    formatted_info[1],
550
 
                    formatted_info[2],
551
 
                    deadline_str,
552
 
                    )
 
530
                                      '%s\n' # held by
 
531
                                      '%s\n' # locked ... ago
 
532
                                      'Will continue to try until %s, unless '
 
533
                                      'you press Ctrl-C\n'
 
534
                                      'If you\'re sure that it\'s not being '
 
535
                                      'modified, use bzr break-lock %s',
 
536
                                      start,
 
537
                                      formatted_info[0],
 
538
                                      formatted_info[1],
 
539
                                      formatted_info[2],
 
540
                                      deadline_str,
 
541
                                      lock_url)
553
542
 
554
543
            if (max_attempts is not None) and (attempt_count >= max_attempts):
555
544
                self._trace("exceeded %d attempts")