Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upload an Android studio project to Subversion for first time

I have a local project on disk and I'd like to upload it to subversion for first time. We usually use TortoiseSVN (or subeclipse plugin back in the day), but now we'd like to do it directly from Android Studio.

My local project is: C:\\ParentDir\ProjectDir

Inside that folder there are the usual directories: .gradle, .idea, app, etc.

Id like to upload it to a repo I've just created in the svn server:
svn://serverip/parentdir

The final repo folder structure should look like this:

  • svn://serverip/parentdir/ProjectDir/branches
  • svn://serverip/parentdir/ProjectDir/tags
  • svn://serverip/parentdir/ProjectDir/trunk

I can upload the project successfully by manually creating the ProjectDir/trunk folder in the svn repository and then selecting "VCS -> Import into version control -> Import into subversion". (BTW, what a confusing name, it should have been called "export to version control" instead). But then the project remains unversioned. Apparently this operation is meant to upload only once with or without version control enabled.

So next thing I tried was "VCS -> Import into version control -> Share project (subversion)". This creates the ProjectDir folder in the server, and also the trunk, tags and branches subfolders. The project is correctly uploaded but it gives me an error at the end:

*C:\\ParentDir is not a working copy*

After this, every file in the project appears as unversioned (red), and the changelist is empty even after changing some files.

It does not make sense to me that after enabling VCS for the whole project I need to manually add every file or folder one by one. Something must have gone wrong due to this error.

What could be the problem? Is there a safe sequence of operations to upload a project for first time?

like image 365
Mister Smith Avatar asked Oct 28 '15 09:10

Mister Smith


People also ask

How do I upload a project to SVN repository?

To import a project into the repository, right click the project you want to import and select Team > Share Project... from the context menu. This will begin the Share Project wizard. Select SVN as the repository type and click Next.


1 Answers

The solution was to use "VCS -> Import into version control -> Share project (subversion)" and select 1.6 format in the dialog. I was using 1.7 format at first and it didn't work.

like image 105
Mister Smith Avatar answered Oct 04 '22 16:10

Mister Smith