开发者

"SVN import" imports the content of the project, not the folder

I am trying to开发者_如何学Python import a project (aProject) into the SVN. When I typed this command:

svn import aProject https://.../lamostreta

it imported the content of the aProject, not the aProject folder as a whole. How can I add aProject into SVN repository as a whole?

Thanks in advance for your answers.


This is cause Subversion will assume that you would import the contents of the aProject folder into the folder (lamostreta) in the repository. If you like to have the same folder in your repository you have to give this on command line:

   svn import aProject URL/aProject/trunk -m "- First import."

Furthermore usually you should give a supplemental folder folder like trunk as target in the repository instead of a bare project name (folder name) like:

   svn import aProject URL/aProject -m "- First import."


The way I have always solved this issue was to simple create a temporary folder, move the folder I wanted to version into it, and then run the svn import.

mkdir temp
mv aProject temp
svn import temp https://..../repos/repo
mv temp/aProject .
rmdir temp

This should take care of it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