131 raise error.Abort(_('committeractions cannot define both ' |
131 raise error.Abort(_('committeractions cannot define both ' |
132 'messagedifferent and messagealways')) |
132 'messagedifferent and messagealways')) |
133 |
133 |
134 dropcommitter = 'dropcommitter' in committeractions |
134 dropcommitter = 'dropcommitter' in committeractions |
135 replaceauthor = 'replaceauthor' in committeractions |
135 replaceauthor = 'replaceauthor' in committeractions |
136 replacecommitter = 'replacecommitter' in committeractions |
136 |
137 |
137 if dropcommitter and replaceauthor: |
138 if dropcommitter and (replaceauthor or replacecommitter): |
|
139 raise error.Abort(_('committeractions cannot define both ' |
138 raise error.Abort(_('committeractions cannot define both ' |
140 'dropcommitter and ' |
139 'dropcommitter and replaceauthor')) |
141 'replaceauthor/replacecommitter')) |
|
142 |
140 |
143 if dropcommitter and messagealways: |
141 if dropcommitter and messagealways: |
144 raise error.Abort(_('committeractions cannot define both ' |
142 raise error.Abort(_('committeractions cannot define both ' |
145 'dropcommitter and messagealways')) |
143 'dropcommitter and messagealways')) |
146 |
144 |
147 if replaceauthor and replacecommitter: |
|
148 raise error.Abort(_('committeractions cannot define both ' |
|
149 'replaceauthor and replacecommitter')) |
|
150 |
|
151 if not messagedifferent and not messagealways: |
145 if not messagedifferent and not messagealways: |
152 messagedifferent = 'committer:' |
146 messagedifferent = 'committer:' |
153 |
147 |
154 self.committeractions = { |
148 self.committeractions = { |
155 'dropcommitter': dropcommitter, |
149 'dropcommitter': dropcommitter, |
156 'replaceauthor': replaceauthor, |
150 'replaceauthor': replaceauthor, |
157 'replacecommitter': replacecommitter, |
|
158 'messagedifferent': messagedifferent, |
151 'messagedifferent': messagedifferent, |
159 'messagealways': messagealways, |
152 'messagealways': messagealways, |
160 } |
153 } |
161 |
154 |
162 def after(self): |
155 def after(self): |