Working with Jedmodes CVS

CVS is a complex tool. More detailled information is available at:

Note

After the restructuring of Sourceforge.net, some info might be outdated (particularely the documentation links).

A full update of this documentation is not likely, as it is planned to replace the Jedmodes CVS repository by a subversion (SVN) one.

Since 2006-05-12 the common cvs host name is replaced by projekt-specific (virtual) servers:

- cvs.sourceforge.net           % or cvs.sf.net
+ jedmodes.cvs.sourceforge.net

Updates, Commits and other cvs actions from a working copy will not work as the server name is stored in CVS/root metadata. You can either check out a new working copy or do a grep-and-replace (if you have the grep mode):

grep("cvs.sourceforge.net", "<your working copy>/!")
M-x grep-replace        % or your key for the "replace" cmd
  cvs.sourceforge.net
  jedmodes.cvs.sourceforge.net

Get the latest sources from CVS (everybody)

There are two options for cvs downloads: export and checkout - update.

Login

The first time you use the sourceforge cvs, you will have to login:

cvs -d:pserver:anonymous@jedmodes.cvs.sourceforge.net:/cvsroot/jedmodes login

with an empty password (hit enter at the password prompt).

Export

Pro:
simple, no spurious files/directories.
Con:
updating downloads all files (also unchanged ones)

With a command line cvs tool, you can do:

cvs -d:pserver:anonymous@jedmodes.cvs.sourceforge.net:/cvsroot/jedmodes export -Dtomorrow mode

to get a subdirectory mode/ containing the source-tree of the modes.

or:

cvs -d:pserver:anonymous@jedmodes.cvs.sourceforge.net:/cvsroot/jedmodes export -Dtomorrow mode/<modename>

to get only the files for the mode <modename>

Optinally use the -z1 ... -z9 options for compressed transmission.

Checkout - Update

Pro:

updating downloads only new and modified files

the update command is simpler (as the access info is remembered)

Con:

every directory contains a "spurious" CVS subdirectory (with version info)

the source-tree must be kept on disc for this scheme to work

Checkout

cvs -d:pserver:anonymous@jedmodes.cvs.sourceforge.net:/cvsroot/jedmodes checkout mode

for all jedmodes or:

cvs -d:pserver:anonymous@jedmodes.cvs.sourceforge.net:/cvsroot/jedmodes checkout mode/<modename>

for the mode <modename> will set up the subdirectory mode/ containing the source-tree of the modes (inclusive version info).

Update

Go into the mode directory and do:

cvs update

(update existing directories), or:

cvs update -dP

(download also new directories and delete empty ones)

Selective updating is easy: Updating in a subdirectory of the source tree only updates files within this subdirectory.

Currently, not all modes have their newest sources at the CVS repository. Get these modes from the release downloads page

Read-write access to the CVS (registered developers only)

Setup

You need the cvs and ssh programs on your system.

  1. Create a home directory at the sourceforge cvs server:

    ssh -l YOUR_USERNAME jedmodes.cvs.sourceforge.net
    

    Optionally upload the public ssh key to Sourceforge.

  1. Set the CVS_RSH environment variable, so CVS will know we are authenticating using SSH (you can also put this in your .bashrc):

    export CVS_RSH=ssh
    
  2. Checkout a working copy from the repository

    In the root of your working copy (e.g. ~/.jed/jedmodes/cvs/) do:

    cvs -d:ext:USERNAME@cvs.sf.net:/cvsroot/jedmodes checkout mode
    

    Optinally use the -z1 ... -z9 options for compressed transmission.

New Mode

Go to the working directory copy (e.g. ~/.jed/jedmodes/cvs/mode/) and

  1. make the new mode directory:

    mkdir <mode-dir>
    
  2. copy the mode file(s):

    cp <path>/<mode.sl> <mode-dir>
    
  3. "add" the file (make CVS aware of it):

    cvs add <mode-dir> <mode-dir/mode.sl>
    

    If there are several source files, be sure to add all of them as cvs will not do this automatically.

  4. commit your changes to the repository:

    cvs commit <mode-dir>
    
note:After the upload to the "developers" CVS, it takes some time (1...3 hours) until the file is mirrored in the "public" CVS and can be viewed with ViewCVS.

New Version

Go to the working directory copy (e.g. ~/.jed/jedmodes/src/mode/) and

  1. Replace the mode file(s) with the new version:

    cp <path>/<mode.sl> <mode-dir>
    
  2. If there are new files, add them (make CVS aware of them):

    cvs add <mode-dir> <mode-dir>/<newfile>
    
  3. commit your changes to the repository:

    cvs commit <mode-dir>
    

Although it is possible to modify other peoples modes this way, this is regarded inpolite. Mail the author your patches or suggestions, maybe he/she wants to modify your changes or simply will give you the OK to commit your patch.

Bugfixes are ok, if the author did not respond to your mail in a reasonable time span.

Johan Gerell gave the explicit permission to anyone to work on his Jed modes (as he cannot maintain them any more).

Update

How to get other authors changes: see Checkout - Update above.

Other commands

  • Compare our working copy to the repository:

    cvs diff -u
    
  • Remove a file from the repository

    1. remove the file from your working copy:

      rm FILENAME1 FILENAME2 ... FILENAMEn
      
    2. perform the "remove" operation:

      cvs remove FILENAME1 FILENAME2 ... FILENAMEn
      
    3. commit your changes to the repository:

      cvs commit
      
  • Remove a directory from the repository

    1. remove all files (cf. above):

      FILES=`ls`
      rm -f $FILES
      cvs remove $FILES
      cvs commit
      
    2. empty directories will automatically be removed. To see this in your working copy update with -P (remove empty dirs) option:

      cd ..
      cvs update -Pd
      

Backups

Nigthly CVS tarballs are no longer produced. Instead, the rsync service can be used for backups. Rsync can be used to copy an entire project's repository:

$ rsync -av rsync://jedmodes.cvs.sourceforge.net/cvsroot/jedmodes/* .

Note that you cannot rsync the entire cvsroot rsync module for performance reasons.

Generating CVS Snapshots

See also: new-release.html.

CVS tarball releases may be generated by the update-sources.sh script in the jedmodes group directory or in your working copy of the CVS.

# ssh jedmodes.sf.net # cd /home/groups/j/je/jedmodes/ ./update-sources.sh <Ver> # replace <Ver> with a version number, e.g. 2.3

You can upload new files using the upload page https://frs.sourceforge.net/webupload or using WebDAV, SFTP or rsync over SSH.

Further information regarding this process may be found in the Guide to the File Release System; please refer to this document if you encounter any difficulties in performing this file release.

With a web browser, go to the new release site to complete the release by filling out the form.

Tarballs from CVS for single modes are possible with (replace cua with your modename):

# ssh jedmodes.sf.net
cd /home/groups/j/je/jedmodes/src
# update the source files
cvs update -dP mode
# pack as tgz excluding the CVS stuff
tar --create --gzip --directory mode --exclude=CVS --file cua.tgz cua

Proceed similar to above.