favorite way to migrate from mczs to git?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

favorite way to migrate from mczs to git?

Paul DeBruicker
Hi -

Whats the best way to migrate a few dozen projects to git, some with ConfigurationOfXXX and some without?

https://github.com/peteruhnak/git-migration seems to be broken on Pharo 6 & 7.


Thanks

Paul
Reply | Threaded
Open this post in threaded view
|

Re: favorite way to migrate from mczs to git?

Sean P. DeNigris
Administrator
Paul DeBruicker wrote
> https://github.com/peteruhnak/git-migration seems to be broken on Pharo 6

Could you say more about your error(s)? I migrated many projects in Pharo
6.1 with this tool



-----
Cheers,
Sean
--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html

Cheers,
Sean
Reply | Threaded
Open this post in threaded view
|

Re: favorite way to migrate from mczs to git?

Paul DeBruicker
Thanks Sean.  I get a couple different errors, depending on which Pharo I'm
using.  


 I had more time today and for 7.0, I think I fixed it.   I don't think the
#ignoredFileNames: method was working because when I added corrupted MCZs as
in the example pasted below, it seems to continue to try to analyze those
files when running #allAuthors and hit encoding errors.  Skipping the
#allAuthors send and just running the
#fastImportCodeToDirectory:initialCommit:to: code gives the same encoding
errors.  Changing

GitMigration>>#versions to
versions
        versionsCache
                ifNil: [ | versions |
                        versions := OrderedCollection new.
                        self versionsWithPackageNames
                                do: [ :quad |
                                        | fileName |
                                        fileName := quad last.
                                        (ignoredFileNames includes: (fileName allButLast: 4))
                                                ifFalse: [ versions add: (self versionFromFileNamed: quad last) ] ]
                                displayingProgress: [ :quad | 'Loading versions metadata... ' , quad
last ].
                        versionsCache := versions ].
        ^ versionsCache

fixes my problem, but I can't seem to create a PR that doesn't include every
line of every file as having changed.  



In 6.1 git-migration doesn't have a problem with the bad MCZs but instead
gives an "Empty message requested" error when doing the
#fastImportCodeToDirectory:initialCommit:to:


In 6.0 it gives a DNU for
GitMigrationMemoryTreeGitRepository>>#writeGitFileTreeProperties: (I made an
issue for that one here:
https://github.com/peteruhnak/git-migration/issues/19


The script I'm using is:


migration:=GitMigration on:'Seaside/SeasideDynamicSVG'.
migration ignoredFileNames: #('SeasideDynamicSVG-Core-hkl.86'
'SeasideDynamicSVG-Core-hkl.3' 'SeasideDynamicSVG-Tests-obi.7').
migration cacheAllVersions.
migration populateCaches.
migration allAuthors.

migration authors:{
        'MaxBareis'-> #('Max Bareis' '<[hidden email]>').
        'JohanBrichau' -> #('Johan Brichau' '<[hidden email]>').
        'hkl' -> #('Holger Kleinsorgen' '<[hidden email]>').
        'go' -> #('Gerhard Obermann' '<[hidden email]>').
        'obi' -> #('Gerhard Obermann' '<[hidden email]>').
        'ThomasCleenewerck' -> #('ThomasCleenewerck' '<[hidden email]>').
        'TC' -> #('ThomasCleenewerck' '<[hidden email]>').
        'PaulDeBruicker' -> #('Paul DeBruicker' '<[hidden email]>')
}.




"I change the SHA and the target file for each Pharo version"

migration fastImportCodeToDirectory: 'gitmigration-repo'
initialCommit:'a8d9d4c981f4e8aff4728b3ab84d296ebe77b4d5'  to:
'/Users/paul/Downloads/seaside-svg-pharo-7.txt'  


In pharo 7 to load git-migration I'm using

Metacello new
        baseline: 'GitMigration';
        repository: 'github://peteruhnak/git-migration/repository';
        load.


and in 6.1 & 6 I'm using

Metacello new
        baseline: 'GitMigration';
        repository: 'github://peteruhnak/git-migration:pharo6/repository';
        load.




Let me know if you have any ideas on what I should do to fix those errors in
Pharo 6 & 6.1. If you have a copy of  
GitMigrationMemoryTreeGitRepository>>#writeGitFileTreeProperties: in one of
your images I'd be happy to get a version of it and keep trying.



 It seems to me that I'll be better off porting everything to Pharo 7 then
doing the migration to git.







Sean P. DeNigris wrote

> Paul DeBruicker wrote
>> https://github.com/peteruhnak/git-migration seems to be broken on Pharo 6
>
> Could you say more about your error(s)? I migrated many projects in Pharo
> 6.1 with this tool
>
>
>
> -----
> Cheers,
> Sean
> --
> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html





--
Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html