[darcs-users] Darcs backend for Gitit

Gwern Branwen gwern0 at gmail.com
Sat Jan 3 19:27:18 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hiya everyone. So I've been desultorily working on Darcs support in
Gitit, and it's turned out to be a little rougher than I expected.
Time to leech^Wask for help. Attached is what I have so far.

My questions are like this.
- ---------------------------
1)
One function Gitit uses is gitDiff:
gitDiff :: MonadIO m
        => String     -- ^ Filename
        -> String     -- ^ Old version (sha1)
        -> String     -- ^ New version (sha1)
        -> m String  -- ^ String
gitDiff file from to = do
  (status, _, output)  FilePath -> FilePath -> FilePath -> m String
gitMergeFile edited original latest = do
  (status, err, out)  return out
       ExitFailure n | n >= 0  -> return out  -- indicates number of
merge conflicts
       _                       -> error $ "git merge-file returned an
error.\n" ++ err

I've tried to read up on Git, but I don't understand this. Is it just
a clone of the Unix command merge, as
http://www.kernel.org/pub/software/scm/git/docs/git-merge-file.html
suggests? I think from its use in Gitit.hs that it is intended for use
in 'edit conflict' situations
(https://secure.wikimedia.org/wikipedia/en/wiki/Edit_conflict
https://secure.wikimedia.org/wikipedia/en/wiki/Wikipedia:Edit_conflict)
where you change a page, save, and discover someone else edited it
already; but isn't Darcs supposed to handle such situations
intelligently? Perhaps the right solution involves some combination of
recording and pushing.
- --------------------------
The last two issues involve git cat-file
http://book.git-scm.com/7_browsing_git_objects.html (I am unsure what
the Darcs analogue is) and figuring out how to parse the changelog
XML, but those aren't major issues.

- --
gwern
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEAREKAAYFAklfvBUACgkQvpDo5Pfl1oKOzACeOF6dDh9BHPoQ8LAjzk22Kkuw
4mgAmQHSZ1EuLK5b/qstnX/EbEYBehFM
=XSB2
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Darcs.hs
Type: text/x-haskell
Size: 5053 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20090103/022b09fb/attachment.hs 


More information about the darcs-users mailing list