Hoping someone can help with this...
I downloaded SmartSVN and opened a working copy (Android project) in it. It asked me to upgrade the working copy to 1.8.
This causes me no problems while using the svn client. However I did need to upgrade my command line svn client (Running OSX Yosemite).
Now when I type svn --version on the command line it is pointing at version 1.8... Bonus!
However, in Android Studio, when I run assembleProductionRelease, I have a stage which runs svn info and extras the revision number.
This is the code
def getSvnRevision() {
new ByteArrayOutputStream().withStream { os ->
def result = exec {
executable = 'svn'
args = ['info']
standardOutput = os
}
def outputAsString = os.toString()
def matchLastChangedRev = outputAsString =~ /Last Changed Rev: (\d+)/
return "${matchLastChangedRev[0][1]}"
}
}
This doesn't run anymore and reports;
svn: E155021: This client is too old to work with the working copy at xxx
EDIT I have also amended the path in Preferences -> Version Control -> Subversion which is called 'Use command line client' to point at the svn file in the correct path.
I have also invalidated cache in Android studio to see if that helped, still no luck.
After Hours of searches I've finally found a solution for Mac OsX (I've got Yosemite, but I think it's the same for other versions of OSx).
It's all explained in this link: http://andowebsit.es/blog/noteslog.com/post/how-to-upgrade-subversion-on-osx/
Edit: here the solution in case the link expires
First, you have to be sure that the installed version of the SVN Client is 1.8 using svn --version. The result should be similar to this:
svn --version
svn, version 1.8.13 (r1667537)
compiled Jun 5 2015, 19:21:21 on x86_64-apple-darwin14.3.0
If your svn version is not 1.8, use brew to install the new version of subversion.
Then in order to get the correct path of the svn executable you have to use the which command:
which -a svn
/usr/bin/svn
/usr/local/bin/svn
Finally go to Android Studio Preferences -> Version Control -> Subversion and put the /usr/local/bin/svn string in the Use command line client option.
There is default SVN of Android Studio in Mac, that locate at /usr/bin/svn
. Until now, it still version 1.7
, but most of SVN client (such as SmartSVN) use 1.8
that locate at /usr/local/bin/svn
.
To fix for your Android Studio, you can change from Preferences -> Version Control -> Subversion
and set the path /usr/local/bin/svn
.
To make sure which SVN is chosen by your command line, just type which svn
, it will show full path of svn
command is pointed to. You should change to there.
Hope this help.
Update 04/19/2016
I share screenshot:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With