0

I have been working on a Django project, and I decided that it needed some version control. I have an SVN server running on another machine, and I wanted to import that code into my SVN repository. I am developing on Ubuntu and my SVN server is a remote OS X machine.

I went into my Django project on my development machine, ~/django_projects/myproject, and ran the following command: svn import svn+ssh://[email protected]/path/to/svn/repo. The result was a whole bunch of files that were added.

Then I modified a couple of files and tried to do a check in: svn ci.

That command gave the following error message: svn: 'path/to/svn/repo' is not a working copy.

What did I do wrong? How do I get my stuff checked into SVN so that I can do proper version control?

2 Answers 2

2

This is because svn import doesn't create a working copy. To fix this, perform these steps:

  • first back up your modified files, just in case.
  • Run svn co --force svn+ssh://[email protected]/path/to/svn/repo/path/to/import /path/to/wc where path/to/wc is the root where you want to create your working copy. This checks out the path in the repository to the path you specify as working copy location. The --force parameter will continue checking out even if file present in the repository are already in the working copy. It will not overwrite them
  • Run svn status /path/to/wc to verify the files indicates as modified are the ones you meant to change
  • Run svn ci
Sign up to request clarification or add additional context in comments.

2 Comments

Small point of confusion, the remote svn repository has a different name than the local directory. SVN Co wants to build a local directory with the same name as the repository. Can you make svn co to a custom or existing directory name?
Synopsis svn checkout URL... [PATH] Description Check out a working copy from a repository. If PATH is omitted, the basename of the URL will be used as the destination. If multiple URLs are given each will be checked out into a subdirectory of PATH, with the name of the subdirectory being the basename of the URL.
0

The hint is in the spec: After importing data, note that the original tree is not under version control. To start working, you still need to svn checkout a fresh working copy of the tree.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.