I would love to see that C program! Thanks for offering. Can it handle patches containing binary files? (we do have some binaries in our company Darcs repository).
Cheers, James. On 22/11/2007, Alan Bram <[EMAIL PROTECTED]> wrote: > > > Essentially, what I want to be able to do is pull the repository one > patch > > at a time from first to last. > > After each pull, I want to be able to capture the changed working tree > with > > another DVCS (probably git). > > I decided I wanted to do basically this same thing. But, as you said, > darcs did not seem to be able to do that. > > Here's how I solved the problem for myself: > > - I looked at the darcs patch files in my repo, to learn the format; > > - I wrote a little C program which reads a patch file, applies the > changes to files in an existing working-copy, and then finally > records (or "checks in") the changed files in another VCS. I used > Subversion, so I was doing "svn commit", but I imagine it could be > changed to work with any other VCS. > > - then I made a chronological list of all the patch files in my darcs > repo, and fed them to my C program one at a time. (This is easy to > do, since darcs names the patch files with a timestamp.) > > This has worked great for me, although there may be parts of the patch > file format that I didn't discover, just because I never encountered > them. Basically, I wrote the C program to be as careful as possible: > if anything at all didn't look exactly perfect, I would abort. That > way, when I came across something new in a patch file, I could go back > and enhance the C program to handle the additional case. And then > simply try again. The fact that Subversion uses a > transaction-protected database engine makes it easy to abort, and > revert, a pending change. > > If you wanted to try this, I could give you a copy of the C program. > > > Cheers, > - arb > -- James Sadler [EMAIL PROTECTED] | [EMAIL PROTECTED]
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
