tests/test-convert-git.t
changeset 30813 2cbbd4622ab0
parent 30732 d4ec69ff652a
child 30815 c5bf2e8ec18c
equal deleted inserted replaced
30812:98bfce9bd5e5 30813:2cbbd4622ab0
   480   description:
   480   description:
   481   addfoo
   481   addfoo
   482   
   482   
   483   
   483   
   484 
   484 
       
   485 Various combinations of committeractions fail
       
   486 
       
   487   $ hg --config convert.git.committeractions=messagedifferent,messagealways convert git-repo4 bad-committer
       
   488   initializing destination bad-committer repository
       
   489   abort: committeractions cannot define both messagedifferent and messagealways
       
   490   [255]
       
   491 
       
   492   $ hg --config convert.git.committeractions=dropcommitter,replaceauthor convert git-repo4 bad-committer
       
   493   initializing destination bad-committer repository
       
   494   abort: committeractions cannot define both dropcommitter and replaceauthor/replacecommitter
       
   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
       
   500   [255]
       
   501 
       
   502   $ hg --config convert.git.committeractions=dropcommitter,messagealways convert git-repo4 bad-committer
       
   503   initializing destination bad-committer repository
       
   504   abort: committeractions cannot define both dropcommitter and messagealways
       
   505   [255]
       
   506 
       
   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 custom prefix on messagedifferent works
       
   513 
       
   514   $ hg --config convert.git.committeractions=messagedifferent=different: convert git-repo4 git-repo4-hg-messagedifferentprefix
       
   515   initializing destination git-repo4-hg-messagedifferentprefix repository
       
   516   scanning source...
       
   517   sorting...
       
   518   converting...
       
   519   1 addfoo
       
   520   0 addfoo2
       
   521   updating bookmarks
       
   522 
       
   523   $ hg -R git-repo4-hg-messagedifferentprefix log -v
       
   524   changeset:   1:2fe0c98a109d
       
   525   bookmark:    master
       
   526   tag:         tip
       
   527   user:        nottest <test@example.org>
       
   528   date:        Mon Jan 01 00:00:21 2007 +0000
       
   529   files:       foo
       
   530   description:
       
   531   addfoo2
       
   532   
       
   533   different: test <test@example.org>
       
   534   
       
   535   
       
   536   changeset:   0:0735477b0224
       
   537   user:        test <test@example.org>
       
   538   date:        Mon Jan 01 00:00:20 2007 +0000
       
   539   files:       foo
       
   540   description:
       
   541   addfoo
       
   542   
       
   543   
       
   544 
       
   545 messagealways will always add the "committer: " line even if committer identical
       
   546 
       
   547   $ hg --config convert.git.committeractions=messagealways convert git-repo4 git-repo4-hg-messagealways
       
   548   initializing destination git-repo4-hg-messagealways repository
       
   549   scanning source...
       
   550   sorting...
       
   551   converting...
       
   552   1 addfoo
       
   553   0 addfoo2
       
   554   updating bookmarks
       
   555 
       
   556   $ hg -R git-repo4-hg-messagealways log -v
       
   557   changeset:   1:8db057d8cd37
       
   558   bookmark:    master
       
   559   tag:         tip
       
   560   user:        nottest <test@example.org>
       
   561   date:        Mon Jan 01 00:00:21 2007 +0000
       
   562   files:       foo
       
   563   description:
       
   564   addfoo2
       
   565   
       
   566   committer: test <test@example.org>
       
   567   
       
   568   
       
   569   changeset:   0:8f71fe9c98be
       
   570   user:        test <test@example.org>
       
   571   date:        Mon Jan 01 00:00:20 2007 +0000
       
   572   files:       foo
       
   573   description:
       
   574   addfoo
       
   575   
       
   576   committer: test <test@example.org>
       
   577   
       
   578   
       
   579 
       
   580 custom prefix on messagealways works
       
   581 
       
   582   $ hg --config convert.git.committeractions=messagealways=always: convert git-repo4 git-repo4-hg-messagealwaysprefix
       
   583   initializing destination git-repo4-hg-messagealwaysprefix repository
       
   584   scanning source...
       
   585   sorting...
       
   586   converting...
       
   587   1 addfoo
       
   588   0 addfoo2
       
   589   updating bookmarks
       
   590 
       
   591   $ hg -R git-repo4-hg-messagealwaysprefix log -v
       
   592   changeset:   1:83c17174de79
       
   593   bookmark:    master
       
   594   tag:         tip
       
   595   user:        nottest <test@example.org>
       
   596   date:        Mon Jan 01 00:00:21 2007 +0000
       
   597   files:       foo
       
   598   description:
       
   599   addfoo2
       
   600   
       
   601   always: test <test@example.org>
       
   602   
       
   603   
       
   604   changeset:   0:2ac9bcb3534a
       
   605   user:        test <test@example.org>
       
   606   date:        Mon Jan 01 00:00:20 2007 +0000
       
   607   files:       foo
       
   608   description:
       
   609   addfoo
       
   610   
       
   611   always: test <test@example.org>
       
   612   
       
   613   
       
   614 
       
   615 replaceauthor replaces author with committer
       
   616 
       
   617   $ hg --config convert.git.committeractions=replaceauthor convert git-repo4 git-repo4-hg-replaceauthor
       
   618   initializing destination git-repo4-hg-replaceauthor repository
       
   619   scanning source...
       
   620   sorting...
       
   621   converting...
       
   622   1 addfoo
       
   623   0 addfoo2
       
   624   updating bookmarks
       
   625 
       
   626   $ hg -R git-repo4-hg-replaceauthor log -v
       
   627   changeset:   1:122c1d8999ea
       
   628   bookmark:    master
       
   629   tag:         tip
       
   630   user:        test <test@example.org>
       
   631   date:        Mon Jan 01 00:00:21 2007 +0000
       
   632   files:       foo
       
   633   description:
       
   634   addfoo2
       
   635   
       
   636   
       
   637   changeset:   0:0735477b0224
       
   638   user:        test <test@example.org>
       
   639   date:        Mon Jan 01 00:00:20 2007 +0000
       
   640   files:       foo
       
   641   description:
       
   642   addfoo
       
   643   
       
   644   
       
   645 
       
   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 dropcommitter removes the committer
       
   678 
       
   679   $ hg --config convert.git.committeractions=dropcommitter convert git-repo4 git-repo4-hg-dropcommitter
       
   680   initializing destination git-repo4-hg-dropcommitter repository
       
   681   scanning source...
       
   682   sorting...
       
   683   converting...
       
   684   1 addfoo
       
   685   0 addfoo2
       
   686   updating bookmarks
       
   687 
       
   688   $ hg -R git-repo4-hg-dropcommitter log -v
       
   689   changeset:   1:190b2da396cc
       
   690   bookmark:    master
       
   691   tag:         tip
       
   692   user:        nottest <test@example.org>
       
   693   date:        Mon Jan 01 00:00:21 2007 +0000
       
   694   files:       foo
       
   695   description:
       
   696   addfoo2
       
   697   
       
   698   
       
   699   changeset:   0:0735477b0224
       
   700   user:        test <test@example.org>
       
   701   date:        Mon Jan 01 00:00:20 2007 +0000
       
   702   files:       foo
       
   703   description:
       
   704   addfoo
       
   705   
       
   706   
       
   707 
   485 --sourceorder should fail
   708 --sourceorder should fail
   486 
   709 
   487   $ hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg
   710   $ hg convert --sourcesort git-repo4 git-repo4-sourcesort-hg
   488   initializing destination git-repo4-sourcesort-hg repository
   711   initializing destination git-repo4-sourcesort-hg repository
   489   abort: --sourcesort is not supported by this data source
   712   abort: --sourcesort is not supported by this data source