~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-14 09:56:54 UTC
  • mfrom: (5967.1.3 667408-bzr-blame-no-whoami)
  • Revision ID: pqm@pqm.ubuntu.com-20110614095654-xgw6kju0oxw1gp1z
(jr) ``bzr annotate`` can be run without setting whoami data first.
 (Jonathan Riddell, LP: #667408) (Jonathan Riddell)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
from bzrlib import (
39
39
    errors,
40
40
    osutils,
 
41
    i18n,
41
42
    )
42
43
from bzrlib.config import extract_email_address
43
44
from bzrlib.repository import _strip_NULL_ghosts
104
105
        # bugfixes etc.
105
106
        current_rev = Revision(CURRENT_REVISION)
106
107
        current_rev.parent_ids = tree.get_parent_ids()
107
 
        current_rev.committer = branch.get_config().username()
 
108
        try:
 
109
            current_rev.committer = branch.get_config().username()
 
110
        except errors.NoWhoami:
 
111
            current_rev.committer = i18n.gettext("local user")
108
112
        current_rev.message = "?"
109
113
        current_rev.timestamp = round(time.time(), 3)
110
114
        current_rev.timezone = osutils.local_time_offset()