[Pharo-users] favorite way to migrate from mczs to git?

Paul DeBruicker pdebruic at gmail.com
Sat Feb 2 17:12:48 EST 2019


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' '<max at bareis.name>').
	'JohanBrichau' -> #('Johan Brichau' '<johanbrichau at me.com>').
	'hkl' -> #('Holger Kleinsorgen' '<h.kleinsorgen at gmail.com>').
	'go' -> #('Gerhard Obermann' '<obi068 at gmail.com>').
	'obi' -> #('Gerhard Obermann' '<obi068 at gmail.com>').
	'ThomasCleenewerck' -> #('ThomasCleenewerck' '<thomas at inceptive.be>').
        'TC' -> #('ThomasCleenewerck' '<thomas at inceptive.be>').
	'PaulDeBruicker' -> #('Paul DeBruicker' '<pdebruic at gmail.com>')
}.




"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



More information about the Pharo-users mailing list