[PATCH] BugFix for #5162: bzr log --line should show revisions numbers

Martin Pool mbp at canonical.com
Thu May 18 07:20:30 BST 2006


On 15 May 2006, Alexander Belchenko <bialix at ukr.net> wrote:
> This patch fix the bug #5162.
> https://launchpad.net/products/bzr/+bug/5162
> 
> Test provided. Patch against bzr.dev.

Thankyou, merged.
> -    def log_string(self, rev, max_chars):
> -        out = [self.truncate(self.short_committer(rev), 20)]
> +        print >> self.to_file, self.log_string(revno, rev, terminal_width()-1)
> +
> +    def log_string(self, revno, rev, max_chars):

In general it's not such a good idea to add new parameters to existing
functions other than at the end: any callers that are not updated in
sync might do the wrong thing, or be updated in the wrong way.

> +        """Format log info into one string. Truncate tail of string
> +        :param  revno:      revision number (int) or None.
> +                            Revision numbers counts from 1.
> +        :param  rev:        revision info object
> +        :param  max_chars:  maximum length of resulting string
> +        :return:            formatted truncated string
> +        """

Thanks for that.
-- 
Martin




More information about the bazaar mailing list