Show More
@@ -355,9 +355,6 b' def convert(ui, src, dest=None, revmapfi' | |||
|
355 | 355 | the committer. Other actions that add references to the committer |
|
356 | 356 | will still take effect when this is set. |
|
357 | 357 | |
|
358 | ``replacecommitter`` will replace the value of the committer field | |
|
359 | with the author. | |
|
360 | ||
|
361 | 358 | The default is ``messagedifferent``. |
|
362 | 359 | |
|
363 | 360 | :convert.git.extrakeys: list of extra keys from commit metadata to copy to |
@@ -133,28 +133,21 b' class convert_git(common.converter_sourc' | |||
|
133 | 133 | |
|
134 | 134 | dropcommitter = 'dropcommitter' in committeractions |
|
135 | 135 | replaceauthor = 'replaceauthor' in committeractions |
|
136 | replacecommitter = 'replacecommitter' in committeractions | |
|
137 | 136 | |
|
138 |
if dropcommitter and |
|
|
137 | if dropcommitter and replaceauthor: | |
|
139 | 138 | raise error.Abort(_('committeractions cannot define both ' |
|
140 | 'dropcommitter and ' | |
|
141 | 'replaceauthor/replacecommitter')) | |
|
139 | 'dropcommitter and replaceauthor')) | |
|
142 | 140 | |
|
143 | 141 | if dropcommitter and messagealways: |
|
144 | 142 | raise error.Abort(_('committeractions cannot define both ' |
|
145 | 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 | 145 | if not messagedifferent and not messagealways: |
|
152 | 146 | messagedifferent = 'committer:' |
|
153 | 147 | |
|
154 | 148 | self.committeractions = { |
|
155 | 149 | 'dropcommitter': dropcommitter, |
|
156 | 150 | 'replaceauthor': replaceauthor, |
|
157 | 'replacecommitter': replacecommitter, | |
|
158 | 151 | 'messagedifferent': messagedifferent, |
|
159 | 152 | 'messagealways': messagealways, |
|
160 | 153 | } |
@@ -368,9 +361,6 b' class convert_git(common.converter_sourc' | |||
|
368 | 361 | |
|
369 | 362 | if self.committeractions['dropcommitter']: |
|
370 | 363 | committer = None |
|
371 | ||
|
372 | if self.committeractions['replacecommitter']: | |
|
373 | committer = author | |
|
374 | 364 | elif self.committeractions['replaceauthor']: |
|
375 | 365 | author = committer |
|
376 | 366 |
@@ -491,12 +491,7 b' Various combinations of committeractions' | |||
|
491 | 491 | |
|
492 | 492 | $ hg --config convert.git.committeractions=dropcommitter,replaceauthor convert git-repo4 bad-committer |
|
493 | 493 | initializing destination bad-committer repository |
|
494 |
abort: committeractions cannot define both dropcommitter and replaceauthor |
|
|
495 | [255] | |
|
496 | ||
|
497 | $ hg --config convert.git.committeractions=dropcommitter,replacecommitter convert git-repo4 bad-committer | |
|
498 | initializing destination bad-committer repository | |
|
499 | abort: committeractions cannot define both dropcommitter and replaceauthor/replacecommitter | |
|
494 | abort: committeractions cannot define both dropcommitter and replaceauthor | |
|
500 | 495 | [255] |
|
501 | 496 | |
|
502 | 497 | $ hg --config convert.git.committeractions=dropcommitter,messagealways convert git-repo4 bad-committer |
@@ -504,11 +499,6 b' Various combinations of committeractions' | |||
|
504 | 499 | abort: committeractions cannot define both dropcommitter and messagealways |
|
505 | 500 | [255] |
|
506 | 501 | |
|
507 | $ hg --config convert.git.committeractions=replaceauthor,replacecommitter convert git-repo4 bad-committer | |
|
508 | initializing destination bad-committer repository | |
|
509 | abort: committeractions cannot define both replaceauthor and replacecommitter | |
|
510 | [255] | |
|
511 | ||
|
512 | 502 | custom prefix on messagedifferent works |
|
513 | 503 | |
|
514 | 504 | $ hg --config convert.git.committeractions=messagedifferent=different: convert git-repo4 git-repo4-hg-messagedifferentprefix |
@@ -643,37 +633,6 b' replaceauthor replaces author with commi' | |||
|
643 | 633 | |
|
644 | 634 | |
|
645 | 635 | |
|
646 | replacecommitter replaces committer with author | |
|
647 | ||
|
648 | $ hg --config convert.git.committeractions=replacecommitter convert git-repo4 git-repo4-hg-replacecommitter | |
|
649 | initializing destination git-repo4-hg-replacecommitter repository | |
|
650 | scanning source... | |
|
651 | sorting... | |
|
652 | converting... | |
|
653 | 1 addfoo | |
|
654 | 0 addfoo2 | |
|
655 | updating bookmarks | |
|
656 | ||
|
657 | $ hg -R git-repo4-hg-replacecommitter log -v | |
|
658 | changeset: 1:190b2da396cc | |
|
659 | bookmark: master | |
|
660 | tag: tip | |
|
661 | user: nottest <test@example.org> | |
|
662 | date: Mon Jan 01 00:00:21 2007 +0000 | |
|
663 | files: foo | |
|
664 | description: | |
|
665 | addfoo2 | |
|
666 | ||
|
667 | ||
|
668 | changeset: 0:0735477b0224 | |
|
669 | user: test <test@example.org> | |
|
670 | date: Mon Jan 01 00:00:20 2007 +0000 | |
|
671 | files: foo | |
|
672 | description: | |
|
673 | addfoo | |
|
674 | ||
|
675 | ||
|
676 | ||
|
677 | 636 | dropcommitter removes the committer |
|
678 | 637 | |
|
679 | 638 | $ hg --config convert.git.committeractions=dropcommitter convert git-repo4 git-repo4-hg-dropcommitter |
@@ -297,9 +297,6 b'' | |||
|
297 | 297 | committer. Other actions that add references to the committer will |
|
298 | 298 | still take effect when this is set. |
|
299 | 299 | |
|
300 | "replacecommitter" will replace the value of the committer field with | |
|
301 | the author. | |
|
302 | ||
|
303 | 300 | The default is "messagedifferent". |
|
304 | 301 | |
|
305 | 302 | convert.git.extrakeys |
General Comments 0
You need to be logged in to leave comments.
Login now