/breezy/trunk

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/trunk

« back to all changes in this revision

Viewing changes to breezy/git/tests/test_repository.py

Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
223
223
            breezy.gpg.GPGStrategy = oldstrategy
224
224
 
225
225
 
 
226
class RevpropsRepository(tests.TestCaseWithTransport):
 
227
 
 
228
    def test_author(self):
 
229
        wt = self.make_branch_and_tree('.', format='git')
 
230
        revid = wt.commit(
 
231
            "base", allow_pointless=True,
 
232
            revprops={'author': 'Joe Example <joe@example.com>'})
 
233
        rev = wt.branch.repository.get_revision(revid)
 
234
        r = dulwich.repo.Repo('.')
 
235
        self.assertEqual(b'Joe Example <joe@example.com>', r[r.head()].author)
 
236
 
 
237
    def test_authors(self):
 
238
        wt = self.make_branch_and_tree('.', format='git')
 
239
        revid = wt.commit(
 
240
            "base", allow_pointless=True,
 
241
            revprops={'authors': 'Joe Example <joe@example.com>'})
 
242
        rev = wt.branch.repository.get_revision(revid)
 
243
        r = dulwich.repo.Repo('.')
 
244
        self.assertEqual(b'Joe Example <joe@example.com>', r[r.head()].author)
 
245
 
 
246
    def test_multiple_authors(self):
 
247
        wt = self.make_branch_and_tree('.', format='git')
 
248
        self.assertRaises(Exception, wt.commit,
 
249
            "base", allow_pointless=True,
 
250
            revprops={'authors': 'Joe Example <joe@example.com>\n'
 
251
                                 'Jane Doe <jane@example.com\n>'})
 
252
 
 
253
 
226
254
class GitRepositoryFormat(tests.TestCase):
227
255
 
228
256
    def setUp(self):