[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] (no subject)
From: |
Greg Chicares |
Subject: |
[lmi-commits] (no subject) |
Date: |
Thu, 26 May 2016 19:41:10 +0000 (UTC) |
branch: master
commit 0798ad3441085c44307b593001d5e3a2d89fed8f
Author: Gregory W. Chicares <address@hidden>
Date: Thu May 26 19:40:27 2016 +0000
Update documentation from svn to git
---
gwc/develop0.txt | 49 +++++++++++++++++---------------------
gwc/develop1.txt | 70 +++++++++++++++++++-----------------------------------
gwc/develop2.txt | 55 ++++++++++++++++++++++++++++--------------
3 files changed, 83 insertions(+), 91 deletions(-)
diff --git a/gwc/develop0.txt b/gwc/develop0.txt
index 4af409e..5c2b165 100644
--- a/gwc/develop0.txt
+++ b/gwc/develop0.txt
@@ -92,7 +92,7 @@ EOF
# Configure ssh
# Create new credentials if necessary, if not copied elsewhence
- # (replace my address with yours of course)
+ # (replace my address with yours, of course)
echo "Protocol 2" > ~/.ssh/config
ssh-keygen -t rsa -b 4096 -C "address@hidden"
# and register key here:
@@ -122,42 +122,46 @@ ssh-add ~/.ssh/id_rsa
# If you see the following:
-The authenticity of host 'svn.savannah.nongnu.org (140.186.70.72)' can't be
established.
+The authenticity of host 'git.savannah.nongnu.org (140.186.70.72)' can't be
established.
RSA key fingerprint is 80:5a:b0:0c:ec:93:66:29:49:7e:04:2b:fd:ba:2c:d5.
+ # ...or...
+RSA key fingerprint is SHA256:FYkx0iik+iBeCLRzvUyUSTRT98TEBBJoYuQsTXbyGL8.
Are you sure you want to continue connecting (yes/no)?
# then answer 'yes' after verifying that the fingerprint matches exactly:
# http://savannah.gnu.org/maintenance/SshAccess
# to preclude a man-in-the-middle attack (you may be asked more than once)
+ #
+ # Alternatively, both md5 and sha256 fingerprints can be verified thus:
+
+ssh-keyscan git.sv.gnu.org > eraseme_key.pub
+ssh-keygen -l -f eraseme_key.pub
+ssh-keygen -l -f eraseme_key.pub -E md5
# Similarly, try to access this URL:
https://savannah.gnu.org/
# and follow the instructions here if needed:
http://savannah.gnu.org/tls/tutorial/
- # Initialize svn
+ # Configure git (replace my name and address with yours, of course)
-svn --help >/dev/null 2>&1
-
-sed -i ~/.subversion/config \
- -e'/[[]miscellany[]]/s/$/\nuse-commit-times = yes\nenable-auto-props = yes/'
\
- -e'/[[]auto-props[]]/s/$/\n* = svn:keywords=Id/'
+git config --global user.name "Gregory W. Chicares"
+git config --global user.email address@hidden
# Mirror online repositories
#
- # 'install_cygwin.bat' already mounted /lmi/
+ # ['install_cygwin.bat' already mounted a /lmi/ directory]
mkdir --parents /lmi/mirror
cd /lmi/mirror
-svn checkout http://svn.savannah.nongnu.org/svn/lmi/lmi/trunk lmi
-svn checkout http://svn.savannah.nongnu.org/svn/lmi/skeleton/trunk skeleton
+git clone git://git.savannah.nongnu.org/lmi.git
# All savannah webpages are on a cvs-only server
# Use a subdirectory to avoid conflict on name 'lmi'
#
# If you're behind a draconian corporate firewall, you may need to
- # use your ssh credentials instead of 'pserver' (cf. code below that
- # creates a local working copy)
+ # use your ssh credentials instead of 'pserver' (cf. commands below
+ # that create a local working copy)
mkdir --parents /lmi/mirror/web
cd /lmi/mirror/web
@@ -169,7 +173,6 @@ cvs -z3 -d:pserver:address@hidden:/web/lmi checkout lmi
# All savannah webpages are on a cvs-only server
# Use a subdirectory to avoid conflict on name 'lmi'
- # Handle cvs first--cvs has better error messages than svn
mkdir --parents /lmi/src/web
cd /lmi/src/web
@@ -177,25 +180,17 @@ export CVS_RSH="ssh"
export CVSROOT="address@hidden:/web/lmi"
cvs -z3 checkout lmi
- # For svn, nothing like $CVS_RSH or $CVSROOT is needed: that
- # information is embedded in the working copy.
- #
- # The syntax varies among protocols:
- # svn checkout http://
svn.savannah.nongnu.org/svn/lmi/lmi/trunk lmi
- # svn checkout svn:// svn.savannah.nongnu.org
/lmi/lmi/trunk lmi
- # svn checkout svn+ssh://address@hidden /lmi/lmi/trunk lmi
+ # For git, nothing like $CVS_RSH or $CVSROOT is needed: that
+ # information is embedded in .git/config .
mkdir --parents /lmi/src
cd /lmi/src
-svn checkout svn+ssh://address@hidden/lmi/lmi/trunk lmi
+git clone address@hidden:/srv/git/lmi.git
# [anticipate a "fingerprint" message here the first time]
-pushd lmi; svn propset svn:keywords "Id" . --recursive; popd
-svn checkout svn+ssh://address@hidden/lmi/skeleton/trunk skeleton
-pushd skeleton; svn propset svn:keywords "Id" . --recursive; popd
# Copy proprietary test data
- # contents: most recent archive, or working copy of proprietary svn
+ # contents: most recent archive, or proprietary repo
mkdir --parents /opt/lmi/test
cp --preserve /archive/lmi/testdecks/* /opt/lmi/test
@@ -205,7 +200,7 @@ cp --preserve /archive/lmi/touchstone/* /opt/lmi/touchstone
# Copy proprietary products
- # contents: most recent archive, or working copy of proprietary svn
+ # contents: most recent archive, or proprietary repo
mkdir --parents /lmi/src/products/src
cp --preserve /archive/lmi/src/products/src/* /lmi/src/products/src
diff --git a/gwc/develop1.txt b/gwc/develop1.txt
index 674483d..09e74e7 100644
--- a/gwc/develop1.txt
+++ b/gwc/develop1.txt
@@ -23,9 +23,11 @@ ssh-add -D
ssh-agent -k > /dev/null 2>&1
# In between...
- # ...commit a change
+ # ...commit and push changes to git
-svn commit -m "Modify foo" foo.cpp
+git commit one_file another_file -m"One set of changes"
+git commit --all -m"Another set of changes"
+git push
# ...commit a change to cvs repository
@@ -33,76 +35,52 @@ export CVS_RSH="ssh"
export CVSROOT="{USER}{AT_SIGN}cvs.sv.gnu.org:/web/lmi"
cvs commit -m "Modify foo webpage" bar.html
- # ...rename a file [pending--resolved at next 'commit', as for 'add']
- # [for cvs, add and delete--unlike svn, not an atomic operation]
+ # ...rename a file
+ # [for git, prefer to rename a file without changing its contents]
+ # [for cvs, add the new and delete the old]
-svn mv lmi.rc lmi_msw_res.rc
-svn commit -m"Rename msw resource file" lmi_msw_res.rc lmi.rc
-
- # ...merge two files together, deleting the unwanted one
-
-svn remove dbdict.cpp
-svn mv ihs_dbdict.cpp dbdict.cpp
+git mv lmi.rc lmi_msw_res.rc
# Make a patch against repository from local tree
-svn diff file0.cpp file1.cpp >/dev/clipboard
+git diff file0.cpp file1.cpp >/dev/clipboard
cvs diff -U3 file0.cpp file1.cpp >/dev/clipboard
# Roll a file back to an earlier revision
-svn merge -r HEAD:5141 census_view.cpp
-
- # Make a list of files modified in local tree,
- # suitable for pasting into 'ChangeLog'
-
-for z in *; do [ ! -d $z ] && [ $z -nt ../../mirror/lmi/$z ] && echo " $z";
done >> /dev/clipboard
+git checkout [sha1sum] census_view.cpp
+git checkout HEAD^ census_view.cpp
- # Update the local source tree (where I make my own changes)
- # when someone else has committed a change.
+ # Update the local source tree (where I make my own changes) when
+ # someone else has committed a change to the online master repo.
-svn status --show-updates
-svn update
+git remote -v update
+git pull
- # Set local timestamps to match repository
+ # Set local timestamps from RCS Id's, to match repository
# (this should be necessary only if your clock is unsynchronized)
#
# This is slow, so consider specifying the names of changed files
# instead of using '*' at the beginning
#
- # ...for svn:
-
-for z in * ; do grep --directories=skip --quiet --files-with-matches '$Id:' $z
&& touch "--date=$(<$z sed -e'/$Id:/!d' |sed -e's/^.* [0-9][0-9]*
\([0-9]\{4\}[-0-9: ]*\).*$/\1/')" $z && date -u +'%Y%m%dT%H%MZ' -r $z; done;
-
# ...for cvs:
for z in * ; do grep --directories=skip --quiet --files-with-matches '$Id:' $z
&& touch "--date=$(<$z sed -e'/$Id:/!d' |sed -e's/^.*\([0-9]\{4\}[0-9\/: ]*\)
.*$/\1/')" $z && date -u +'%Y%m%dT%H%MZ' -r $z; done;
- # If svn wrongly guesses that a file is binary, as indicated by
- # "(bin)" here...
-
-svn add sort_cell_subelements.xsl
-A (bin) sort_cell_subelements.xsl
-
- # ...fix it by removing mime-type:
+ # If msw sets an incorrect executable bit, and you accidentally
+ # commit it (without first running 'make check_concinnity', which
+ # would catch the error), fix it thus:
-svn proplist sort_cell_subelements.xsl
-Properties on 'sort_cell_subelements.xsl':
- svn:mime-type
- svn:keywords
-svn propdel svn:mime-type sort_cell_subelements.xsl
-property 'svn:mime-type' deleted from 'sort_cell_subelements.xsl'.
-svn proplist sort_cell_subelements.xsl
-Properties on 'sort_cell_subelements.xsl':
- svn:keywords
+git update-index --chmod=+x some-file-name
+git update-index --chmod=-x some-file-name
# Second screen: only for updating local shadow copy of repository
#
# I use the last line repeatedly to keep my local shadow copy current
cd /lmi/mirror/lmi
-svn status --show-updates
-svn update
+git remote -v update
+git pull
# Similarly, for webpages repository
@@ -155,7 +133,7 @@ cd /lmi/src/lmi
make $coefficiency check_concinnity >../log 2>&1
sed -f diagnostics.sed ../log 2>&1 |less -S
- # Copy date to clipboard for pasting into 'ChangeLog'
+ # Copy date to clipboard for pasting
date -u +'%Y%m%dT%H%MZ' |tr -d '\n' >/dev/clipboard
diff --git a/gwc/develop2.txt b/gwc/develop2.txt
index 5f712b4..3180262 100644
--- a/gwc/develop2.txt
+++ b/gwc/develop2.txt
@@ -1,28 +1,47 @@
# Work with proprietary repository (prerequisite: 'develop0')
+ #
+ # Discussed in detail here:
+ # http://lists.nongnu.org/archive/html/lmi/2016-03/msg00031.html
- # Create a brand-new repository
+ # Initial setup: create a working copy, cloned from the
+ # already-provided "blessed" repo
-svnadmin create /lmi/src/products/src/repository
-svn import /lmi/src/products/src/clean-src
file:///lmi/src/products/src/repository/src -m "Initial import"
-svn import /lmi/src/products/src/clean-data
file:///lmi/src/products/src/repository/data -m "Initial import"
-svnadmin verify /lmi/src/products/src/repository
-mkdir /lmi/src/products/src/tmp/working_copy
-cd /lmi/src/products/src/tmp/working_copy
-svn checkout file:///lmi/src/products/src/repository
+cd /opt/lmi
+git clone file:///opt/lmi/blessed/proprietary
- # Check out a working copy
+ # Create a bundle to share by email
-svnadmin verify /lmi/src/products/src/repository-20120403T1557Z/repository
-mkdir /lmi/src/products/src/tmp/working_copy_tmp_20120403
-cd /lmi/src/products/src/tmp/working_copy_tmp_20120403
-svn checkout file:///lmi/src/products/src/repository-20120403T1557Z/repository
+ # Make some changes, then test concinnity (before every commit)
- # Test concinnity (before every commit)
- # (rerun after committing changes in test/ to regenerate 'md5sums',
- # because committing files with an RCS Id changes their contents)
-
-cd repository/data/
+cd /opt/lmi/proprietary/data/
cd ../data; make src_dir=/lmi/src/lmi -f /lmi/src/lmi/GNUmakefile
check_concinnity 2>&1 |less -S
cd ../src ; make src_dir=/lmi/src/lmi -f /lmi/src/lmi/GNUmakefile
check_concinnity 2>&1 |less -S
cd ../test; make src_dir=/lmi/src/lmi -f /lmi/src/lmi/GNUmakefile
check_concinnity 2>&1 |less -S
+ # Commit the changes in whatever batches make sense
+
+cd /opt/lmi/proprietary
+ # [commit selected files by name...]
+git commit one_file another_file -m"One set of changes"
+ # [...or commit all changes]
+git commit --all -m"Another set of changes"
+
+ # When everything is ready to share...
+
+cd /opt/lmi/proprietary
+git bundle create YourBundleName ^origin/master HEAD --branches
+
+ # Email that bundle, then push the changes to your "blessed" repository
+
+git push
+
+ # When you receive a bundle in email...
+
+cd /opt/lmi/proprietary
+git bundle verify /path/where/you/saved/TheirBundleName
+git pull /path/where/you/saved/TheirBundleName
+
+ # ...then synchronize your "blessed" repository with your correspondent's
+
+git push
+