~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Robert Collins
  • Date: 2008-09-19 06:53:41 UTC
  • mto: (3696.5.1 commit-updates)
  • mto: This revision was merged to the branch mainline in revision 3741.
  • Revision ID: robertc@robertcollins.net-20080919065341-5t5w1p2gi926nfia
First cut - make it work - at updating the tree stat cache during commit.

Show diffs side-by-side

added added

removed removed

Lines of Context:
128
128
        )
129
129
from bzrlib.trace import mutter, note
130
130
from bzrlib.transport import Transport
131
 
from bzrlib.osutils import rand_chars, format_delta
 
131
from bzrlib.osutils import rand_chars, format_delta, get_host_name
132
132
from bzrlib.rio import read_stanza, Stanza
133
133
import bzrlib.ui
134
134
 
422
422
    def _prepare_info(self):
423
423
        """Write information about a pending lock to a temporary file.
424
424
        """
425
 
        import socket
426
425
        # XXX: is creating this here inefficient?
427
426
        config = bzrlib.config.GlobalConfig()
428
427
        try:
429
428
            user = config.user_email()
430
429
        except errors.NoEmailInUsername:
431
430
            user = config.username()
432
 
        s = Stanza(hostname=socket.gethostname(),
 
431
        s = Stanza(hostname=get_host_name(),
433
432
                   pid=str(os.getpid()),
434
433
                   start_time=str(int(time.time())),
435
434
                   nonce=self.nonce,