~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: 2007-12-15 21:00:20 UTC
  • mfrom: (3113.5.1 test.174055)
  • Revision ID: pqm@pqm.ubuntu.com-20071215210020-m28kk1qmbcc9n6qs
(bialix) XFAIL test for #174055: can't run bzr info while dirstate
 is locked

Show diffs side-by-side

added added

removed removed

Lines of Context:
167
167
        :param path: Path to the lock within the base directory of the 
168
168
            transport.
169
169
        """
 
170
        assert isinstance(transport, Transport), \
 
171
            ("not a transport: %r" % transport)
170
172
        self.transport = transport
171
173
        self.path = path
172
174
        self._lock_held = False
415
417
        try:
416
418
            info = self._read_info_file(self._held_info_path)
417
419
            self._trace("peek -> held")
 
420
            assert isinstance(info, dict), \
 
421
                    "bad parse result %r" % info
418
422
            return info
419
423
        except NoSuchFile, e:
420
424
            self._trace("peek -> not held")
506
510
                if deadline_str is None:
507
511
                    deadline_str = time.strftime('%H:%M:%S',
508
512
                                                 time.localtime(deadline))
509
 
                lock_url = self.transport.abspath(self.path)
510
513
                self._report_function('%s %s\n'
511
514
                                      '%s\n' # held by
512
515
                                      '%s\n' # locked ... ago
513
 
                                      'Will continue to try until %s, unless '
514
 
                                      'you press Ctrl-C\n'
515
 
                                      'If you\'re sure that it\'s not being '
516
 
                                      'modified, use bzr break-lock %s',
 
516
                                      'Will continue to try until %s\n',
517
517
                                      start,
518
518
                                      formatted_info[0],
519
519
                                      formatted_info[1],
520
520
                                      formatted_info[2],
521
 
                                      deadline_str,
522
 
                                      lock_url)
 
521
                                      deadline_str)
523
522
 
524
523
            if (max_attempts is not None) and (attempt_count >= max_attempts):
525
524
                self._trace("exceeded %d attempts")