问题
This is my first time trying to use any SCM so please bear with me.
Following the SVN manual, I create a repo in an empty directory. All good.
Then I try to import an existing project folder. I'm using the shell command but it's like this:
Import C:\Users\aaa\SVN\proj to file:///C:/proj_2
Unable to open an ra_local session to URL
Unable to open repository 'file:///C:/proj_2'
Finished!
I'm probably doing something very incorrectly. Thanks.
回答1:
This is a quick and dirty trick but you can use TurtoiseSVN, browse the local repository, create a remote folder and check it out into the directory you wan to import.
After that, you only have to select the local folder, right-click and select "check-in" to commit your local files.
Additionally with TurtoiseSVN's repo-browser you will be able to see the real location of your repository.
回答2:
Does the directory c:\proj_2 exist and contain a svn repository?
If not, you'll need to initialize the repository first by:
- create the folder c:\proj_2
- right-click the folder -> TortoiseSVN -> Create Repository Here
The retry your import as above.
Alternately, if you want all your projects in a single repository:
- create c:\svn-repos the same way as above
- import to svn URL file:///c:/svn-repos/proj_2 -- the import operation will create the proj_2 sub-folder in the repository and add your file to it
来源:https://stackoverflow.com/questions/1773719/importing-local-file-dir-into-svn-repo-with-tortoisesvn