• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..07-May-2022-

README_SourceForge_outage_restoreH A D01-Jun-20193.9 KiB9670

README_cvs2svn_conversionH A D01-Jun-20192 KiB3532

README_svn2git_conversionH A D01-Jun-201910.1 KiB272192

diff_git_versus_svn_tree.shH A D01-Jun-20196.1 KiB15575

plplot.rulesH A D01-Jun-20192 KiB7157

svn_tag2git_tag.shH A D01-Jun-2019397 128

README_SourceForge_outage_restore

1This check of our git repository was made necessary by the great
2Sourceforge outage that started on 2015-07-16 and lasting for roughly
3a week after that.  The following procedures were used to check the
4git repository that Sourceforge restored from their backups against a
5local repository with top-level working directory called plplot.git
6which was located on my (AWI) computer and which was up-to-date with
7the SF repo before the SF outage.
8
9# Clone restored repo in directory where plplot.git (my working local
10# repository) is a subdirectory
11export PREFIX_GIT=/home/software/plplot/HEAD
12export GIT_OLD_REPO=${PREFIX_GIT}/plplot.git
13export GIT_NEW_REPO=${PREFIX_GIT}/plplot.git_new
14
15git clone ssh://airwin@git.code.sf.net/p/plplot/plplot ${GIT_NEW_REPO}
16
17# Arrange git access to both repos
18
19alias git_old='git --work-tree=${GIT_OLD_REPO} --git-dir=${GIT_OLD_REPO}/.git'
20alias git_new='git --work-tree=${GIT_NEW_REPO} --git-dir=${GIT_NEW_REPO}/.git'
21
22#fsck both
23git_old fsck --strict
24git_new fsck --strict
25
26The former shows a number of dangling trees, commits, and blobs
27(presumably from my git local topic branch activity) which have not
28been garbage-collected yet. But this check shows there is no
29corrupt objects or any other internal inconsistency.
30The latter gives a clean result which by itself already goes a long way
31toward restoring complete confidence in this restored repository.
32
33# Check logs are identical
34
35# Insure get full log if previous checkouts not master tip
36git_old checkout master
37git_new checkout master
38git_old log --name-status > /tmp/git_log_old.out
39git_new log --name-status > /tmp/git_log_new.out
40diff /tmp/git_log_old.out /tmp/git_log_new.out
41
42Also look at the above results to verify they go back to
43
44commit eacad1b4079dacd192c85006125bc03c38204046
45Author: Geoffrey Furnish <furnish@users.sourceforge.net>
46Date:   Wed May 20 21:36:02 1992 +0000
47
48    Initial checkin of the whole PLPLOT project.
49
50    svn path=/trunk/; revision=2
51
52# Check working directories for each commit in log are identical (requires ~20 minutes)
53
54# Insure get full (old) log in loop if previous checkout not master tip (which
55# could happen if following loop is interrupted).
56git_old checkout master
57time (for ID in $(git_old log --oneline |sed -e 's? .*$??'); do echo $ID; git_old checkout --quiet $ID; git_new checkout --quiet $ID ; diff -Naur -x .git -x '*.pyc' -x '*~' -x '#*#' ${GIT_OLD_REPO} ${GIT_NEW_REPO}; done) >| for.out
58
59# Restore both repos to master tip.
60git_old checkout master
61git_new checkout master
62
63# Check that both log and for.out have the same information, i.e., there
64# is no extra warning or error information in for.out.
65git_old log --oneline |sed -e 's? .*$??' |diff - for.out
66
67# Make sure tag list is identical between two repos.
68
69git_old tag --list > /tmp/git_tag_old.out
70git_new tag --list > /tmp/git_tag_new.out
71diff /tmp/git_tag*.out
72
73# Collect all release-related tags (some of which are not in above
74# test of principal branch of development since tag done on dead-end
75# side branch) and verify corresponding working directories.  (Takes roughly 15 seconds.)
76
77time (for ID in $(git_old tag --list |grep 'plplot-5') $(git_old tag --list |grep '^v'); do echo $ID; git_old checkout --quiet $ID; git_new checkout --quiet $ID ; diff -Naur -x .git -x '*.pyc' -x '*~' -x '#*#' ${GIT_OLD_REPO} ${GIT_NEW_REPO}; done) >| for_tag_diff.out
78# Restore both repos to master tip.
79git_old checkout master
80git_new checkout master
81
82# Check that both git tag and for_tag_diff.out have the same information, i.e., there
83# is no extra warning or error information in for_tag_diff.out.
84
85git_old tag --list |grep 'plplot-5' >| /tmp/git_tag_old_list.out
86git_old tag --list |grep '^v' >> /tmp/git_tag_old_list.out
87diff /tmp/git_tag_old_list.out for_tag_diff.out
88
89# All the above tests show good results so get rid of new repository
90# that is indistinguishable from old repository (aside from the
91# additional local topic branches in the old repository).
92
93rm -rf plplot.git_new
94
95DONE!
96

