[darcs-users] idea: darcs-cvs-sync

Mark Stosberg mark at summersault.com
Sun Nov 7 18:17:31 UTC 2004


I've thought through what I think is a workable solution for a
bi-directional syncing between darcs and CVS. Here's a brain dump.

Goals or (Why bother?)
----------------------

The tool would serve people who are stuck using CVS but prefer to
use darcs. It could especially help those only with read-access to CVS,  
but want to contribute frequently to the project, with more powerful
source management tools

However, the ability to handle the read-only case takes more work,
and would not be expected to appear in the first release. 

Implementation
--------------

Here's how I see the 'flow' working. This could all be done by hand,
but much of the boring stuff could be scripted.

Setup
-----

- Get your project to the state so that it is being managed by both
  CVS and darcs. This is covered by the existing cvs_convert.pl tool:
  http://www.scannedinavian.org/DarcsWiki/ConvertingFromCvs

- Create a 'pristine' copy of the tree that will be used for related work.
  This could be just "cp -r . ../pristine"

Updating
--------
Updating from CVS would happen in you working directory, use cvsps and
the kind of logic already in cvs_convert.pl. Once the working directory
was updated from CVS, these patches would be pushed directly to the
pristine copy. 

Committing
---------
Like normal CVS usage, it is advisable to update before your commit to
avoid conflicts. The script might enforce this. 

To commit back to CVS, patches would be pushed from your working
directory to the pristine directory one by one, from oldest to newest.

If you have write access, after each push, a CVS commit would be made
from the pristine directory. 

If you don't have write access, e-mails could be prepared to send
upstream to a commiter. These could have a patch names in them, along
with the patch in a standard diff format. I haven't figured out what the
best version of the tree would be to patch against, since some patches
may be accepted and not others. Considering that, along with patch
interdependences...it may just have to be messy. (But not any worse than
using CVS alone!)


I think that's it for basics.  

If you are wondering-- I'm not volunteering to start working on this
right now! I like the idea and thought it would useful to sketch out. 
Someone else is welcome to take the idea and run with it until I get
around to it (if I do. :) 


	Mark








- Initialize the project and do an 


 

1. Serve people who prefer the flexibility that darcs give the




-- 
http://mark.stosberg.com/ 





More information about the darcs-users mailing list