Граф коммитов

10 Коммитов

Автор SHA1 Сообщение Дата
Martin Langhoff 91a6bf4682 cvsserver: anonymous cvs via pserver support
git-cvsserver now knows how to do the pserver auth chat when the user
is anonymous. To get it to work, add a line to your inetd.conf like

  cvspserver stream tcp nowait nobody git-cvsserver pserver

(On some inetd implementations you may have to put the pserver parameter twice.)

Commits are blocked. Naively, git-cvsserver assumes non-malicious users. Please
review the code before setting this up on an internet-accessible server.

NOTE: the <nobody> user above will need write access to the .git directory
to maintain the sqlite database. Updating of the sqlite database should be
put in an update hook to avoid this problem, so that it is maintained by
users with write access.
2006-03-04 20:30:04 +13:00
Martin Langhoff cdb6760e6f cvsserver: better error messages
We now have different error messages when the repo is not found vs repo is
not configured to allow gitcvs. Should help users during initial checkouts.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 22:28:04 -08:00
Martin Langhoff 6be32d4791 cvsserver: nested directory creation fixups for Eclipse clients
To create nested directories without (or before) sending file entries
is rather tricky. Most clients just work. Eclipse, however, expects
a very specific sequence of events. With this patch, cvsserver meets
those expectations.

Note: we may want to reuse prepdir() in req_update -- should move it
outside of req_co. Right now prepdir() is tied to how req_co() works.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-03 21:37:31 -08:00
Martin Langhoff e74ee784c7 cvsserver: fix checkouts with -d <somedir>
A recent Eclipse compat fix broke checkouts with -d. Fix it so that the server
sends the correct module name instead of the destination directory name.
2006-03-02 22:56:28 -08:00
Martin Langhoff 501c7372c7 cvsserver: checkout faster by sending files in a sensible order
Just by sending the files in an ordered fashion, clients can process them
much faster. And we can optimize our check of whether we created this
directory already -- faster.

Timings for a checkout on a commandline cvs client for a project with
~13K files totalling ~100MB:

Unsorted:
  603.12 real        16.89 user        42.88 sys

Sorted:
  298.19 real        26.37 user        42.42 sys
2006-03-02 22:56:27 -08:00
Martin Langhoff ec58db15a9 cvsserver: Eclipse compat -- now "compare with latest from HEAD" works
The Eclipse client uses cvs update when that menu option is triggered.
And doesn't like the standard cvs update response. Give it *exactly* what
it wants.

And hope the other clients don't lose the plot too badly.

Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 21:41:58 -08:00
Martin Langhoff c8c4f22025 cvsserver: Checkout correctly on Eclipse
Initial checkouts were failing to create Entries files under Eclipse.
Eclipse was waiting for two non-standard directory-resets to prepare for a new
directory from the server.

This patch is tricky, because the same directory resets tend to confuse other
clients. It's taken a bit of fiddling to get the commandline cvs client and
Eclipse to get a good, clean checkout.

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-03-01 17:44:58 -08:00
Martin Langhoff 858cbfbabe cvsserver: Eclipse compat - browsing 'modules' (heads in our case) works
Eclipse CVS clients have an odd way of perusing the top level of
the repository, by calling update on module "". So reproduce cvs'
odd behaviour in the interest of compatibility.

It makes it much easier to get a checkout when using Eclipse.
2006-03-01 01:10:27 -08:00
Martin Langhoff 7172aabb4b cvsserver: Eclipse compat fixes - implement Questionable, alias rlog, add a space after the U
A few things to satisfy Eclipse's strange habits as a cvs client:

- Implement Questionable
- Aliased rlog to log, but more work may be needed
- Add a space after the U that indicates updated
2006-03-01 01:10:26 -08:00
Martin Langhoff 3fda8c4cc7 Introducing git-cvsserver -- a CVS emulator for git.
git-cvsserver is highly functional. However, not all methods are implemented,
and for those methods that are implemented, not all switches are implemented.
All the common read operations are implemented, and add/remove/commit are
supported.

Testing has been done using both the CLI CVS client, and the Eclipse CVS
plugin. Most functionality works fine with both of these clients.

Currently git-cvsserver only works over SSH connections, see the
Documentation for more details on how to configure your client. It
does not support pserver for anonymous access but it should not be
hard to implement. Anonymous access will need tighter input validation.

In our very informal tests, it seems to be significantly faster than a real
CVS server.

This utility depends on a version of git-cvsannotate that supports -S and on
DBD::SQLite.

Licensed under GPLv2. Copyright The Open University UK.

Authors: Martyn Smith <martyn@catalyst.net.nz>
         Martin Langhoff <martin@catalyst.net.nz>

Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
2006-02-22 02:17:07 -08:00