README_cvs2svn_conversion

1The 1992-2007 era of PLplot development used CVS as the revision
2control system.  The pre-existing CVS repo was installed at
3SourceForge when PLplot was first registered as a project there in
42000.  Subsequently it was discovered there were some issues with some
5of the files that had been historically deleted (stored internally in
6the CVS "Attic") such that those files became resurrected from the
7dead again by any attempt to export from CVS or establish a CVS
8branch.  Identifying the names of those files and CVS deleting them
9(presumably for the second time, but this time it "took") solved that
10issue, but left us with a feeling that the CVS software that had
11historically been used with our repo from 1992 to 2000 was probably
12not too reliable, and potentially could have left other issues in our
13CVS repo.
14
15Despite such potential issues with our CVS repo, we decided to attempt
16to preserve all our history by converting that CVS repo to subversion
17in 2007 rather than simply starting all over with subversion with a
18copy of our latest source tree.  The externally supplied script used
19to do the conversion was called cvs2svn.  And because of concerns
20about problems with the CVS repo data, results were carefully checked
21by comparing CVS and svn logs in detail, and also doing detailed tree
22diffs of the CVS versus svn results for branches, tags, and trunk.
23Such checks caught a few issues such as binary files being clobbered
24in the transformation to svn because they were improperly identified
25as text files for CVS, but ultimately all those issues were sorted out
26and the result was a good subversion repository for PLplot that
27contained all the PLplot development history (commit messages and
28files) back to 1992.
29
30PLplot development continued from 2007 to 2014 with subversion with no
31repository issues ever showing up.  But in 2014 we decided to use
32the git distributed revision control system instead of subversion.
33For details about that conversion process (which also preserved all
34our history back to 1992) see README_svn2git_conversion
35

README_svn2git_conversion

1This file is to show what I did to convert the plplot
2svn SourceForge repo to a SourceForge git repo following closely
3what I did for a similar conversion of timeephem.  This is
4a preliminary conversion, and it is likely that if I can get
5it to work, Hazen will do the final conversion.
6
7* Create local directory corresponding to the complete SF svn repo.
8
9svn checkout https://svn.code.sf.net/p/plplot/code plplot_complete_SF_svn
10
11* [Not done by AWI.  Should be done by Hazen.] Turn off write permissions for
12  subversions repo and change the display name for that repo from
13  "Code" to "Old Code".  To do this, login to SF, --> project page for
14  plplot --> admin --> tools.  Then click on the permissions button
15  for "Code" to not allow anyone write access.  Then click on the
16  label button for "Code" to change that to "Old Code".  N.B. MAKE
17  ABSOLUTELY POSITIVE YOU DO NOT HIT THE DELETE BUTTON.  That would
18  destroy our subversion repository which we would like to keep
19  available at SourceForge for some time in a readonly status
20
21* [Not done by AWI.  Should be done by Hazen.] While in the same location create
22  an empty git repo.  Click on the git button, and choose a label of
23  "Code" and a mount point of "plplot".  This will create a "Code"
24  area at the end.  Drag and drop that area to place "Code" before
25  "Old Code" to affect the order of the menus at the SF project page.
26
27  N.B. If you make a mistake with the git repo (like I did with the
28  airwin user name for the timeephem case) you can always hit the
29  delete button for the git repo to completely remove it from
30  SourceForge.  Then start over with an empty repo as above.  But be
31  extremely careful which delete button you hit since you could also
32  completely remove the subversion repository this way if you do that
33  on "Old Code".
34
35* Copy SourceForge svn repo to local disk.
36
37rsync -av --delete svn.code.sf.net::p/plplot/code/* plplot_svn_repository
38
39* Compare a local directory corresponding to this local repo with a
40local directory corresponding to the SF repo. Note, for final
41comparisons between git and svn we will do much more extensive check
42of various revisions
43
44svn checkout file:///home/software/plplot_svn/svn2git_conversion/plplot_svn_repository plplot_complete_local_svn
45
46# Confirm empty differences
47diff -Naur --exclude=.svn plplot_complete_SF_svn plplot_complete_local_svn
48
49svn log --verbose plplot_complete_SF_svn >| ChangeLog_complete_SF_svn.log
50svn log --verbose plplot_complete_local_svn >| ChangeLog_complete_local_svn.log
51
52# Empty differences except for slight formatting difference (mentioned
53# "Changed paths:" for empty tags).  I don't know why there is this formatting
54# difference since repos are identical via above rsync, but svn may just
55# use slightly different code path for local file repo than it does for remote
56# repo.  In any case, differences are slight so I won't worry further about it.
57diff ChangeLog_complete_SF_svn.log ChangeLog_complete_local_svn.log
58
59* Analyze overall directory structure of svn repo.
60
61grep "A /" ChangeLog_complete_local_svn.log | grep -v "A /trunk" | grep -v "A /tags" | grep -v "A /branches" | less
62
63Shows that top level directories are branches, tags, trunk, and www, and
64within www there are branches, tags, and trunk as well, but only www/trunk is
65used. Furthermore,
66
67grep "A /branches" ChangeLog_complete_local_svn.log| grep www
68
69shows no directory called branches/www.
70
71Therefore, I agree with Hazen's decision to treat all of www as a branch.
72
73* Analyze tags.
74
75svn log --verbose plplot_complete_local_svn/tags >| ChangeLog_complete_local_svn_tags.log
76
77grep 'A /' ChangeLog_complete_local_svn_tags.log |less
78
79Shows tags actually appear as subdirectories of tags AND tags/debian.  So
80change Hazen rules so that tags/debian/whatever ends up as the git
81tag "debian/whatever"
82
83* Prepare files to help conversion
84
85Sources:
86http://www.midwesternmac.com/blogs/jeff-geerling/switching-svn-repository-git2svn
87http://blog.smartbear.com/software-quality/migrating-from-subversion-to-git-lessons-learned/
88
89  + Find list of author names:
90
91svn log --quiet plplot_complete_local_svn/tags | awk '/^r/ {print $3}' | sort -u
92
93    The above command generated a list that was equivalent to what Hazen
94    had already collected in his old authors.txt file.  N.B. Hazen has now
95    updated that authors.txt file using real names (such as Alan W. Irwin),
96    and it was that rules.txt file I used for my final testing.
97
98  + Update plplot.rules file provided by Hazen for
99    PLplot to deal with tags/debian issue.  (Hazen had
100    already dealt with /www issue noted above.)
101
102  + Cut and paste from first source above to create the
103    svn_tag2git_tag.sh script to be sourced (below) to convert special
104    marking of tag-style svn branches to real git tags.
105
106* Do conversion with marked tags as branches.
107
108rm -rf plplot.git  # This removes prior conversion attempts.
109time svn-all-fast-export --identity-map=authors.txt --rules=plplot.rules --stats --add-metadata plplot_svn_repository >| svn-all-fast-export.log 2>&1
110
111The time stats were
112
113real    1m0.064s
114user    1m11.676s
115sys     0m6.760s
116
117  ==> blindingly fast!
118
119  This result took 15 times the time required for the timeephem case
120  which seems reasonable since this PLplot svn repository is 15 times
121  larger than the timeephem svn repository.
122
123* Check svn-all-fast.log for any error or warning messages.  Some of the tag creations generated warning messages, but as far as I know there is nothing there that looks serious.
124
125* Transform svn branch-style tags to git tags following script given by source 1 above.
126
127pushd plplot.git
128source ../svn_tag2git_tag.sh >| ../svn_tag2git_tag.sh.log
129popd
130
131 The resulting output file looked reasonable.
132
133* Create clone of local git repo
134
135rm -rf plplot_local_clone.git
136git clone /home/software/plplot_svn/svn2git_conversion/plplot.git plplot_local_clone.git
137
138* Tailor script to refer to plplot_local_clone.git and run that script
139  to check the PLplot working directory for the local svn repo against
140  plplot_local_clone.git
141
142time ./diff_git_versus_svn_tree.sh >| diff_git_versus_svn_tree.sh.out 2>&1
143
144* Create complete git log and check that it looks reasonable.
145
146pushd plplot_local_clone.git
147git checkout master
148git log --name-status --all >| ../git.log 2>&1
149popd
150
151grep '^Author' git.log |sort -u |less
152
153  The results were as expected (i.e. consistent with the authors.txt file
154  used for the conversion).
155
156  Also, check which svn revision numbers are in the log.
157
158grep "svn path" git.log |sort --field-separator='=' --key=3 -n |less
159
160  This shows that only 23 are missing, but I think that is reasonable since
161
162grep '^Exporting' svn-all-fast-export.log |grep -v modifications |grep done |less
163
164  (which picks out revisions that created no modifications to git corresponding,
165  e.g., to creations of empty directories on svn) had 16 lines leaving
166  only 7 svn revisions unaccounted for due to other issues which I didn't bother
167  to try and figure out.
168
169[AWI did nothing further in this file so the rest is taken from AWI
170experience with timeephem conversion project with all references to
171that project replaced by plplot, and all references to airwin replaced
172by Hazen's SF username, hbabcock.  Hazen should take each of these
173further steps.]
174
175* Configure git with the same information so that the Author lines will
176  continue to be consistent in the log for new commits to the git repo.
177
178git config --global user.name "Hazen Babcock"
179git config --global user.email "hbabcock@users.sourceforge.net"
180
181* Prepare bare repo for pushing to SF following directions at
182  <https://sourceforge.net/p/forge/documentation/Git/>
183
184pushd plplot.git
185git remote add origin ssh://hbabcock@git.code.sf.net/p/plplot/plplot
186git config branch.master.remote origin
187git config branch.master.merge refs/heads/master
188popd
189
190* Check remote result:
191
192pushd plplot.git
193git remote --verbose
194popd
195
196  Which yielded (as expected)
197origin  ssh://hbabcock@git.code.sf.net/p/plplot/plplot (fetch)
198origin  ssh://hbabcock@git.code.sf.net/p/plplot/plplot (push)
199
200* Push local branches and tags to SF
201
202pushd plplot.git
203git push origin master
204git push --all origin
205git push --tags origin
206popd
207
208* Check SF git repo by cloning it than comparing in detail with subversion
209  results by using the test script with name of directory
210  tailored appropriately in script.
211
212git clone ssh://hbabcock@git.code.sf.net/p/plplot/plplot plplot_sf_clone.git
213
214time ./diff_git_versus_svn_tree.sh >| diff_git_versus_svn_tree_SF_clone.sh.out
215less diff_git_versus_svn_tree._SF_clonesh.out
216
217* Enforce workflow with update hook
218
219mkdir git_hooks
220cd git_hooks
221# edit README file to explain our update hook and
222# the workflow policy it enforces.
223
224# This needed to give shell access for 240 minutes before your
225# SourceForge shell access disappears again.
226ssh airwin,plplot@shell.sourceforge.net create
227# Backup original SF updates hook
228scp -p airwin,plplot@shell.sourceforge.net:/home/git/p/plplot/plplot.git/hooks/update update_original
229cp -p update_original update
230# Check permissions (which should be -rwxrwxr-x)
231ls -l update
232# Edit update file to enforce policy as discussed in detail on the mailing list.
233# edit update
234.....
235# Upload the new version
236scp -p update airwin,plplot@shell.sourceforge.net:/home/git/p/plplot/plplot.git/hooks
237
238# Check permissions:
239ssh airwin,plplot@shell.sourceforge.net "ls -l /home/git/p/plplot/plplot.git/hooks/update"
240# Fix permissions (if required)
241ssh airwin,plplot@shell.sourceforge.net "chmod a+x /home/git/p/plplot/plplot.git/hooks/update"
242
243* Tag and remove all branches except master
244
245# List branches
246git branch -a
247
248# Tag the branch called branch_name
249git tag archive/branch_name origin/branch_name
250
251# Push tags to SF
252git push --tags origin
253
254# Delete branches at SF
255git push origin :branch-name
256
257# Branch resurrection:
258git branch branch_name archive/branch_name
259
260# To get a complete list of remote tags:
261
262git ls-remote --tags origin
263
264# For those who want to make tags and branches on their local repo
265# consistent with the remote repo.  (The following command definitely
266# gets rid of the local branches that were deleted at SF, but I am not
267# sure whether this is sufficient to propagate the tag creations as
268# well or whether a subsequent ff-only merge (done as part of the
269# normal workflow) of origin/master to master is also required.
270
271git fetch --prune
272