
Hello! I've been interested in hacking language-c library a bit for my needs. (If it turns out useful and successful, I'll tell about it.) And I've cloned the repo listed at https://hackage.haskell.org/package/language-c-0.4.7 , namely: http://code.haskell.org/language-c Apart from my special hacks, I've also fixed some typos and so on. But then I discovered that if I want to publish them on hub.darcs.net , I need a darcs-2 repo, and the initial one which I used for cloning is a darcs-1 repo. I could do the conversion to darcs-2, but I read that it is not reproducible: run several times on the same set of patches it will give different results. As I've discovered also a language-c repo at hub.darcs.net which looks like an upstream repo: http://hub.darcs.net/visq/language-c , I'm in doubt whether I should continue making my patches against the darcs-1 repo which is said to be upstream at hackage or against http://hub.darcs.net/visq/language-c whichis not officially declared as the upstream but looks more fresh. ..if I want to be able to send some of my patches upstream. Best regards, Ivan

On Sun, 20 Dec 2015, Ivan Zakharyaschev wrote:
And I've cloned the repo listed at https://hackage.haskell.org/package/language-c-0.4.7 , namely: http://code.haskell.org/language-c
But then I discovered that if I want to publish them on hub.darcs.net , I need a darcs-2 repo, and the initial one which I used for cloning is a darcs-1 repo.
I could do the conversion to darcs-2, but I read that it is not reproducible: run several times on the same set of patches it will give different results.
Ganesh Sittampalam re-assured me at http://stackoverflow.com/a/34385874/94687 that it is not always so bad, and gave advices that I still try to go through the conversion and pushing my changes to a clone of the other upstream darcs-2 repo:
As I've discovered also a language-c repo at hub.darcs.net which looks like an upstream repo: http://hub.darcs.net/visq/language-c , I'm in doubt whether
Unfortunately, it didn't go smoothly -- when pushing the converted repo, darcs "couldn't commute" some tag patches, and it seems it refused to do anything further: ~/TOOLS/prog/language-c.darcs-2 $ darcs push ../language-c_hub/ HINT: if you want to change the default remote repository to /home/imz/TOOLS/prog/language-c_hub, quit now and issue the same command with the --set-default flag. darcs: bug at src/Darcs/Patch/Depends.hs:327 compiled May 26 2015 04:16:45 Failed to commute common patches: patch 71a1a541365ab8de9a874c21681f07b97bc1669b Author: benedikt.huber@gmail.com Date: Tue Aug 16 20:19:10 MSK 2011 tagged 0.4.1 patch f711caf67e93818e50033b7453e503ac23f26441 Author: benedikt.huber@gmail.com Date: Wed Feb 24 10:19:43 MSK 2010 * old tag: darcs_apply_bug patch c400ff96bc04d011ad9ab89966a104965f4b3548 Author: benedikt.huber@gmail.com Date: Thu Aug 21 16:32:18 MSD 2008 tagged 0.3.1 patch 4ab2c817f54dbd8f06a1350cb9a4abf28e25ddeb Author: benedikt.huber@gmail.com Date: Tue Aug 12 20:34:05 MSD 2008 * old tag: 0.3 patch c64f7c2830d166da91fa0d20b8a6877babe6d580 Author: benedikt.huber@gmail.com Date: Tue Jun 3 12:45:36 MSD 2008 * old tag: 0.1 See http://wiki.darcs.net/BugTracker/Reporting for help on bug reporting. ~/TOOLS/prog/language-c.darcs-2 $ For now, I'm still in doubt what would be a simple way to transfer the several last patches to a darcs-2 fork. Perhaps, there is some kind of a known problem with converted tags in darcs? Best regards, Ivan

