1

I've seen old posts but I think it is too outdated to apply now. I am wondering how to keep the authors and time the same as all the git commits.

Basically what happens currently is, we commit to a branch on git. I merge that to my svn branch and then use dcommit to push all that to SVN repo. The commits are there but they are all committed by the person who did the dcommit command and all the commits are at the same time.

What I want is, doing git svn dcommit, it should use the time from the git commit and also use the author from git commit as well.

Is there anyway to do this? Hope someone can help, thanks!

startingUp
  • 11
  • 1
  • No, SVN does not support this. – 1615903 Jul 13 '17 at 07:05
  • @1615903 you are wrong about this. – bahrep Jul 13 '17 at 10:21
  • @bahrep how about elaborating a bit more? How is it possible? Especially with `git-svn`. I also think it is not possible. By default editing revprops is disabled for a SVN repository and needs to be enabled explicitly with a hook. And afaik `git-svn` does not support using those. – Vampire Jul 17 '17 at 10:12

1 Answers1

0

This is not support directly.
As commented here:

The proper committer could only be determined through an external mapping, because username conventions aren't the same (email-style for git, tied to authentication for svn).

The same thread propose some git-svn patch which might add the author:

editor_cb => sub {
    print "Committed r$_[0]\n";
    $cmt_rev = $_[0];
+   if (defined($_commit_author)) {
+       print "Changed author to $_commit_author\n";
+       $ra->change_rev_prop($cmt_rev, 'svn:author', $_commit_author);
+   }
},
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250