mirror of
https://github.com/git/git.git
synced 2024-11-27 20:14:30 +08:00
remote-bzr: include authors field in pushed commits
Tests-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
5ff569908d
commit
62210887f7
@ -618,10 +618,12 @@ def parse_commit(parser):
|
||||
files[path] = f
|
||||
|
||||
committer, date, tz = committer
|
||||
author, _, _ = author
|
||||
parents = [mark_to_rev(p) for p in parents]
|
||||
revid = bzrlib.generate_ids.gen_revision_id(committer, date)
|
||||
props = {}
|
||||
props['branch-nick'] = branch.nick
|
||||
props['authors'] = author
|
||||
|
||||
mtree = CustomTree(branch, revid, parents, files)
|
||||
changes = mtree.iter_changes()
|
||||
|
@ -391,4 +391,28 @@ test_expect_success 'export utf-8 authors' '
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_expect_success 'push different author' '
|
||||
test_when_finished "rm -rf bzrrepo gitrepo" &&
|
||||
|
||||
bzr init bzrrepo &&
|
||||
|
||||
(
|
||||
git init gitrepo &&
|
||||
cd gitrepo &&
|
||||
echo john >> content &&
|
||||
git add content &&
|
||||
git commit -m john --author "John Doe <jdoe@example.com>" &&
|
||||
git remote add bzr "bzr::../bzrrepo" &&
|
||||
git push bzr master
|
||||
) &&
|
||||
|
||||
(
|
||||
cd bzrrepo &&
|
||||
bzr log | grep "^author: " > ../actual
|
||||
) &&
|
||||
|
||||
echo "author: John Doe <jdoe@example.com>" > expected &&
|
||||
test_cmp expected actual
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Loading…
Reference in New Issue
Block a user