On Mon, 21 Dec 2015, Ivan Zakharyaschev wrote:
Ganesh Sittampalam re-assured me at http://stackoverflow.com/a/34385874/94687 that it is not always so bad, and gave advices that I still try to go through the conversion and pushing my changes to a clone of the other upstream darcs-2 repo:
Unfortunately, it didn't go smoothly -- when pushing the converted repo, darcs "couldn't commute" some tag patches, and it seems it refused to do anything further:
For now, I'm still in doubt what would be a simple way to transfer the several last patches to a darcs-2 fork.
Perhaps, there is some kind of a known problem with converted tags in darcs?
It looks like a bug in the darcs conversion in my case, because my darcs-2 result of the conversion lacks some tags, which are present in the darcs-1 source (and also in the hub darcs-2 repo). It's strange that the conversion once done for hub didn't have this problem. ~/TOOLS/prog/language-c.darcs-2 $ darcs show tags imz_init_typos-fixed 0.4.1 0.3.1 $ cd ../language-c ~/TOOLS/prog/language-c $ darcs show tags imz_init_typos-fixed 0.4.1 darcs_apply_bug 0.3.1 0.3 0.1 ~/TOOLS/prog/language-c_hub $ darcs show tags 0.4.1 darcs_apply_bug 0.3.1 0.3 0.1 The conversion was done like this (with some warnings/error messages): ~/TOOLS/prog $ darcs convert darcs-2 language-c language-c.darcs-2 WARNING: the repository produced by this command is not understood by Darcs 1.x, and patches cannot be exchanged between repositories in darcs-1 and darcs-2 formats. Furthermore, repositories created by different invocations of this command SHOULD NOT exchange patches. Please confirm that you have read and understood the above by typing `I understand the consequences of my action': I understand the consequences of my action lossy conversion: merger 0.0 ( merger 0.0 ( hunk ./src/Language/C/Data/Position.hs 115 +-- | advance to the next row +incRow :: Position -> Position +incRow (Position o f r c) = Position o f (r + 1) c +incRow p = p hunk ./src/Language/C/Data/Position.hs 115 +{-# INLINE adjustPos #-} +-- | adjust position: change file and line number, reseting column to 1. This is usually +-- used for #LINE pragmas. The absolute offset is not changed - this can be done +-- by @adjustPos newFile line . incPos (length pragma)@. +adjustPos :: FilePath -> Int -> Position -> Position +adjustPos fname row (Position offs _ _ _) = Position offs fname row 1 +adjustPos _ _ p = p ) hunk ./src/Language/C/Data/Position.hs 115 --- | advance to the next row +-- | advance to the next row, this does not reset the column. use +-- @retPos@ if that's what you want to do. ) Finished converting. Best regards, Ivan

Hi, On Sun, 20 Dec 2015, Ivan Zakharyaschev wrote:
I've been interested in hacking language-c library a bit for my needs. (If it turns out useful and successful, I'll tell about it.)
And I've cloned the repo listed at https://hackage.haskell.org/package/language-c-0.4.7 , namely: http://code.haskell.org/language-c
Apart from my special hacks, I've also fixed some typos and so on.
I've pushed my minor fixes to the code of language-c to http://hub.darcs.net/imz/language-c_fixes and http://hub.darcs.net/imz/language-c_cleanup (which is a superset of the former). And will push more if I have more minor fixes. So, if someone is interested, please pull them. As for the problems with the conversion from darcs-1 to darcs-2, they were overcome with the help of darcs maintainers in the darcs-users mailing list, and now I do the changes in the darcs-1 clone of the repo pointed at by Hackage, covert to darcs-2 then, and push to hub.darcs.net. (http://hub.darcs.net/imz/language-c_hackage holds the result of the conversion of the upstream darcs-1 repo. visq's darcs-2 repo is 2 patches behind.)
But then I discovered that if I want to publish them on hub.darcs.net , I need a darcs-2 repo, and the initial one which I used for cloning is a darcs-1 repo.
I could do the conversion to darcs-2, but I read that it is not reproducible: run several times on the same set of patches it will give different results.
As I've discovered also a language-c repo at hub.darcs.net which looks like an upstream repo: http://hub.darcs.net/visq/language-c , I'm in doubt whether I should continue making my patches against the darcs-1 repo which is said to be upstream at hackage or against http://hub.darcs.net/visq/language-c whichis not officially declared as the upstream but looks more fresh.
..if I want to be able to send some of my patches upstream.
Best regards, Ivan
participants (1)
-
Ivan Zakharyaschev