Re: Q: language-c upstream repo

Ivan Zakharyaschev <[email protected]>
Newsgroups gmane.comp.version-control.darcs.user
Message-ID <[email protected]>
On Mon, 21 Dec 2015, Guillaume Hoffmann wrote:

>> But isn't it a bug that some tags seem to be lost after the conversion? (As
>> I have demonstrated below: the tags are present in the source darcs-1 repo,
>> but not in the result.)
>
> Can you first run "darcs optimize reorder" and then do the conversion?

I did this.

This didn't help with the lost tags (isn't it strange?), but did help with 
being able to push to the darcs-2 repo from hub (a clone of it):

(BTW, there are axtra patches in the darcs-1 repo.)

~/TOOLS/prog $ cd language-c.pristine.reordered/
~/TOOLS/prog/language-c.pristine.reordered $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c.pristine.reordered $ darcs optimize reorder
Done reordering!
~/TOOLS/prog/language-c.pristine.reordered $ darcs show tags
0.4.1
darcs_apply_bug
0.3.1
0.3
0.1
~/TOOLS/prog/language-c.pristine.reordered $ cd ..
~/TOOLS/prog $ darcs convert darcs-2 language-c.pristine.reordered 
language-c.pristine.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.
~/TOOLS/prog $ cd language-c.pristine.darcs-2/
~/TOOLS/prog/language-c.pristine.darcs-2 $ darcs show tags
0.4.1
0.3.1
~/TOOLS/prog/language-c.pristine.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.
patch e3ef50ad1602f11b10b5aa1d7e529e06866c3e91
Author: [email protected]
Date:   Thu Dec  4 09:38:40 MSK 2014
   * Notes concerning MAINTAINANCE, whitespace fixes in Test
Shall I push this patch? (1/2)  [ynW...], or ? for more options: v
[Notes concerning MAINTAINANCE, whitespace fixes in Test
[email protected]**20141204063840
  Ignore-this: fc7e006cc9b2fa7566b33f8caa35e769
] addfile ./MAINTAINANCE
hunk ./MAINTAINANCE 1
+# Maintainance Release Procedure
+
+# bump version and update dependencies if necessary
+emacs language-c.cabal
+darcs record
+
+# apply patches
+darcs am *.patch
+
+# add minimal test for new functionality
+# (edit test/harness)
+
+# haskell updates
+# (update GHC to stable release)
+cabal update
+cabal install -p --upgrade-dependencies
+
+# regression test
+DEFAULT_BROWSER=firefox bash scripts/regression_test
+
+# upload to code.haskell.org
+darcs push
+
+# upload to hub.darcs.net and github (using patches)
+
+# upload to hackage (using website)
hunk ./test/src/CParse.hs 29
-nonParseEnvVar :: String [_$_]
+nonParseEnvVar :: String
hunk ./test/src/CParse.hs 39
-        [_$_]
+
hunk ./test/src/CParse.hs 59
-      True -> [_$_]
+      True ->
hunk ./test/src/CParse.hs 62
-          setTestStatus parseTest1 $ [_$_]
+          setTestStatus parseTest1 $
hunk ./test/src/CParse.hs 68
-          setTestStatus parseTest1 $ [_$_]
+          setTestStatus parseTest1 $
hunk ./test/src/CParse.hs 71
-  [_$_]
+
Shall I push this patch? (1/2)  [ynW...], or ? for more options: n
patch 1f08b2e3e6ee99c93e0b8283a8a409efe38bf41c
Author: [email protected]
Date:   Thu Dec  4 09:39:10 MSK 2014
   * Scott Kovach <[email protected]>: added derived Eq,Ord instances to 
NodeInfo

Shall I push this patch? (2/2)  [ynW...], or ? for more options: v
[Scott Kovach <[email protected]>: added derived Eq,Ord instances to 
NodeInfo
[email protected]**20141204063910
  Ignore-this: ec4894a483080f5d658cbaacabdbaa95

] hunk ./src/Language/C/Data/Node.hs 29
-           deriving (Data,Typeable)
+           deriving (Data,Typeable,Eq,Ord)
hunk ./src/Language/C/Data/Node.hs 38
-instance Eq NodeInfo where
-  (NodeInfo   _ _ id1) == (NodeInfo   _ _ id2) = id1 == id2
-  _               == _               =
-    error "Attributes: Attempt to compare `OnlyPos' attributes!"
+--instance Eq NodeInfo where
+--  (NodeInfo   _ _ id1) == (NodeInfo   _ _ id2) = id1 == id2
+--  _               == _               =
+--    error "Attributes: Attempt to compare `OnlyPos' attributes!"
hunk ./src/Language/C/Data/Node.hs 44
-instance Ord NodeInfo where
-  (NodeInfo   _ _ id1) <= (NodeInfo   _ _ id2) = id1 <= id2
-  _               <= _               =
-    error "Attributes: Attempt to compare `OnlyPos' attributes!"
+--instance Ord NodeInfo where
+--  (NodeInfo   _ _ id1) <= (NodeInfo   _ _ id2) = id1 <= id2
+--  _               <= _               =
+--    error "Attributes: Attempt to compare `OnlyPos' attributes!"
Shall I push this patch? (2/2)  [ynW...], or ? for more options: n
Do you want to push these patches? [Yglqk...], or ? for more options: l
---- Already selected patches ----
---- end of already selected patches ----
Do you want to push these patches? [Yglqk...], or ? for more options: y
You don't want to push any patches, and that's fine with me!
~/TOOLS/prog/language-c.pristine.darcs-2 $ darcs fetch ../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.
No remote changes to pull in!
~/TOOLS/prog/language-c.pristine.darcs-2 $

> I suspect this is the same bug as http://bugs.darcs.net/issue2466 ,
> that is, "dirty" tags (tag that have unrelated patches before them)
> are not exported.



Ivan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.