/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: John Arbash Meinel
  • Date: 2008-06-05 16:27:16 UTC
  • mfrom: (3475 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3476.
  • Revision ID: john@arbash-meinel.com-20080605162716-a3hn238tnctbfd8j
merge bzr.dev, resolve NEWS

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)
172
170
        self.transport = transport
173
171
        self.path = path
174
172
        self._lock_held = False
417
415
        try:
418
416
            info = self._read_info_file(self._held_info_path)
419
417
            self._trace("peek -> held")
420
 
            assert isinstance(info, dict), \
421
 
                    "bad parse result %r" % info
422
418
            return info
423
419
        except NoSuchFile, e:
424
420
            self._trace("peek -> not held")
510
506
                if deadline_str is None:
511
507
                    deadline_str = time.strftime('%H:%M:%S',
512
508
                                                 time.localtime(deadline))
 
509
                lock_url = self.transport.abspath(self.path)
513
510
                self._report_function('%s %s\n'
514
511
                                      '%s\n' # held by
515
512
                                      '%s\n' # locked ... ago
516
 
                                      'Will continue to try until %s\n',
 
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',
517
517
                                      start,
518
518
                                      formatted_info[0],
519
519
                                      formatted_info[1],
520
520
                                      formatted_info[2],
521
 
                                      deadline_str)
 
521
                                      deadline_str,
 
522
                                      lock_url)
522
523
 
523
524
            if (max_attempts is not None) and (attempt_count >= max_attempts):
524
525
                self._trace("exceeded %d attempts")