Merge lp:~vila/bzr/430868-sig-domain into lp:bzr

Proposed by Vincent Ladeuil on 2009-09-18
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vila/bzr/430868-sig-domain
Merge into: lp:bzr
Diff against target: None lines
To merge this branch: bzr merge lp:~vila/bzr/430868-sig-domain
Reviewer Review Type Date Requested Status
John A Meinel 2009-09-18 Approve on 2009-09-21
Review via email: mp+12079@code.launchpad.net
To post a comment you must log in.
Vincent Ladeuil (vila) wrote :

The first submission didn't include a test to reproduce the bug.
Here it is.

John A Meinel (jameinel) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/per_bzrdir/test_bzrdir.py'
2--- bzrlib/tests/per_bzrdir/test_bzrdir.py 2009-08-20 04:09:58 +0000
3+++ bzrlib/tests/per_bzrdir/test_bzrdir.py 2009-09-18 17:19:15 +0000
4@@ -28,6 +28,7 @@
5 bzrdir,
6 check,
7 errors,
8+ gpg,
9 lockdir,
10 osutils,
11 repository,
12@@ -432,6 +433,27 @@
13 target = dir.clone(self.get_url('target'), revision_id='2')
14 raise TestSkipped('revision limiting not strict yet')
15
16+ def test_clone_bzrdir_branch_and_repo_fixed_user_id(self):
17+ # Bug #430868 is about an email containing '.sig'
18+ os.environ['BZR_EMAIL'] = 'murphy@host.sighup.org'
19+ tree = self.make_branch_and_tree('commit_tree')
20+ self.build_tree(['commit_tree/foo'])
21+ tree.add('foo')
22+ rev1 = tree.commit('revision 1')
23+ tree_repo = tree.branch.repository
24+ tree_repo.lock_write()
25+ tree_repo.start_write_group()
26+ tree_repo.sign_revision(rev1, gpg.LoopbackGPGStrategy(None))
27+ tree_repo.commit_write_group()
28+ tree_repo.unlock()
29+ target = self.make_branch('target')
30+ tree.branch.repository.copy_content_into(target.repository)
31+ tree.branch.copy_content_into(target)
32+ self.assertTrue(target.repository.has_revision(rev1))
33+ self.assertEqual(
34+ tree_repo.get_signature_text(rev1),
35+ target.repository.get_signature_text(rev1))
36+
37 def test_clone_bzrdir_branch_and_repo(self):
38 tree = self.make_branch_and_tree('commit_tree')
39 self.build_tree(['commit_tree/foo'])