[darcs-users] when darcs is slow, it is really really slow

Tommy Pettersson ptp at lysator.liu.se
Fri May 20 20:37:33 UTC 2005


On Fri, May 20, 2005 at 05:28:28PM +0200, Vigor van Ort wrote:
> So I can't mark them binary or else I loose track of what changes I've
> made locally vs. what's been pulled down from the translators.  My
> workflow was to have 3 repos -- one which contained just the snapshots
> from the translators.  One that was kept with the source code, where
> the scripts would run to pull out new strings and update line numbers.
>  And a third which was where I merged the two.  But the long long
> merges make that impossible to continue.

Did you ever sync the snapshot repo and the source code repo,
that is, did the patches that updates the line numbers in
the code repo get pulled to the snapshot repo so that new
snapshot update changes was made against newer line numbers?

I ask, because this would be a typical case where darcs gets
exponential if you don't, and it's not so much darcs fault as
the nature of the complexity of the growing merge situation
that's built up this way.


> I started to import my change sets into another SCM tool, but I ran
> into problems getting my changes out of darcs.  "darcs changes" shows
> about a dozen changes in the particular repo I decided to move.
> 
> For each change I did 'darcs diff -u -p "..." > po.$x' (where $x went
> from 1 to about a dozen -- fortunatly the patches were all named
> differently, or else I don't know how I'd refer to them).  I figured I

Each patch has a unique hash name, but there is no (obvious)
interface in darcs to display them.  The --xml output does
this.

> could then import each of these diffs into another SCM and be where I
> was with darcs.  But I didn't even make it to diff #2 -- I imported
> the first diff which was the initial import to darcs, then I tried to
> apply diff #2 but it failed horribly with patch failures in dozens of
> spots and some places it complained that the patch must have been
> reversed.

This is a bit complicated, I don't know if I understands
it correct myself.  The diff of a single patch (darcs diff
-p) is not unique.  If a darcs inventory is reordered the
diffs will come out different.  And if you have conflicting
patches that have formed mergers in the repo, the diffs for
the conflicting patches will (naturally) conflict.

> Is there a way to pull out a sequential set of diffs from a darcs repo
> that I can import into another SCM?

I think the best way is to build up diffs sequentially.
Start with the initial repo and pull in patches one at
a time, except for resolve patches that should be pulled
along with the conflicting patch (if patch A is pulled and it
conflicts with some older patch, the resolve_A patch should
be pulled immediately to get the repo in the intended state).
Then create diffs for every pull.  You can make a tag before
each pull and create the diff with 'darcs diff -u --from-tag
FOO', and name all the scratch tags FOO, you'll get the last
one each time.  Perhaps you can even run the new SCM in the
same directory: pull in some patches to get to the next state
and check in the new state in the new SCM, repeat.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list