diff hgext/convert/git.py @ 30815:c5bf2e8ec18c

convert: remove "replacecommitter" action As pointed out by Yuya, this action doesn't add much (any?) value.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 14 Jan 2017 10:11:19 -0800
parents 2cbbd4622ab0
children bd872f64a8ba
line wrap: on
line diff
--- a/hgext/convert/git.py	Sat Jan 14 20:31:35 2017 +0900
+++ b/hgext/convert/git.py	Sat Jan 14 10:11:19 2017 -0800
@@ -133,28 +133,21 @@
 
         dropcommitter = 'dropcommitter' in committeractions
         replaceauthor = 'replaceauthor' in committeractions
-        replacecommitter = 'replacecommitter' in committeractions
 
-        if dropcommitter and (replaceauthor or replacecommitter):
+        if dropcommitter and replaceauthor:
             raise error.Abort(_('committeractions cannot define both '
-                                'dropcommitter and '
-                                'replaceauthor/replacecommitter'))
+                                'dropcommitter and replaceauthor'))
 
         if dropcommitter and messagealways:
             raise error.Abort(_('committeractions cannot define both '
                                 'dropcommitter and messagealways'))
 
-        if replaceauthor and replacecommitter:
-            raise error.Abort(_('committeractions cannot define both '
-                                'replaceauthor and replacecommitter'))
-
         if not messagedifferent and not messagealways:
             messagedifferent = 'committer:'
 
         self.committeractions = {
             'dropcommitter': dropcommitter,
             'replaceauthor': replaceauthor,
-            'replacecommitter': replacecommitter,
             'messagedifferent': messagedifferent,
             'messagealways': messagealways,
         }
@@ -368,9 +361,6 @@
 
         if self.committeractions['dropcommitter']:
             committer = None
-
-        if self.committeractions['replacecommitter']:
-            committer = author
         elif self.committeractions['replaceauthor']:
             author = committer