MUY Belgium
MUY Belgium

Reputation: 2452

Create a working copy on the same svn server

I have a development made under svn revision control located in the local folder /myCompany/myProject/.

I would like to make a working copy into the local folder /home/me/myProject.

What are the command to create the working copy. I have tried

me:/home/me/myProject$ svn checkout file:///mycompany/myProject/
svn: Unable to open ra_local session to URL
svn: Unable to open repository 'file:///mycompany/myProject/'

I would like to create a svn repository with the current version as first revision, using "dayly commits". Then I would like to merge last my working copy revision into the company's project latest revision, using "feature commits".

My fellow programmers do not like to branch but I would like to commit only full and debugged feature into the company's svn repository, keeping my stupids type mistakes and other intermediates failures in my own. I hope a better confidence in my code by me fellow programmers.

I can stand I am at a each moment the lone programmer of the project.

How can I achieve such thing? What commands should I use for each of local copy creation, daily commit, feature commit, local copy destruction?

Upvotes: 0

Views: 83

Answers (2)

arkascha
arkascha

Reputation: 42885

After sorting things out in a lengthy exchange we learned that the correct command must be:

svn checkout file:///svn/myProject

One other thing: looking at your motivation I really suggest you should take a look at using git as a frontend repository for your svn based company repository. Things get a little more complex, but there are helper utilities for this. This difference is that you can do real commits to your private local environment and maintain separate branches which is not possible with the checkout approach you currently try.

Upvotes: 0

David W.
David W.

Reputation: 107030

My fellow programmers do not like to branch but I would like to commit only full and debugged feature into the company's svn repository, keeping my stupids type mistakes and other intermediates failures in my own. I hope a better confidence in my code by me fellow programmers.

Look at git-svn which will allow you to checkout your Subversion project as a local Git repository. Then, you can make your checkpoint commits until you are ready to commit your code. It's way easier than setting up your own Subversion repo, and trying to keep what you're doing in sync with your fellow developers

However, a word of caution: Programming is sloppy and messy work. You'll have bugs. You'll make mistakes. I don't know what language you're developing in, but you can always do a local build to verify your work before committing your changes. This way, you can at least make sure your changes don't prevent other developers from doing their work.

I tell developers to take small bites. That is, do small code changes and not grandiose changes. Don't pretend you're God and can create entire programs out of the void with mere thought.

For example, you're implementing a new feature that depends upon a new class. Work on the class, and write some tests. You can commit your initial class, and after you work on each method. You can then work on the feature bit-by-bit filling out the new feature with each change.

Keeping your code hidden until you finish is not a good way to learn and to become a better developer. I encourage developers to commit their changes, and share their code. Ask other developers for advise and what they think. This is how you learn.

If in the end, you don't want to use git-svn and you really, really want your own private work area, make your own branch. Not a feature branch, but a private branch for your own work. You can create the branch, do your work, reintegrate it back into the main workflow, then delete it. Rinse and Repeat. Subversion handles merges pretty well.

Upvotes: 1

Related Questions