Merge lp:~gagern/bzr/bug513322-first into lp:bzr

Proposed by Martin von Gagern
Status: Superseded
Proposed branch: lp:~gagern/bzr/bug513322-first
Merge into: lp:bzr
Diff against target: 74 lines (+41/-1)
3 files modified
NEWS (+3/-0)
bzrlib/log.py (+1/-1)
bzrlib/tests/test_log.py (+37/-0)
To merge this branch: bzr merge lp:~gagern/bzr/bug513322-first
Reviewer Review Type Date Requested Status
Martin Pool Needs Fixing
Review via email: mp+22045@code.launchpad.net

This proposal has been superseded by a proposal from 2010-03-30.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote :

This is definitely a user-visible change so should be in NEWS.

It would be nice to have a test for this too.

review: Needs Fixing
Revision history for this message
Martin von Gagern (gagern) wrote :

NEWS and test cases added.

Problem with NEWS changes is that they tend to cause merge conflicts. I'd appreciate if you could merge this soon, so I won't have to track too many changes from bzr.dev.

Revision history for this message
Robert Collins (lifeless) wrote :

On Thu, 2010-03-25 at 09:30 +0000, Martin von Gagern wrote:
> NEWS and test cases added.
>
> Problem with NEWS changes is that they tend to cause merge conflicts.

configure the newsmerge plugin, and that should go away ;)

-Rob

Revision history for this message
Martin von Gagern (gagern) wrote :

@Rob: Thanks for the tip. PQM uses the news_merge plugin?
Launchpad at least doesn't, which made me file bug 546899 for it.

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Martin von Gagern wrote:
> @Rob: Thanks for the tip. PQM uses the news_merge plugin?
> Launchpad at least doesn't, which made me file bug 546899 for it.

I believe PQM does not yet use it. When you say "Launchpad" you mean for
code review? At least for me, I've learned to ignore those conflicts,
and just focus on the content. But I'm used to NEWS conflicting all the
time.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkurlI4ACgkQJdeBCYSNAANKLACdFEwbb3L19+dThd7XR6UTsw1m
qd4AoIp/xxbnmiKsTwAqngl83XDO/Xzz
=Ij0f
-----END PGP SIGNATURE-----

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-03-24 13:58:37 +0000
3+++ NEWS 2010-03-25 08:30:53 +0000
4@@ -167,6 +167,9 @@
5 better with sudo.
6 (Parth Malwankar, #376388)
7
8+* Use first apparent author not committer in GNU Changelog format.
9+ (Martin von Gagern, #513322)
10+
11 API Changes
12 ***********
13
14
15=== modified file 'bzrlib/log.py'
16--- bzrlib/log.py 2010-03-19 10:16:06 +0000
17+++ bzrlib/log.py 2010-03-25 08:30:53 +0000
18@@ -1679,7 +1679,7 @@
19 self.show_timezone,
20 date_fmt='%Y-%m-%d',
21 show_offset=False)
22- committer_str = revision.rev.committer.replace (' <', ' <')
23+ committer_str = revision.rev.get_apparent_authors()[0].replace (' <', ' <')
24 to_file.write('%s %s\n\n' % (date_str,committer_str))
25
26 if revision.delta is not None and revision.delta.has_changed():
27
28=== modified file 'bzrlib/tests/test_log.py'
29--- bzrlib/tests/test_log.py 2010-02-23 07:43:11 +0000
30+++ bzrlib/tests/test_log.py 2010-03-25 08:30:53 +0000
31@@ -877,6 +877,43 @@
32 formatter_kwargs=dict(levels=0))
33
34
35+class TestGnuChangelogFormatter(TestCaseForLogFormatter):
36+
37+ def test_gnu_changelog(self):
38+ wt = self.make_standard_commit('nicky', authors=[])
39+ self.assertFormatterResult('''\
40+2005-11-22 Lorem Ipsum <test@example.com>
41+
42+\tadd a
43+
44+''',
45+ wt.branch, log.GnuChangelogLogFormatter)
46+
47+ def test_with_authors(self):
48+ wt = self.make_standard_commit('nicky',
49+ authors=['Fooa Fooz <foo@example.com>',
50+ 'Bari Baro <bar@example.com>'])
51+ self.assertFormatterResult('''\
52+2005-11-22 Fooa Fooz <foo@example.com>
53+
54+\tadd a
55+
56+''',
57+ wt.branch, log.GnuChangelogLogFormatter)
58+
59+ def test_verbose(self):
60+ wt = self.make_standard_commit('nicky')
61+ self.assertFormatterResult('''\
62+2005-11-22 John Doe <jdoe@example.com>
63+
64+\t* a:
65+
66+\tadd a
67+
68+''',
69+ wt.branch, log.GnuChangelogLogFormatter,
70+ show_log_kwargs=dict(verbose=True))
71+
72 class TestGetViewRevisions(tests.TestCaseWithTransport, TestLogMixin):
73
74 def _get_view_revisions(self, *args, **kwargs):