How to install older version(1.6.18) svn on MAC - macos

The MAC provide the #1.7.10 SVN client, but my project is using #1.6.18 SVN.
So that I received the error message "Working copy is too old (format 10, created by Subversion 1.6)"
Current I CANNOT upgrade my project svn version. So I think the only way for me is re-install the older version SVN. (please kindly advise me if there is better solution)
And my questions are:
Can I use the #1.7 SVN client on #1.6 SVN working copy? IF NO
How can I uninstall older SVN and re-install older version SVN?
Thanks for your help.

There's no problem using version 1.7.10 even if your server is 1.6.8. What you shouldn't do is share working copies between systems. There is no guarantee that one Subversion client will use the same working copy format as another. For example, some Windows clients use _svn directories instead of .svn directories -- especially for VisualStudio development.
For the longest time, most clients used the default Subversion client format that has pretty much remained unchanged until the 1.7 client. In that client, the .svn folders found in each directory were removed to have just a single .svn folder in the root of the directory. This makes the 1.7 command line client working copy incompatible with the earlier formats.
You never explained how your Mac has a 1.6.8 working copy on it. Is it that you have some sort of GUI client on your Mac that is using the older format, or do you have a share that you use on two different systems. If you're doing the latter, don't. Check out a separate working copy on each system.
If you need to share changes between working copy without doing a commit, use the svn diff command to create a patch file. Then use svn patch to apply this patch file to the other working copy.

A 1.7 client can work on a 1.6 WC after you execute svn upgrade. After that event, 1.6 clients will not be able to use that working copy.
You can install another version of SVN to a non-default path, and either put that path earlier in your $PATH environment variable, or specify the full path to the binary each time you use it (if you go this route, you can create an alias in your shell to simplify it, but be careful as you might get confused as to which svn is which)

Install the older version in a location on your path that is either higher than the default implementation.
i.e. svn is installed in /usr/bin/ by default (as I can see on my system) but usr/local/bin is higher in my PATH, so if I were to do this I would install the older version in usr/local/bin

There is another way. You can rollback from 1.7 (should work on Mavericks) to 1.6.
Save your existing 1.7 install to another folder
sudo mv /usr/bin/svn* ~/Documents/svn_1.7
Install XCode and symlink the 1.6 version from there
/Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svn /usr/bin/svn
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svnadmin /usr/bin/svnadmin
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svndumpfilter /usr/bin/svndumpfilter
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svnlook /usr/bin/svnlook
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svnserve /usr/bin/svnserve
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svnsync /usr/bin/svnsync
sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/subversion-1.6/bin/svnversion /usr/bin/svnversion
Voila!

Related

cvs no longer works on mac os x sierra from remote terminal

