/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 breezy/annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2019-12-23 01:39:21 UTC
  • mfrom: (7424 work)
  • mto: This revision was merged to the branch mainline in revision 7425.
  • Revision ID: jelmer@jelmer.uk-20191223013921-2kzd0wlcoylgxksk
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
from .lazy_import import lazy_import
34
34
lazy_import(globals(), """
 
35
 
 
36
import patiencediff
 
37
 
35
38
from breezy import (
36
 
    patiencediff,
 
39
    errors,
37
40
    tsort,
38
41
    )
39
42
""")
40
43
from . import (
 
44
    config,
41
45
    osutils,
42
46
    )
43
 
from .config import (
44
 
    NoEmailInUsername,
45
 
    NoWhoami,
46
 
    extract_email_address,
47
 
    )
48
47
from .repository import _strip_NULL_ghosts
49
48
from .revision import (
50
49
    CURRENT_REVISION,
86
85
        current_rev.parent_ids = tree.get_parent_ids()
87
86
        try:
88
87
            current_rev.committer = branch.get_config_stack().get('email')
89
 
        except NoWhoami:
 
88
        except errors.NoWhoami:
90
89
            current_rev.committer = 'local user'
91
90
        current_rev.message = "?"
92
91
        current_rev.timestamp = round(time.time(), 3)
219
218
            # a lazy way to get something like the email address
220
219
            # TODO: Get real email address
221
220
            author = rev.get_apparent_authors()[0]
222
 
            try:
223
 
                author = extract_email_address(author)
224
 
            except NoEmailInUsername:
225
 
                pass        # use the whole name
 
221
            _, email = config.parse_username(author)
 
222
            if email:
 
223
                author = email
226
224
        yield (revno_str, author, date_str, origin, text)
227
225
 
228
226