Hello. I recently converted all my old version control repositories (cvs, svn, arch) into darcs repositories. I had played with darcs earlier, but only now that I use it to real work, problems seem to come up...
I notice the support for add conflicts is not so great. I'd like it more if 'darcs resolve' dropped e.g. the contents of both files, with conflict markers all around, into the file. That way, I wouldn't need to dig the contents of the file from somewhere else. (Is there some easy way to extract a former version of a file in darcs, by the way?) But there are some more theoretical implications I don't understand. First of all, I cannot seem to come up with a way to resolve the conflict by renaming. The history of one or the other must be broken. Why is this so? One would think that the neatest way of resolving an add conflict would be to rename one of the files. While this is probably a user interface issue (difficulties to come up with a neat and intuitive way to specify just which of the conflicting files should be renamed into whatever), what I find totally incomprehensible is why an addfile conflicts with an addfile of the same name _if the previous addfile has already been moved out of the way_. Because these patches can be seen to talk about different files (the move has one of the adds in its context and hence necessarily talks about the file added by _that_ patch) and there is no practical problem of what to put in working, why does this produce a conflict? Is it really so that I can't have two independent files in the same repo without breaking the history of one or the other if they ever had the same name before merging? By the way, trying to find out what darcs is doing, I did an experiment that caused a bug: - repository foo is empty. - foo is forked into bar. - a file named "test" is created in foo, moved under the name "best", and back into "test". (Why, by the way, does darcs collapse pending moves but not addfiles and moves of the same file?) - a file named "test2" is created in bar, moved under the name "best", and back into "test2". - we do a pull from foo into bar: --- clip --- [EMAIL PROTECTED] ~/tmp/try/bar]$ darcs pull Pulling from "/home/atehwa/tmp/try/foo"... Thu Jun 30 00:58:58 EEST 2005 [EMAIL PROTECTED] * test Shall I pull this patch? (1/2) [ynWvpxqadjk], or ? for help: y Thu Jun 30 00:59:20 EEST 2005 [EMAIL PROTECTED] * test Shall I pull this patch? (2/2) [ynWvpxqadjk], or ? for help: y Fail: bug in darcs! in function reconcile_unwindings Original patch: merger 0.9 ( merger 0.0 ( ( move ./best ./best-conflict move ./test ./best ) move ./best ./test2 ) merger 0.0 ( move ./test2 ./best-conflict move ./best ./test ) ) Please report this to [EMAIL PROTECTED] If possible include the output of 'darcs --exact-version'. [EMAIL PROTECTED] ~/tmp/try/bar]$ darcs --exact-version darcs compiled on Jun 5 2005, at 16:16:25 # configured Tue May 24 18:34:35 EDT 2005 sh ./configure Context: [TAG 1.0.3 Tomasz Zielonka <[EMAIL PROTECTED]>**20050524215127] --- clip --- Because of problems like this and for neat ways of resolving conflicts, I would really really like to have a "content move" patch type. I saw it as a wishlist bug item half a year ago, but apparently its priority is not very high...? Then some newbie questions. - Often I'm denied unrecording because the patch is depended upon. But how do I find out which patch depends on it? (darcs obviously knows, but I can't find this information anywhere.) - If something (unpull, unrecord, rollback, amend-record) can't be done because a patch is depended upon, could darcs, instead of skipping that patch, add its dependents into the list of patches it asks about? - Is there a way to version mode bits of files (executability)? - How do I find out which patches I'm missing from another repo (the counterpart of tla missing -s)? (darcs obviously knows, but I can't find this information anywhere). - Is there any way to get tla to print only some specific information about (a) patch(es), like the hash? The best I've been able to come up with is: $ darcs changes --xml-output --from-patch '...' --to-patch '...' | grep -o 'hash=.*gz' | cut -d"'" -f2 In general, I think the query language should be given some serious thought. Essentially, the patches form a relation (in the sense of relation algebra), with the added complication that they have mutual relationships like dependencies. Very likely many combinations make sense, such as selecting the names and authors (but nothing else) of all patches that touched both "README" and "LICENSE" before the year 2005. - Are there any prospects of heuristic file rename / identifier change recognition? Hunks are, in a way, heuristic already, their extent being determined by the shortest editing sequence or something similar. Why not automatically detect identifier renames and moved files? (And moved blocks of content, if we had such a patch type?) If you wonder what I'm talking about when I talk about hunk heuristics, consider these: pristine a.txt working a.txt a d b e c a d b e c when I commit / do a diff, the change is reported as deleting of "d e", and adding it at another place. Why so? Why not the other way round? If I move a big function definition over some small ones, why were those small ones the "change" and not the big one? I'm not advocating content-aware diffing or anything, I'd just like to point out that doing moves and identifier changes with explicit "darcs replace" and "darcs mv" is useless perfectionism (or laziness) from the program when hunks already are imperfect in many ways (and you can't set them right by hand). Panu Kalliokoski -- personal contact: [EMAIL PROTECTED], +35841 5323835, +3589 85619369 work contact: [EMAIL PROTECTED], +35850 3678003 kotisivu (henkkoht): http://www.iki.fi/atehwa/ homepage (technical): http://sange.fi/~atehwa/ _______________________________________________ darcs-users mailing list [email protected] http://www.abridgegame.org/mailman/listinfo/darcs-users
