Archived

This topic is now archived and is closed to further replies.

CVS-like through FTP

This topic is 5128 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello! I''m wondering if there exists a solution to set up a version control system on a server that only accepts FTP connection (full access to FTP commands). CVS requieres pserver or ssh to maintain its repository but the remote computer is only for www and ftp and I can''t run things on it. As it''s mainly a matter of storing files in a proper way on the server side, maybe someone developped a system that does the same through FTP upload and download ? Thanks

Share this post


Link to post
Share on other sites
I guess it would be technically posssible. Put would add to cvs, get would recieve. But what command would checkout be for example.

And the big question is why do you want this?

Share this post


Link to post
Share on other sites
quote:
And the big question is why do you want this?


Well, I don''t want to set my own server. I already pay for the other one and thought it would be nice to find something that works there.

quote:
But what command would checkout be for example.


Checkout ? I don''t know how exactly it''s stored internally but I''m sure it''s possible with a cvs-to-ftp wrapper. Checkout is just retrieving information stored somewhere on the server, if you can read/write/delete/overwrite/chmod files, I''m sure FTP is enough.

Share this post


Link to post
Share on other sites
quote:
Original post by bashung
quote:
And the big question is why do you want this?


Well, I don''t want to set my own server. I already pay for the other one and thought it would be nice to find something that works there.



The problem is that there''s no way a standard ftp server could support this, it would need to be a customised server, that accepts ftp commands, but does something entirely different internally. So, you would need to be able to install a customised server, and in that case a standard cvs solution would be way better.

quote:

quote:
But what command would checkout be for example.


Checkout ? I don''t know how exactly it''s stored internally but I''m sure it''s possible with a cvs-to-ftp wrapper. Checkout is just retrieving information stored somewhere on the server, if you can read/write/delete/overwrite/chmod files, I''m sure FTP is enough.


Checkout means that you check the file out for editing. Without checking it out you can''t edit it. Similary checkin in is when you "upload" the modified version. This is *very* useful if you are many users working on the same project.

Share this post


Link to post
Share on other sites
Well, yeah, that would be enough, but it would be quite slow. Imagine having a 100k file that has one line added to it. The "wrapper" would first need to download the file, compare it to your local copy and then upload it, just for that one line change.

CVS usually does that thing remotely, on the server, so it can send you just the stuff you need.

Share this post


Link to post
Share on other sites
quote:
Original post by Kippesoep
Well, yeah, that would be enough, but it would be quite slow. Imagine having a 100k file that has one line added to it. The "wrapper" would first need to download the file, compare it to your local copy and then upload it, just for that one line change.

CVS usually does that thing remotely, on the server, so it can send you just the stuff you need.




As FTP supports partial uploads this would be possible with FTP too. But that doesn''t mean using FTP is a good idea, a custom protocol is always better.

Share this post


Link to post
Share on other sites
quote:
Original post by fredizzimo Checkout means that you check the file out for editing. Without checking it out you can''t edit it. Similary checkin in is when you "upload" the modified version. This is *very* useful if you are many users working on the same project.

CVS doesn''t work this way. CVS works on an "optimistic concurrency" model. All files in the working copy are generally editable, and relies on the user to resolve conflicts if they occur.

For the OP: I created sort of a rudimentary version control system that used FTP once. Basically it just kept a list on the server that kept track of which files were currently checked out, and refused to let anyone else upload that file if it were. Of course, all the functionality was in the client itself - if you used a regular FTP client instead, you could overwrite whatever you wanted.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites
quote:
Original post by Arild Fines
CVS doesn''t work this way. CVS works on an "optimistic concurrency" model. All files in the working copy are generally editable, and relies on the user to resolve conflicts if they occur.



It depends on which CVS system you are using. And most systems that have checkout allows several users to check out the same file, and it then tries to resolve any conflicts, so it doesn''t give you any less flexibility.

But IMO, conflicts should be avoided before they occur, if possible. It also prevents you from editing files accidently. It basically gives you additional protection, and that''s why I think it''s an important part of a CVS system.

Share this post


Link to post
Share on other sites
quote:
Original post by fredizzimo
It depends on which CVS system you are using.


There is pretty much only one version control system called CVS. Which uses the optimistic model.

I get a feeling you are using the term CVS to refer to version control systems in general.


quote:

It also prevents you from editing files accidently. It basically gives you additional protection, and that''s why I think it''s an important part of a CVS system.


For binary files I agree with you, but for plain text/source code a locking system is more trouble than it''s worth.

Read http://svnbook.red-bean.com/html-chunk/ch02s02.html for a discussion of the various models.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I thought CVS or Subversion were only storing "deltas" of files, just the "patches" and modified parts, not the complete files (except for first commit). I''m sure it''s possible to have such a fast system with FTP.

Share this post


Link to post
Share on other sites
quote:
Original post by Arild Fines
quote:
Original post by fredizzimo
It depends on which CVS system you are using.


There is pretty much only one version control system called CVS. Which uses the optimistic model.

I get a feeling you are using the term CVS to refer to version control systems in general.



Hm.. I''m pretty sure you can configure cvs with required checkouts and filelocks. But I''m not 100% sure as I have never actually used cvs. I have used other version control systems though.

quote:

quote:

It also prevents you from editing files accidently. It basically gives you additional protection, and that''s why I think it''s an important part of a CVS system.




For binary files I agree with you, but for plain text/source code a locking system is more trouble than it''s worth.



I don''t agree... But I guess it depends on how the project is strucutred, how many people works on it, what tasks the people are assigned and so on.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
I thought CVS or Subversion were only storing "deltas" of files, just the "patches" and modified parts, not the complete files (except for first commit).

They are not required to. At least Subversion(and presumably also CVS) you can choose whether to store a delta or fulltext on a revision by revision basis. IE, you could store fulltexts of frequently checked out revisions, and deltas for the rest.

Also, the latest revision is generally stored as fulltext in both CVS and Subversion.

Share this post


Link to post
Share on other sites
quote:
Original post by fredizzimo
Hm.. I''m pretty sure you can configure cvs with required checkouts and filelocks. But I''m not 100% sure as I have never actually used cvs. I have used other version control systems though.


CVS "watches" can give you a notification if someone else edits a file(assuming they use the "cvs edit" command). This is a far cry from a lock-modify-unlock model, though.
Most people use the copy-modify-merge model. Subversion will have a locking model some day, but not in 1.0: http://svn.collab.net/repos/svn/trunk/notes/locking-plan.txt

quote:

quote:

For binary files I agree with you, but for plain text/source code a locking system is more trouble than it''s worth.


I don''t agree...


You say this after reading that link I gave you?
quote:

But I guess it depends on how the project is strucutred, how many people works on it, what tasks the people are assigned and so on.


Well, of course, but I have heard lots of anecdotal evidence that the Subversion/CVS model works well even in large environments.

--
AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.
[Project site] [Blog] [RSS] [Browse the source] [IRC channel]

Share this post


Link to post
Share on other sites