~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-08 11:01:15 UTC
  • mfrom: (6123.1.16 gpg-typo)
  • Revision ID: pqm@cupuasso-20110908110115-gbb9benwkdksvzk5
(jelmer) Fix a typo (invalid format identifier) in an error message in
 bzrlib.gpg. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
137
137
        )
138
138
from bzrlib.trace import mutter, note
139
139
from bzrlib.osutils import format_delta, rand_chars, get_host_name
140
 
from bzrlib.i18n import gettext
141
140
 
142
141
from bzrlib.lazy_import import lazy_import
143
142
lazy_import(globals(), """
317
316
            self.transport.delete(tmpname + self.__INFO_NAME)
318
317
            self.transport.rmdir(tmpname)
319
318
        except PathError, e:
320
 
            note(gettext("error removing pending lock: %s"), e)
 
319
            note("error removing pending lock: %s", e)
321
320
 
322
321
    def _create_pending_dir(self):
323
322
        tmpname = '%s/%s.tmp' % (self.path, rand_chars(10))
612
611
            new_info = self.peek()
613
612
            if new_info is not None and new_info != last_info:
614
613
                if last_info is None:
615
 
                    start = gettext('Unable to obtain')
 
614
                    start = 'Unable to obtain'
616
615
                else:
617
 
                    start = gettext('Lock owner changed for')
 
616
                    start = 'Lock owner changed for'
618
617
                last_info = new_info
619
 
                msg = gettext('{0} lock {1} {2}.').format(start, lock_url,
620
 
                                                                    new_info)
 
618
                msg = u'%s lock %s %s.' % (start, lock_url, new_info)
621
619
                if deadline_str is None:
622
620
                    deadline_str = time.strftime('%H:%M:%S',
623
621
                                                    time.localtime(deadline))
624
622
                if timeout > 0:
625
 
                    msg += '\n' + gettext(
626
 
                             'Will continue to try until %s, unless '
627
 
                             'you press Ctrl-C.') % deadline_str
628
 
                msg += '\n' + gettext('See "bzr help break-lock" for more.')
 
623
                    msg += ('\nWill continue to try until %s, unless '
 
624
                        'you press Ctrl-C.'
 
625
                        % deadline_str)
 
626
                msg += '\nSee "bzr help break-lock" for more.'
629
627
                self._report_function(msg)
630
628
            if (max_attempts is not None) and (attempt_count >= max_attempts):
631
629
                self._trace("exceeded %d attempts")
734
732
    def __unicode__(self):
735
733
        """Return a user-oriented description of this object."""
736
734
        d = self.to_readable_dict()
737
 
        return ( gettext(
 
735
        return (
738
736
            u'held by %(user)s on %(hostname)s (process #%(pid)s), '
739
 
            u'acquired %(time_ago)s') % d)
 
737
            u'acquired %(time_ago)s' % d)
740
738
 
741
739
    def to_readable_dict(self):
742
740
        """Turn the holder info into a dict of human-readable attributes.