[darcs-users] Darcs get without hard links
David Roundy
droundy at darcs.net
Sat Nov 19 11:38:05 UTC 2005
On Sat, Nov 19, 2005 at 12:03:35PM +0100, Tomasz Zielonka wrote:
> On Sat, Nov 19, 2005 at 11:24:46AM +0100, Tomasz Zielonka wrote:
> > On Thu, Nov 17, 2005 at 07:17:23AM -0500, David Roundy wrote:
> > > > I thought about creating a simple darcs-server. It would be an
> > > > additional (perhaps hidden) darcs command, that would make darcs
> > > > respond to requests on stdin/stdout. One kind of request would
> > > > be to get a list of files, the other would be to invoke a darcs
> > > > command.
> > >
> > > One major downside of this approach is that it requires darcs on the
> > > other side.
> >
> > If there was no darcs on the other side, we could fall back to normal
> > darcs-less operation. I think it could be done without making a mess
> > of it.
>
> I have a crazy idea - the darcs-server, I am talking about, could be
> the same thing that is discussed the thread "Programmatic invocation"
> on darcs-devel. Communication through stdin/stdout should be convenient
> both for ssh connection and a GUI.
Possibly, but it sounds a bit scary to me. On the other hand, one man's
scary is another man's cool project. We'd definitely need a clean,
maintainable design, but if you can manage that, it might work. You'd need
to work out the semantics of the protocol (am I using that word right?),
and figure out first what you want to be able to communicate, and what you
want to be able to force the remote darcs to do. If that could be cleanly
described (just in human words) in a way that can be understood, and yet is
also powerful enough to allow all the sorts of operations that we want for
both purposes, then I think we'd be in business. I'm just thinking in
terms of a set of messages that we could imagine using over the phone to
control darcs.
Tomasz: How many changes are there in the working directory?
David: Ten.
Tomasz: What's the first one?
David: It's a file rename--someone renamed "darcs.lhs" to "cabal.lhs"!
Tomasz: Can we revert that patch without changing anything else?
David: No, if we revert that patch, we also have to revert an "add
darcs.lhs" patch.
Tomasz: Really? That's odd. What is the contents of the new darcs.lhs?
David: It's a hunk that adds a program:
main = putStrLn "Use cabal, not darcs!"
Tomasz: Has Isaac been around your computer?
David: He was at ICFP, and I left my computer unattended for a while...
Tomasz: Can you just revert the rename, the file add and the hunk patch?
David: Sure, no problem!
--
David Roundy
http://www.darcs.net
More information about the darcs-users
mailing list