After updating to mac os x sierra my cvs (yes I am still using cvs) repository is no longer accessible from remote computer. I can still access the cvs commands on local machine using terminal window, using:
CVSROOT=/usr/local/cvsrep
although if I define the cvs variables with
export CVS_RSH=ssh
export CVSROOT=:ext:twarren#tw-imac.local/usr/local/cvsrep
it also does not work, giving error message:
tw-imac:testcvs twarren$ cvs version
Client: Concurrent Versions System (CVS) 1.12.13 (client/server)
Password:
bash: cvs: command not found
The cvs program is installed in /usr/local/bin (which is on the PATH). It is the old version of cvs that used to come with mac os x and has worked fine with newer versions of mac os x until sierra.
I've just faced this same issue.
ie, remote cvs checkouts don't work.
ie, cvs -z3 -d:ext:<user>#<cvs-server-ip>:<CVSROOT> co -P -r <REVISION> <MODULE> results in cvs: bad command
There are three problems,
cvs was removed back in 10.9
cvs over ssh relies on the sshd PATH support, which is hard-coded
/usr/bin is rootless, ie read-only.
You solve the first problem by installing cvs with homebrew
Install homebrew see: https://brew.sh
then brew install cvs
The next problem, is that when you try to run cvs:ext, you find the PATH is not right, this can be tested like so:
ssh <user>#cvs-sever-ip env | grep PATH
You will see, PATH=/usr/bin:/bin:/usr/sbin:/sbin, which is the sshd non-interactive hard-coded path. For non-interactive ssh, as used by CVS to access the homebrew cvs install (installed into `/usr/local/bin/cvs) you need to add /usr/local/bin to the sshd path. AFAICT this can't be done... non-trivially... as such, the best solution is to make a sybolic link in the /usr/bin directory.
sudo ln -s /usr/local/bin/cvs /usr/bin/cvs
Which leads to the third problem. It doesn't work, because /usr/bin is rootless... and thus read-only.
You could disable rootless mode in recovery mode... and then do it, and then re-enable it.
But the simplest solution is to reboot into Recovery mode, enter the terminal, then cd /Volumes, then navigate to the the /usr/bin directory on your boot volume, ie cd /Volumes/<bootvolume>/usr/bin
then run the command:
ln -s /usr/local/bin/cvs cvs
This will create a symbolic link from /usr/bin/cvs -> /usr/local/bin/cvs
Reboot back to your OS, and that should fix it.
You can verify this with
ssh <user>#<cvs-server-ip> which cvs
which should return :
/usr/bin/cvs
And now your remote cvs checkouts should work...
so I found a way to get cvs to work on sierra. The problem seemed to be that the /usr/local/bin directory was no longer on the path of the shell started by ssh. So the solution consisted of copying the cvs executable to /usr/bin
However, in order to accomplish this on Sierra I had to temporarily disable SIP. This was done by:
reboot with recovery mode
run terminal utility
execute: csrutil disable
reboot
Then I could copy the cvs program. After verifying that it worked properly, I repeated the steps 1-4, except using: csrutil enable in step 3.
NOTE: there will probably be cases where updates to Sierra might replace /usr/bin contents, so it's possible that this process will need to be repeated after updates. To aid in this, I copied the cvs module rather than moving it, so it will still be available in its old location.
NOTE 2: I agree with those who recommend using git rather than cvs and will do that with all new projects. In addition I will eventually also convert existing projects to git where feasible, but am glad that I can still use cvs as before Sierra.

Updating Git from Version 1.9.0 to 2.2.1

My console recently made me aware that the git version I have installed on my Mac has various security flaws and I was advised to upgrade.
I don't know how to use homebrew so I have gone for an easier option. I was recommended to download the following installed by git-scm.com
http://sourceforge.net/projects/git-osx-installer/?source=typ_redirect
I have installed the package but my terminal still shows:
MacBook-Pro-3:~ mruser$ git --version
git version 1.9.0
MacBook-Pro-3:~ mruser$ which git
/usr/local/bin/git
I have noticed that this version is in the /bin/ folder, which may be the problem? Since the other version installs in the /local/ folder.
How do I remove the old git version 1.9.0 so I can successfully install the new version? (without affecting any of the applications I'm working on)
Thanks for having a look and for any input!
The Git in /usr/local (presumably 1.9.0) is shadowing the new release. To determine which program to use, your shell looks through a list of directories stored in your PATH environment variable. You can see it with echo $PATH. Generally /usr/local/bin comes before /usr/bin so you can use newer versions of software without overwriting the system supplied ones.
You need to remove the old version from /usr/local. How you do this depends on where you got Git 1.9.0. If it has an uninstaller, use it. If it doesn't, you can look through /usr/local and delete anything with "git" in it, that will probably be safe.
In the future, use a package manager like Homebrew or Macports. They will track what you have installed and make it much easier to upgrade them.

Installed git 1.8.4.2 on Mac, but git --version reports 1.8.3.4

I downloaded the latest version of git - 1.8.4.2 - from git-scm.com/download/mac
After I installed it, if I enter git --version in a terminal window, the version is reported as 1.8.3.4.
I ran the uninstall script for both version, but git continues to report 1.8.3.4 on my system.
I'd like to:
Delete git entirely from my system and
install the latest version from the URL above.
Can someone let me know the best way to do this?
Rather than removing system binaries (why would you want to do that?) you should do one of two things:
Check your $PATH and ensure that things you install have a higher position in the $PATH than the system defaults,
Move /usr/bin/git to /usr/bin/git-1.8.3.4, then symlink the one from /usr/local/bin to /usr/bin/git.
Both of these will allow you to keep both versions in such a way you can choose which to run (providing full path, for example), while also making the most recent install the default.
As an aside, if you've installed from source yourself, I'd recommend building the binary with the version number either in the path or in the binary name (/usr/local/git/1.8.4.2/bin). If you're aiming to keep git up-to-date, this will probably save you some hassle down the track when you're installing for the nth time.
If you're on a mac, check out homebrew, too - the latest git is 1.8.4.3, so it appears up-to-date.

The working copy requires a newer version of Subversion than Xcode supports

I just installed Xcode 4.6 (I had Xcode 4.5.1). I just opened an existing project and got this message:
The working copy "path/to/my project" requires a newer version of Subversion than Xcode supports.
I am currently using Cornerstone for svn, and understand that I can probably ignore this message - but since I want to be up-to-date, what do I need to do to resolve this issue?
The Xcode 4.6 default use the SVN 1.6.X, but you project's SVN info maybe 1.7.X (That may update by Cornerstone). As a result, when you try to update, the error message'll show. So we have to let the Xcode use the latest 1.7.X SVN.
I also met the same problem. That's my solution:
Install the Homebrew, we'll use it to install the latest SVN:
ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
install the latest SVN:
brew install subversion
Backup the old SVN file and link the latest SVN:
cd /Applications/Xcode.app/Contents/Developer/usr/bin/
mkdir bak.svn
mv svn* bak.svn
ln -s /usr/local/Cellar/subversion/1.7.8/bin/svn* /Applications/Xcode.app/Contents/Developer/usr/bin/
Restart Xcode
In my case, the latest SVN placed at path /usr/bin/, therefore the step 3 will look like this:
cd /Applications/Xcode.app/Contents/Developer/usr/bin/
mkdir bak.svn
mv svn* bak.svn
ln -s /usr/bin/svn* /Applications/Xcode.app/Contents/Developer/usr/bin/

Install Git separately from Xcode

Firstly apologies if this is a really simple question but Git is absolutely brand new to me. Basically I've been dabbling with a bit of iOS development for a little while and now have a project idea that I want to start working on and for the first time I'm planning on putting this into source control.
Now I know Xcode 4 has some Git integration but I've spotted a couple of posts that suggest the integration isn't that great and it's better to do it the command line way.
So, I've been following instructions here http://git-scm.com/book/en/Getting-Started-Installing-Git and I've downloaded version 1.7.10.3 for Mac and ran the install.
However when I run git --version I get version 1.7.4.4 which is the version that was installed with Xcode I assume?
My question is, how do I make use of my new version 1.7.10.3? The plan is to learn to use Git via command tools and set up a central repository on a server I have at home, then have local copies on my laptop.
As I say I'm really new to this, so a quick step by step idiots guide would be helpful. I have searched and tried to find details here and on google but other than the suggestion to use Git outside of Xcode I've not found out exactly how to do it.
Any advice, or links to a decent tutorial that covers this would be very much appreciated.
Update:
I've changed the path to the new path in .bash_profile (/usr/local/git/bin) and now get git version 1.7.7.5 (Apple Git-26). This still appears to be the wrong version (although this could be me being dense). I downloaded the installer for OSX from the above link. Should I be doing something else. I want to play around with the command line tools so I can get a proper understanding
Update 2:
I'm now also trying MacPorts as recommended in the article. This seems to be downloading a lot more than just Git though
Xcode installs git in /Applications/Xcode.app/... but if you run 'Install Command Tools' then git gets installed also in /usr/bin/git. Xcode uses its private version in Xcode.app. If you installed git in /usr/local/git/bin then you need to include that directory in your PATH. You should have a .bashrc file (or equivalent for whatever shell you are using). Add
PATH=/usr/local/git/bin:$PATH # your shell might use different syntax.
to that file 'rc' file.
Also, note that Xcode would allow you to accomplish your goal of setting up a remote at home while maintaining a local copy on your laptop. Go to the Xcode 'organizer' and click 'repositories'. There you will find all your machine's Git repositories. Choose one, select the 'remotes' folder and then '+' to add your home remote. I use Xcode this way.
Credits goes to #GoZoner for the answer. I'm just summing up everything.
Download official git installer from : http://git-scm.com/download/mac
Install and add its directory to your path :
echo "PATH=/usr/local/git/bin:\$PATH" >> ~/.bash_profile
source ~/.bash_profile
The best way is:
step 1:
Install homebrew on your mac this is the official website Homebrew homepage
From a Terminal prompt:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
step 2:
From a terminal prompt
brew install git

Resources