|
From: | Peter Teeson |
Subject: | Notes about git-svn source control in macOS |
Date: | Fri, 26 Mar 2021 13:49:16 -0400 |
Hi Jürgen: Hope the following can be useful and perhaps even remove the extra maintenance burden of git. I don’t understand enough about the various configure files (.ac, .sub, etc etc) etc to modify buildtag myself. respect Peter For macOS users TL:DNR // download svn repo using git clone Gandalf:~ pteeson$ git svn clone --preserve-empty-dirs -r HEAD https://svn.savannah.gnu.org/svn/apl/trunk > git-log 2>&1 // for build tag script mods // Are we on macOS and which version Gandalf:trunk-git pteeson$ sw_vers |grep "ProductName" ProductName: Mac OS X Gandalf:trunk-git pteeson$ sw_vers | grep "ProductVersion" ProductVersion: 10.14.6 // which svn Gandalf:trunk-git pteeson$ git svn info | grep "Revision:" Revision: 1440 Details Because Apple no longer distributes svn as part of its Developer tools (Xcode and Command Line Tools) macOS users should use git or take responsibility for installing svn. Of course this is not a big deal. But for those who wish to use Apple’s tools I have been doing some deep diving over the last many days and learned a few things. (1) Compare downloading the GNU APL repository using svn vs git Gandalf:~ pteeson$ svn co http://svn.savannah.gnu.org/svn/apl/trunk > svn-log 2>&1 Gandalf:~ pteeson$ git svn clone --preserve-empty-dirs -r HEAD https://svn.savannah.gnu.org/svn/apl/trunk > git-log 2>&1 git notes: (a) if you do not specify the -r HEAD option you will be downloading all 1440 svns. This is usually NOT what you want! You really only want the latest svn, in this example 1440. (b) If you do not use --preserve-empty-dirs you will not be happy - ask Jürgen for the details. (c) It’s not reasonable to diff download logs because the order in which the files are gathered is Heisenberged. Unless you want to sort them both - but why bother. (d) However comparing the respective ./confire logs shows only 3 differences 2 of them are the respective names of the download dirs: trunk-git vs trunk-svn 1 from the git ./configure —— *** current directory is not a svn checkout: keeping old buildtag. But see item (2) below. Credit to John Helm for discovering this. The good news is that it seems possible to lighten Jürgens maintenance load by eliminating the git server and use the svn URL. and git clone with the added options indicated above. See <https://git-scm.com/docs/git-svn> where the above options are documented. (2) The git./configure issue requires some mods to the buildtag script. But it’s encouraging to compare the svn info vs the git svn info. (see git-svn documentation) Gandalf:~ pteeson$ cd /Users/pteeson/Desktop/trunk-svn Gandalf:~ pteeson$ cd /Users/pteeson/Desktop/trunk-git Gandalf:trunk-svn pteeson$ svn info Gandalf:trunk-git pteeson$ git svn info Path: . Path: . Working Copy Root Path: /Users/pteeson/Desktop/trunk-svn Relative URL: ^/trunk Repository Root: http://svn.savannah.gnu.org/svn/apl Repository Root: https://svn.savannah.gnu.org/svn/apl Repository UUID: bd74f7bd-1a55-4bac-9fab-68015b139e80 Repository UUID: bd74f7bd-1a55-4bac-9fab-68015b139e80 Revision: 1440 Revision: 1440 Node Kind: directory Node Kind: directory Schedule: normal Schedule: normal Last Changed Author: j_sauermann Last Changed Author: j_sauermann Last Changed Rev: 1440 Last Changed Rev: 1440 Last Changed Date: 2021-02-26 10:54:15 -0500 (Fri, 26 Feb 2021) Last Changed Date: 2021-02-26 10:54:15 -0500 (Fri, 26 Feb 2021) (3) buildtag script mods. In Terminal bash/vsh we can use sw_vers to give us this information for mods to builtags: Gandalf:trunk-git pteeson$ sw_vers |grep "ProductName" ProductName: Mac OS X Gandalf:trunk-git pteeson$ sw_vers | grep "ProductVersion" ProductVersion: 10.14.6 Together with git svn info Gandalf:trunk-git pteeson$ git svn info | grep "Revision:" Revision: 1440 HTH |
[Prev in Thread] | Current Thread | [Next in Thread] |