Importing local file dir into SVN repo with TortoiseSVN

旧城冷巷雨未停 提交于 2020-01-14 03:21:10

问题


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:

  1. create the folder c:\proj_2
  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:

  1. create c:\svn-repos the same way as above
  2. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!