Annotate bug ?

Martin Pool mbp at canonical.com
Thu May 18 10:24:32 BST 2006


On 18 May 2006, Olaf Conradi <olaf at conradi.org> wrote:

> === modified file 'bzrlib/annotate.py'
> --- bzrlib/annotate.py	
> +++ bzrlib/annotate.py	
> @@ -71,15 +71,15 @@
>                      revno_str = str(rh.index(origin) + 1)
>                  else:
>                      revno_str = 'merge'
> -            rev = branch.repository.get_revision(origin)
> -            tz = rev.timezone or 0
> -            date_str = time.strftime('%Y%m%d', 
> -                                     time.gmtime(rev.timestamp + tz))
> -            # a lazy way to get something like the email address
> -            # TODO: Get real email address
> -            author = rev.committer
> -            try:
> -                author = extract_email_address(author)
> -            except BzrError:
> -                pass        # use the whole name
> +                rev = branch.repository.get_revision(origin)
> +                tz = rev.timezone or 0
> +                date_str = time.strftime('%Y%m%d', 
> +                                         time.gmtime(rev.timestamp + tz))
> +                # a lazy way to get something like the email address
> +                # TODO: Get real email address
> +                author = rev.committer
> +                try:
> +                    author = extract_email_address(author)
> +                except BzrError:
> +                    pass        # use the whole name
>          yield (revno_str, author, date_str, origin, text)

For other reviewers - the patch looks a bit strange, but I think it's
correct - it puts all of this under a "if branch.has_revision" just out
of view above the start of the diff.  +1 from me.

-- 
Martin




More information about the bazaar mailing list