/srv/irclogs.ubuntu.com/2015/04/23/#launchpad-dev.txt

cjwatsonwgrant,blr: we're definitely going to need some pygit2 backports sooner rather than later - even disregarding merge_trees, conflicts handling in 0.22.0 is unusably bad for our purposes (you can find out that there was a conflict in a merge and which files it touched, but you can't get a merged version with conflict markers).  I'm going to sort out some backports, as the patches we need look fairly self-contained00:46
cjwatson(why yes, I'm trying to put together the LP side of preview diffs because I can't sleep, why do you ask)00:47
blrcjwatson: oh dear, hope you're not up all night!02:09
cjwatsonmeh ...02:11
* cjwatson blinks at https://launchpad.net/~cjwatson/+archive/ubuntu/launchpad/+build/7350071. How is that architecture-specific in scalingstack?02:16
cjwatsonhttps://github.com/libgit2/pygit2/pull/520 should fix the above, cherry-picking that03:30
blrcjwatson: huh, in what instances were you seeing garbage in the diff?04:21
=== mgz is now known as mgz_
wgrantcjwatson: Hum, I guess I was looking at master rather than 0.22.0 when I thought the conflict handling looked OK.08:48
cjwatsonblr: nothing we were using yet, but when trying to improve the conflict handling using merge_file_from_index, we ended up with garbage in place of the path in the conflict marker sometimes, because it wasn't holding onto a reference to that memory09:42
cjwatsonwgrant: right, it's fiddly but I do now have a workable algorithm which I'll implement on Friday when actually working09:43
cjwatsonbasically walk over index.conflicts and do blob_oid = repo.create_blob(repo.merge_file_from_index(*conflict)); index.add(IndexEntry(path, blob_oid, GIT_FILEMODE_BLOB)); conflicts.remove(path)09:45
cjwatsonand keep a note of the conflicted paths and return them separately09:45
wgrantcjwatson: What was in the merged tree in case of conflicts?09:46
cjwatsonwgrant: do you mean in diff_from_tree().patch?09:47
wgrantcjwatson: yeah09:48
cjwatsonwgrant: a patch removing the conflicted file09:48
cjwatsonsuper-useful09:48
wgrant... oh09:48
wgrantThat's totally not what favor says it does.09:49
cjwatsonit soooooooort of makes sense internally09:49
cjwatsonin a very skewed way09:49
cjwatsonbut yeah, I noticed when I tried to write a test and observed that it made NO SENSE09:52
cjwatson(when adding info about conflicts to the compare-merge return value so that previewdiff can use them)09:52
cjwatsonwgrant: the cherry-picks for this plus merge_tree are in the LP PPA now, anyway.09:53
wgrantLovely, thanks.09:55
=== mgz_ is now known as mgz

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!