# # # patch "NEWS" # from [094a1af1005a039cbbfa1035d79569ac4d710245] # to [06d8eaf434c4bcd7cf2b8b72ac137517eade6aca] # # patch "git_export.cc" # from [07d295bfe25f63a2181e146a6ec0ca282b344493] # to [4bfcc568b7c2bb455ccafc4887490dc3bcb65f19] # # patch "tests/git_export/__driver__.lua" # from [72fd4cc32028c10e452023b2747d33fd1dde992e] # to [960dc93a9e23d634388d55edcebf81227200ceee] # ============================================================ --- NEWS 094a1af1005a039cbbfa1035d79569ac4d710245 +++ NEWS 06d8eaf434c4bcd7cf2b8b72ac137517eade6aca @@ -11,6 +11,9 @@ Bugs fixed + - A regression from 0.45's key migration prevented the proper + output of the `committer` field in 'git_export'. + Internal ============================================================ --- git_export.cc 07d295bfe25f63a2181e146a6ec0ca282b344493 +++ git_export.cc 4bfcc568b7c2bb455ccafc4887490dc3bcb65f19 @@ -254,7 +254,13 @@ export_changes(database & db, if (author != authors.end()) { author_name = trim(author->value()); - author_key = trim(author->key.inner()()); + if (db.public_key_exists(author->key)) + { + rsa_pub_key pub; + key_name name; + db.get_pubkey(author->key, name, pub); + author_key = trim(name()); + } } // all monotone keys and authors that don't follow the "Name " ============================================================ --- tests/git_export/__driver__.lua 72fd4cc32028c10e452023b2747d33fd1dde992e +++ tests/git_export/__driver__.lua 960dc93a9e23d634388d55edcebf81227200ceee @@ -2,7 +2,7 @@ mtn_setup() mtn_setup() -writefile("author.map", "address@hidden = \n") +writefile("author.map", "address@hidden = \n") writefile("file1", "file1") writefile("file2", "file2") @@ -76,10 +76,13 @@ check(not exists("git.dir/file2")) check(not exists("mtn.dir/file2")) check(not exists("git.dir/file2")) --- log both repos (mainly for visual inspection) +-- log both repos and check the author mapping -check(indir("mtn.dir", mtn("log")), 0, false, false) -check(indir("git.dir", {"git", "log", "--summary", "--pretty=raw"}), 0, false, false) +check(indir("mtn.dir", mtn("log")), 0, true, false) +check(qgrep("Author: address@hidden", "stdout")) +check(indir("git.dir", {"git", "log", "--summary", "--pretty=raw"}), 0, true, false) +check(qgrep("author ", "stdout")) +check(qgrep("committer ", "stdout")) -- check branch refs @@ -96,3 +99,4 @@ check(not exists("git.dir/file2")) check(samefile("mtn.dir/file-one", "git.dir/file-one")) check(not exists("mtn.dir/file2")) check(not exists("git.dir/file2")) +