Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to commit changes after SVN import?

Tags:

svn

I've created a project, and used svn import. Now I'd like to commit a change to files, how to do that?

I have empty ~/.workspace/project/.svn/entries.

If I try svn commit I get this:

$ svn commit src/dat/Win.java
svn: '/home/st/.workspace/dat/src/dat' is not a working copy
svn: Can't open file '/home/st/.workspace/dat/src/dat/.svn/entries': No such file or 

directory

… or just svn commit:

$ svn commit
svn: Can't read file '/home/st/.workspace/dat/.svn/entries': End of file found
like image 343
feiroox Avatar asked May 03 '09 20:05

feiroox


3 Answers

svn import commit an unversioned file to a repository (on a remote host presumably). After you've done this you need to checkout the repository to you own machine as working copy using

svn checkout http://some.repository.net/trunk/ /my/local/path/to/workingcopy

which will checkout trunk from the repo to your machine to folder /my/local/path/to/workingcopy. Make changed and then do.

svn commit -m "A comment telling what you did the which file"

or if you added some files to the working copy do:

svn add /path/to/file /path/to/otherfile

or

svn add /path/to/dir --force

which will add everything in the directory and all of it's subdirectories to the working copy, and finally

svn commit -m "who did what why"
like image 105
Matti Lyra Avatar answered Oct 21 '22 13:10

Matti Lyra


Before committing, you need to checkout a fresh copy of the just imported files. Delete (or rename) you're project directory, and do svn checkout [REPOSPATH]. Then you have a working copy. After you change a file in you're working copy, you can use svn commit.

See Getting Data into your Repository in the SVN Book.

like image 45
rincewind Avatar answered Oct 21 '22 13:10

rincewind


You cannot commit changes without checking out a local copy of the repository first.

  1. Check out the repository into a local directory using:

    svn checkout file:///path/to/repo
    
  2. make changes.
  3. Run the following to submit your changes:

    svn commit
    
like image 2
Ayman Hourieh Avatar answered Oct 21 '22 15:10

Ayman Hourieh