Fog Creek Software
Discussion Board


Why can't I check out just one file? You can with CVS but Subversion makes you check out a directory. Why?

The Real PC
Thursday, August 28, 2003

Because it's not CVS? Different source control systems do things in different ways.

Have you asked at the subversion web site? They'd be the ones to ask...

(note: I've never used Subversion so I don't know if this is the real mode of operation or if you have an error. I just think it's silly to ask here instead of the one please where you're sure to get a legitimate answer).

Thursday, August 28, 2003

I'm going to venture a guess that it's because subversion keeps revision history on the contents of a directory, too, so for example if you rename or move a file that is a part of the revision history -- a big improvement over CVS.

Joel Spolsky
Thursday, August 28, 2003

We have a web interface for Subversion, which is to be used by workers in the office, to update web sites. If someone wants to make a change in one web page they have to wait for Subversion to checkout an entire directory, including graphics and whatever.
The web inteface was developed by someone else and was just handed over to me to finish.
I can't imagine people wanting to use it to update web pages. It used to take seconds for them to open the file in vi and edit. Now it will take minutes for every file.

The Real PC
Thursday, August 28, 2003

So, this might not be a question about Subversion at all, but a question for whoever wrote your web interface to Subversion about why _they_ check out entire directories.

Those of us here have even less of a chance of answering your question except with educated guesses (like Joel did). You should contact the author of your web system.

Thursday, August 28, 2003

I don't know as much about subversion as I do about CVS, but it actually sounds to me like you'd be having the same problem with CVS.

What I'm wondering is, why do you need to "check out" things to work on them at all?  When I work with CVS, I have a "checkout" that sits there all the time.  I don't need to "check out" just to edit something.  Instead, I just edit it.  When I want to commit my changes, I just commit them.  Subversion, which is supposed to be a compatible replacement for CVS, should work the same way.

I think the real question you should be asking here is, "Why can't I just *leave* the files checked out, and just make sure they're up to date, instead of creating a whole new checkout each time I want to edit."  It sounds like maybe the person who designed your web interface wasn't used to the normal CVS/Subversion work cycle, and based the design on the workflow for tools that require a checkout before you can do anything.

(Either that, or you're saying "check out" when you actually mean "bring an existing checkout up-to-date".)

Phillip J. Eby
Thursday, August 28, 2003

He may be confusing the term "check out" with "edit".    The CVS "edit" command unlocks a file so that you can make changes to it.  In some source control systems this is called a check out.    In CVS the "check out" command pulls the source tree down from the repository into a local directory.

Thursday, August 28, 2003

My co-worker designed the web interface so users actually have to check out (yes I mean check out) an entire directory in order to edit one file! It all goes into a temporary directory and is immediately removed.

A further problem is that after a user edits a file, there is no link to the edited page that would let them preview their changes.

It occurred to me that I can give each user their own directory on the server where the web interface is located. They would only have to check out each directory once and after that would edit their working copy. That is how we use CVS, and how Subversion is meant to be used.
Don't ask me why my co-worker designed it this way.

It also does not give users a chance to preview the pages they edit before committing. If I change it so each user has a working copy (I don't think there will be a large number of users), then I can add a link to preview the page.

The Real PC
Friday, August 29, 2003

You may want to look around at the Subversion Forums and wiki: and

Wednesday, June 16, 2004

*  Recent Topics

*  Fog Creek Home