Ben Franksen wrote:
> We should really improve the darcs convert import command so that it can
> incrementally import using marks files or some other mechanism.

It is a lot simpler than I thought. darcs convert import needs no marksfile 
support, that is already done by git fast-export. All that is needed is to 
lift some arbitrary restrictions in the implementation of darcs convert 
import. I have quickly hacked together a small patch that circumvents the 
restrictions. I really don't know for sure what I am doing here but it seems 
to work in a simple example. Just cd to your darcs repo (in my test it was 
empty), then do

touch ../gitrepo/git.marks
(cd ../gitrepo && git fast-export --import-marks=git.marks --export-
marks=git.marks) | darcs convert import

When you do this again, it does not change the repo. You could test if you 
can convert your git repo with this. If it doesn't work I am willing to dig 
deeper into the matter...

Cheers
Ben
-- 
"Make it so they have to reboot after every typo." -- Scott Adams
Note this is a very ver simple-minded and quick hack. Someone should review
this and/or properly implement it.

1 patch for repository http://darcs.net/screened:

patch c5d92f590be2de561746eea5d2d2be20c87c12cf
Author: Ben Franksen <benjamin.frank...@helmholtz-berlin.de>
Date:   Fri Jan 23 22:26:18 CET 2015
  * feature: allow darcs convert import in an existing darcs repo


New patches:

[feature: allow darcs convert import in an existing darcs repo
Ben Franksen <benjamin.frank...@helmholtz-berlin.de>**20150123212618
 Ignore-this: 2423b45d59d774e0a471a6f433f001bf
] hunk ./src/Darcs/UI/Commands/Convert.hs 496
-fastImport _ _ _ = fail "I need exactly one output repository."
+fastImport _ opts [] = do
+  withRepoLock NoDryRun (useCache opts) YesUpdateWorking (umask opts) $ V2Job 
$ \repo -> do
+    marks <- fastImport' repo emptyMarks
+    return marks
+fastImport _ _ _ = fail "I need no more than one output repository."

Context:

[TAG 2.9.9
Ganesh Sittampalam <gan...@earth.li>**20140424063828
 Ignore-this: ae3cb4369f15af8cb2f19d6f5603d935
] 
Patch bundle hash:
18beb25a3a2b0ca7796481ab99e26f0180ad1cd3

_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to