thierrygoubier / gitfiletree-mergedriver Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I was working on some merge tools in tODE this morning and I discovered the mcProperties
automatic merge masked a conflict that I expected to get. These are the contents of .gitattributes
file:
*.package/monticello.meta/version merge=mcVersion
*.package/*.class/methodProperties.json merge=mcMethodProperties
*.package/*.class/properties.json merge=mcProperties
I had two commits where I had added different instance variables to the same class and the mcProperted rule nicely merged the two without showing a conflict, but I think that I would want to see the conflict ... both branches had made changes to the class definition, so I'm inclined to want to see that as a conflict ...
I don't think this is a bug, but I have decided that I would rather deal with the conflicts for class properties myself and submitted this bug, to give others a chance to possibly reconsider using mcProperties
.
On OS X, I got a problem with the first merge becasue the path to the Pharo command was wrong:
.../GitFileTree-MergeDriver/pharo/pharo-vm/pharo: No such file or directory fatal: Failed to execute internal merge
I had to edit the merge script and to replace the pharo command with "$DIR"/"pharo/pharo" "$DIR"/pharo/Pharo.image --no-default-preferences mergeDriver "$@"
I think it is better to use the zeroconf pharo script because it is the same on all platforms.
The included Makefile seems to miss the methodProperties.json files in extensions
A package that gets merged by the driver is given the version number 1.
When I do a subsequent load with Metacello to get the updated packages in my image, Metacello does not load the package automatically. I assume it does so because the version number is earlier.
I load using
Metacello image baseline: 'MyProject'; load
When I run make
on macOS Sierra I get an error (see output of the command below). This is probably because the version of the VM that is being used is too old. See also the following mailing list posts about the [NSPathStore2 stringByAppendingPathExtension:]
messages: http://forum.world.st/Pharo-not-running-with-macOS-Sierra-td4916468.html
$ git rev-parse HEAD; git status; make clean; make
311161d2394b06cc2bf708503e5ef3da6b9fd393
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
rm -rf pharo
mkdir pharo
cd pharo; wget -O- get.pharo.org/30+vm | bash
--2017-01-06 09:22:04-- http://get.pharo.org/30+vm
Resolving get.pharo.org... 128.93.162.72
Connecting to get.pharo.org|128.93.162.72|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2901 (2.8K) [text/html]
Saving to: 'STDOUT'
100%[===========================================================================================================================>] 2,901 --.-K/s in 0.001s
2017-01-06 09:22:04 (3.12 MB/s) - written to stdout [2901/2901]
Downloading the latest 30 Image:
http://files.pharo.org/get-files/30/pharo.zip
Pharo.image
Downloading the latest pharoVM:
http://files.pharo.org/get-files/30/pharo-mac-stable.zip
pharo-vm/Pharo.app/Contents/MacOS/Pharo
Downloading PharoV30.sources:
http://files.pharo.org/get-files/30/sources.zip
Creating starter scripts pharo and pharo-ui
'pharo/pharo' pharo/Pharo.image --no-default-preferences eval --save Gofer new url: \'http://smalltalkhub.com/mc/ThierryGoubier/Alt30/main/\'\; package: \'GitFileTree-MergeDriver\'\; load
2017-01-06 09:22:16.250 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LocalePlugin'
2017-01-06 09:22:16.251 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.251 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.251 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.257 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.271 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.271 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.272 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.277 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.286 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.286 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.289 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.291 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
2017-01-06 09:22:16.294 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/FilePlugin'
2017-01-06 09:22:16.308 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/FilePlugin'
2017-01-06 09:22:16.310 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/InternetConfigPlugin'
2017-01-06 09:22:16.310 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/FilePlugin'
2017-01-06 09:22:16.316 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.321 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/FilePlugin'
2017-01-06 09:22:16.322 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/FilePlugin'
2017-01-06 09:22:16.372 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/ZipPlugin'
2017-01-06 09:22:16.373 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/ZipPlugin'
2017-01-06 09:22:16.374 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/LargeIntegers'
2017-01-06 09:22:16.376 Pharo[46783:5330285] *** -[NSPathStore2 stringByAppendingPathExtension:]: cannot append extension 'bundle/Contents/MacOS/' to path '/Users/rinzwind/2Rivers/GitFileTree-MergeDriver/pharo/pharo-vm/Pharo.app/Contents/MacOS/Plugins/MiscPrimitivePlugin'
make: *** [pharo/Pharo.image] Error 1
Merging large packages is slow. Is the fact the merge driver is starting a Pharo instance for every file the cause ?
In the readme, I can see:
Note that the merge driver will, under some cases, hide conflicts (or resolve them automatically) when a class definition was changed between branches (addition or removal of an instance variable)
This is frightening. Could you please explain a bit more what happens in which case? Can I trust the tool? For example, does the tool search for instance variable usage to decide how to merge addition/removal of instance variables?
I had a symlink to the merge
script installed in my path (~/bin/git-filetree-mergedriver
).
Git config using this name without an explicit path.
Symlink resolution fails at locating the command, so it looks for the MergeDriver VM and image in my project directory:
/Users/damien/bin/git-filetree-mergedriver: line 5: cd: ../.pharo/GitFileTree-MergeDriver: No such file or directory
/Users/damien/bin/git-filetree-mergedriver: line 7: cd: OLDPWD not set
/Users/damien/bin/git-filetree-mergedriver: line 11: /Users/damien/Documents/Pharo/filetree/filetree/pharo/pharo: No such file or directory
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.