Darcs implementation

Review Request #2051 — Created Jan. 20, 2011 and discarded

ttuegel
Review Board
reviewboard
Darcs (http://darcs.net) is an open-source distributed version control system. This patch adds support for local and remote Darcs repositories and the Darcs diff format.
I have tested the following on Linux:
* Adding Darcs repositories to Review Board
* Uploading and viewing diffs generated with 'darcs diff -u'
TT
chipx86
  1. Revision markers of some sort are critical. A diff will not be able to be seen once any of the files are changed on the repository, so we require it for all SCMTools.
    
    Not all diffs contain revision markers of any sort by default, so in that case we invent them. It means adding support to our post-review tool and requiring that, though. It's necessary when the diff doesn't natively give us the information we need.
    1. I'll admit I know very little about Darcs. I read up on it a little, including some discussions on revision markers, and I guess Darcs doesn't work that way? In that I can't say "give me this file at this point in time?" If so, I don't know how we're going to be able to support a Darcs repository properly. That requirement is pretty much etched in stone.
      
      What we'd then need is a way to fetch the file and store it indefinitely at upload time, instead of fetching at diff generation time. And then of course not patch when it comes to generating the diff. We have nothing in place for this, and it would certainly mean larger storage requirements.
      
      Of course, I may have misunderstood this limitation.
    2. It's true that you can't say "give me this file at this point in time" because Darcs allows patches to be reordered between repositories when possible. I think there is a way to get enough information, though.
      
      Darcs has two ways of passing patches between repositories: diffs (which is what I expect to be uploaded to reviewboard) and Darcs patch bundles, which have dependency information embedded in them, but can't be directly translated into a diff. In the patch for post-review that I also submitted, I figured out a way to embed Darcs patch bundles into the header of the diff file, so that patch/reviewboard will ignore the patch bundle and read the diff, but Darcs will ignore the diff and read the patch bundle. Soon I will upload a new version of this patch which reads the dependency information from the embedded patch bundle. This will give us the information we need to ask Darcs "give me the version of this file that this patch was created against." I think that will solve the problem of viewing diffs once a file has been changed in the repository.
  2. 
      
TT
TT
Review request changed

Status: Discarded

Loading...