Problem with Subversion

Hi,

I'm interested in Subversion for controlling my projects, but I've notice a little problem that I can't aswer.

Imagine there are 2 users working with the source code. Normally each one have a local copy of the repository, but in this case, everytime that someone want to modify it, the have to work on the same directory. So, if both want to change a part of the source code, both will work at the same directory at the same time, so the last will destroy the first one's work.

Anyone can tell me a solution? Thanks,

Orcrist

5 Replies

The problem is that each person must have a local copy of the repository to work on. This holds for Perforce, Subversion, CVS, heck, even SourceSafe (or, as I call it, SourceUnSafe).

So what happens if two people work on the same file? The first one to check the file in has no problems, the second person has to merge with the first person's changes. That's part of the logic of a source code control system.

Or did I completely misinterpret your question?

You will get more help trying the subversion support channels

Adam

I'm not sure if you completely understand how version control (especially cvs and subversion) work. Basically, each user works in his own directory (sandbox) and makes any changes as needed. There are commands in subversion to merge all the changes that have been made in the repository since the last time you pulled the code into your local copy. Once you are done with your changes, you simply make sure you have everything merged from the repository (usually automatic and painless, but occasionally more difficult if there are lots of changes) and then you check your changes into the repository. Then the other person can merge your changes into their local copy and so on.

Most of the time, if 2 different folks are working on different parts of the code, there are usually very few conflicts. If, however, they are working on the same pieces of code, there can be occasions when manual merging is required and this takes a bit of time.

I know that everyone have to have a local copy of the code. But in this particular case, that situation cannot be. They need to work in an specific directory that is in an specific server, and there is only one. The answer can be that there is no solution because this kind of software do not support this kind of things. Is that correct?

Thank a lot!

Orcrist

Have you thought about using something like RCS instead? RCS is the precursor to CVS, and RCS works only in one directory. If the 2 users have different logins, RCS will allow one individual to lock a file for use and then the other person won't have write access until the person checks the file in or otherwise unlocks it for writing. If the two users don't have different logins, however, you may be outta luck with RCS as well.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct