|
From: Mojca M. <moj...@gm...> - 2017-10-07 23:05:53
|
On 7 October 2017 at 23:05, Daniel J Sebald wrote: > On 10/07/2017 02:25 PM, Achim Gratz wrote: >> >> sfeam via gnuplot-beta writes: >>> >>> Well guys, it's been fun. >>> >>> SourceForge has announced that they will shut down CVS support next >>> month. >>> I have little time available to deal with this, and minimal prior >>> experience with git. >>> >>> So I am making a plea for a volunteer to step up and transfer the >>> project files >>> to some git repository. >> >> >> There's already an unofficial repository (not that I'd endorse GitHub): >> https://github.com/gnuplot/gnuplot >> >> As noted on that page, this uses cvsimport to do the mirroring, which >> sometimes produces somewhat strange commits on the Git side. You might >> want to get in touch with Eric S. Raymond if you want the CVS repo >> cleaned and converted with some more care into Git (he's done that >> before for other projects). > > > I did > > mkdir temp_repository; cd temp_repository > git clone https://github.com/gnuplot/gnuplot.git > cd gnuplot > gitg > > and things look reasonable as far as change history, tags and branches. Some tags are missing, but that's easy to fix (I think I disabled that because a removed a number of useless tags, but I'm no longer sure). > Can you point to some examples of strange commits in this record to give us > an idea? I cannot remember all the details. I remember various problems I had and I made several attempts to change the repository in the past after some new commits came in. The script I use for conversion at the moment is at the bottom. The fact that I need(ed?) to delete some files (docs/pdffigures.tex in particular) is strange. I decided to delete "missing" and "config/djconfig.sh" on purpose because I had problems whenever I tried to build gnuplot. I had to change quite some file permissions (otherwise git would always complain about some changes in my local tree). Even if this conversion would serve as a starting point, here's still a TODO list: - "convert" .cvsignore to .gitignore (this could either be done "properly" for all commits or just for the last commit) - remove all the expansion strings ($Id) - collect a list of names with emails from contributors to the sources (perhaps along with timezones) and replace cvs usernames and timestamps with proper names and emails I can name a few other problems I had at various points, but I'm not sure if any of those apply to my copy of gnuplot's repo. 1.) Wrong date extraction for $Id fields 2.) It's explicitly suggested that one should not use incremental updates of the repository, but rather create a single conversion. I don't know what consequences that might have. 3.) I remember seeing the same cvs commit (which needed a couple of minutes to be uploaded to the server) split in two git commits just because of the varying timestamp. 4.) If one deletes a folder in CVS, the files are probably gone forever and one doesn't get them in conversion. 5.) I had some issues with files that only differed in case and I got "lossy conversion" (files lost) on my Mac (this conversion is done on Linux though). 6.) I forgot a "--delete" switch in rsync calls, so some files persisted in the git repository even after being deleted from CVS. 7.) Not sure if file permissions are ok. Under CVS they kept changing. The expression I used tried to fix permissions, but not sure if that's all correct. > I'm wondering now about my suggestion of putting all the ChangeLog files > into a changelog comment so that it can be included in the > > git log > > command. The reason is that there are, in fact, entries for all the > changesets (where they came from, I don't know, they don't exactly match the > ChangeLog). So mixing those in with the equivalent ChangeLog comment might > create a confusing duplication. While that can theoretically be done: who is going to do the work? See also my next comment and a link to xkcd (to predict what happens next). > Let's compare an example. The first in the > list (via "git log") is > > commit 0a3035e39a1f9402a474d0ea9300deac4cd9ef33 > Author: broxxxx <broxxxx> > Date: Fri Oct 6 18:35:09 2017 +0000 > > Use <sys/wait.h> if available. > Provide centralized fall-back of WEXITSTATUS if <sys/wait.h> does not > supply it. > > whose changed files (via gitg) are > > ▶15 ChangeLog > ▶4 configure.ac > ▶6 src/command.c > ▶20 src/syscfg.h > > While the entry in ChangeLog is as follows (I put 'x' in for email address > to keep out of the content): > > 2017-10-06 xxxxxxxxx xxxxxxx <xx...@xx...> > > * src/command.c: Move WEXITSTATUS fall-back definition away from > here. > > * src/syscfg.h: Include <sys/wait.h>, if it exists. > (WEXITSTATUS): Provide fall-back definition, if none in > <sys/wait.h>. Move MS Windows specific replacement from command.c > to here. > > * configure.ac: Add call to AC_HEADER_SYS_WAIT > > Moving forward, the changeset comments should look more like the second > example from the ChangeLog, as that highlights nicely in vi-based pagers. That's something that maintainers should strongly encourage (or enforce?) among themselves. Guidelines can be found under: https://xkcd.com/1296/ For another project we tried to enforce another rule: keep the commit history linear (unless branches are needed of course, but we try to rebase pull requests instead of merging them and developers are discouraged to do rebasing on master as well). > Currently in the translated repository, there are but a few users making > commits. Going forward, the names of the user who creates the original > changeset will end up in that Author location even though one of the > maintainers pushes the changes to the repository when ready. (That name is > a configuration parameter in a person's OS account via the hidden file > .gitconfig) I like that anyway. Mojca #---------------------------- export DIR=$PWD export GP_CVS=$DIR/cvs/gnuplot/gnuplot mkdir -p $DIR/cvs mkdir -p $DIR/git rsync -aO --delete rsync://gnuplot.cvs.sourceforge.net/cvsroot/gnuplot/ $DIR/cvs/gnuplot cd $DIR/cvs/gnuplot/gnuplot chmod 755 missing,v config/djconfig.sh,v # set 644 to all non-executable files find . ! -perm /111 -type f -exec chmod 644 {} \; # set 755 to all executable files find . -perm 111 -type f -exec chmod 755 {} \; # remove pdffigures.tex (always complaining) # rm docs/pdffigures.tex,v cd $DIR # update from CVS git cvsimport -C $DIR/git/gnuplot.git -p x -d $DIR/cvs/gnuplot gnuplot # push any changes back to github cd $DIR/git/gnuplot.git git push -q github --all #git push github --tags |