-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Monticello metadata solved? #177
Comments
We currently .gitignore the version files and generate them just
This feature is a surprise! I did not know that a lesser version What would be nice is that if I give Gofer a list of packages to load,
I agree, this is a basic problem to resolve. We use the git command We had a better solution for generating the version files. We counted |
Hi @ottobehrens , @dalehenrich
I'd say it is doable to, when recreating a mc version from git, to make a pre-existing version an ancestor of the git-recreated mc version history. The current GitFileTree code would need very little to do that, since it recreates a true, perfect MC version history from the git data. What is a bit harder is to make the difference between a newly mc-imported package (one which will erase the current git history record) for which one need to update the metadata version file, and a normal package save for which we should keep intact the version record. And I wonder how many times guys doing this will later say their action was a mistake...
This is the case in GitFileTree already (no use and no need of those files... need to check if I did it right, still). Again, I think it can be kept as a static record (import of a mc package with pre-existing history) and never overwritten by normal package saves on the git repo. An analogy would be to save a first time with filetree, write the properties and version metadata, commit that, and never touch or overwrite that again.
Then GitFileTree has the code you need. GitFileTree recreates the complete history of the package out of the git log in a reasonable timeframe (two git queries), generates UUIDs from the SHA of each commit, trace properly all ancestors, renumber and name all versions present in the git based on the git ordering and author. Metadata-less GitFileTree just never writes the metadata at all (no need for .gitignore), and for metadata mode, the GitFileTree merge driver takes care of git command line merging.
Not yet, but David Allouche on the pharo mailing list pointed out a solution: resolving "newer than" by a partial ordering on the "is an ancestor of" property.
Yes.
Ok, then you want to have a look at GitFileTree, which does that (also writes properly a complete ancestry chain in MC). Thierry |
Thanks Thierry,
We're running Pharo 3.0. Will GitFileTree work properly on Pharo 3.0 |
You'll have a working version of GitFileTree (I've used it for internal development). I may have not backported some of the most recent changes (the metadata-less mode) which is still being a bit a work in progress (just to see if others would see strange things happening to it). What is missing from the Pharo 3 version is:
It is available in the configuration browser of Pharo 3. At the moment, development happens on the pharo4.0_dev and pharo5.0_dev branches of filetree; I use in production the pharo4.0_dev version. I can backport things to the pharo3.0_dev branch if you need the new features, but I think testing those in a newer version of Pharo (4 or 5; beware, 5 can be almost unusable at times) is a good way to go. Thierry |
Hi Thierry, I installed Pharo 4 today and got our code loaded. Still some pain to get I tried to open our repository with a monticello browser. It would not So I optimised MCFileTreeGitRepository and GitFileTreePackageEntry quite a I would like you to have a look at the changes. I attach the package. Cheers On Wed, Feb 3, 2016 at 12:34 PM, Thierry Goubier [email protected]
|
Oops, I created way too much ancestry; simplified a bit. On Fri, Feb 19, 2016 at 10:47 PM, Otto Behrens [email protected] wrote:
|
Hi @ottobehrens , this sounds really great! I'm really interested by what you've done; but I think your attachment was eaten by github on the reply. I can give you access to whatever GitFileTree smalltalkhub repository you'll like (the Pharo4Dev one?) or, if you prefer, as a pull request here. Thierry |
Yes, the Pharo4Dev one is fine. On Fri, Feb 19, 2016 at 11:26 PM, Thierry Goubier [email protected]
|
I just registered. OttoBehrens On Fri, Feb 19, 2016 at 11:35 PM, Otto Behrens [email protected] wrote:
|
I worked from stable. So I see lots have changed in the development branch. On Fri, Feb 19, 2016 at 11:39 PM, Otto Behrens [email protected] wrote:
|
Done! You are a contributor on Pharo4Dev now. I'll be away with limited access for around a week, so it will take a little while to answer. |
As described in this post, it seems that a reasonable compromise for dealing with Monticello metadata, is that the
*.package/monticello.meta/version
file be a copy of the Monticello version history when a package is copied into a FileTree repo. Newly created packages (not via copy) would contain an emptyversion
file. The Monticello metadata would not be updated on every commit .... When a package is copied then it becomes necessary to fabricate a revision history to bridge the gap between the original Monticello version history and the present commit - this fabricated version history may account for every git commit since theversion
file was last changed, or simply a new commit referencing the current SHA ...this solution could involve adding some new MCAncestry classes that would record the
url
andSHA
of git commits ...making it possible to merge two Monticello packages with a common ancestor somewhere in the git history ... or we could treat the git world as a series of lost mcz files .... If we do support merges involving a specific SHA in github, then new MC classes and support would be required which has impacts on older versions of the images trying to do the merge or even read the packages ... adding fields in the commit comment using JSON or STON containing the fields of interest would probably solve the backward compat problem while allowing newer tools to support such a merge ...Finally we need to resolve the handling of the methodProperties files .. those files are there only for the Monticello meta data and we could drop these files altogether if we fabricated method definitions that picked this information from the latest commit that involved the file ... for performance reasons, I would be inclined to not include this information unless a package was being prepared for export via
copy to repository
...I think we should have a bit of free form discussion (i.e., what code can be leveraged from @ThierryGoubier and GitFileTree? and what does @ottobehrens do in his current FileTree implementation?)
One of the issues I'm curious about is how to get past the Monticello/gofer/Metacello? feature that skips loading a version of a Monticello package with a lesser version number ... I know that I have code that addresses this for Metacello (in a separate class for Cypress packages), but we might need to jigger the loader or whatever to make this work but I think that both of you (@ThierryGoubier and @ottobehrens) have dealt with this (and I've forgotten the details)?
I'm not in a hurry to implement this, but I think that it should bump up in priority because it will eliminate the need for the GitMergeTool and make life for the folks working purely in git much simpler, while making it possible for folks choosing not to use git to work with and contribute to projects that have been moved to git/github ...
The text was updated successfully, but these errors were encountered: