NAME

svni - Interactive subversion check-in


SYNOPSIS

svni [ -a | --add ] [ -d | --debug ] [ -e | --editor editor ]

[ -f | --followup command ] [ --highlight [ syntax ] ]

[ -l | --lint type[,type ... ] ] [ -m | --message message ]

[ -N | --non-recursive ] [ -u | --username username ]

[ --no-followup ] [ --no-lint ] [ files ... ]

svni { -r | --retry | -h | --help | -v | --version }


DESCRIPTION

svni can be used to interactively select files to check in into a subversion repository.

svni will first run svn status and svn diff on the specified files (. by default). Then a temporary file will be constructed with the following format:

This file will be presented to the user in an editor of the user's choice. The user can add a commit message at the start of the file and use the list of files in the middle section to make a selection of files to check in. The character in the first column is the svn status character, or period . if the file is up-to-date. Files that are marked with a question mark ? or period . in the first column will not be checked in, unless the user changes it to a plus sign +, in which case svni will add them to the repository first (using svn add). If the first character is changed to a minus sign -, the file will be deleted from the repository (using svn del).

svni will automatically mark unversioned files for adding if the -a commandline option is provided.

The bottom section of the file contains svn diff information enclosed in svni-specific vim(1) fold markers. If vim(1) is used as the editor, these folds will normally be closed at editor startup time. When opened, they will show which differences are about to be committed, as follows:

In this section, all lines will be ignored, so lines starting with a plus sign + or minus sign - have no special meaning and will not cause any files to be added or deleted.

For more information about folds, use the vim(1) command :help folds.

If the user wishes to abort the current action, it suffices to empty the list of filenames.

If no commit message is entered, the commit will be aborted, but the temporary file will be kept. It can be edited again using svni -r (see below).


OPTIONS

-a, --add

Unversioned files will be automatically marked for addition with svn add. Unversioned files are normally shown with a question mark ? in the first column; using this option will automatically convert these to pluses + before opening the editor.

-d, --debug

Does not perform an actual svn add or svn ci, but echoes the commands to standard output instead. Also, does not remove the temporary message file.

-e, --editor

Used to indicate which editor should be spawned.

-f, --followup command

Specifies a command to run after a succesful commit.

-h, --help

Print usage information and exit.

--highlight [ syntax ]

Specifies which syntax highlighting to select in the vim(1) modeline. The default, in absence of this option, is svn syntax. If the vim syntax file for svni has been installed, then the presence of this option will select svni syntax, which has the added benefit of recognizing and highlighting lines that start with + or -, and using diff syntax for regions between foldmarkers.

A syntax may be selected explicitly by specifying it as an argument to the --highlight option. The defaults are svn if the option is absent, svni if present without an argument.

-l, --lint type[,type ... ]

The input files of the specified file types are checked for syntax errors. If any errors are found, a warning is emitted and the user is asked for confirmation before continuing.

Currently, the default syntax checkers are:

C : gcc -fsyntax-only
JavaScript : rhino /usr/local/share/jslint.js
Perl : perl -cw
PHP : php -l
TeX : if chktex -q -m all %s 2>&1 | grep .; then exit 1; fi
XML : xmllint --noout

These default syntax checking commands can be overruled using the environment variables SVNI_LINT_* or by using a config file (see below).

-m, --message message

Fill the commit message with an initial value. Note that the changes will not be automatically committed.

--no-followup

Don't run any followup command specified in the config file or on the commandline.

--no-lint

Don't run any syntax checkers specified in the config file or on the commandline.

-N, --non-recursive

Use the -N flag in svn commands. This ensures that add and delete actions are not performed recursively.

In case the user wants to add a new directory, but only some of the files contained in it, this option must be used.

In most other cases where the user wants to perform an svn add or svn del action, this option must not be used.

-r, --retry

If a previous commit has failed, the commit message file has not been deleted. This option will instruct svni to pick up the most recent message file, and open it in the editor to try the commit again.

-u, --username username

Set the username as indicated.

-v, --version

Print the current program version and exit.


ENVIRONMENT

SVNI_EDITOR

Used to specify the editor. Takes precedence over the usual VISUAL and EDITOR commands, and over the setting in the .svnirc file.

SVNI_LINT_C
SVNI_LINT_JAVASCRIPT
SVNI_LINT_PERL
SVNI_LINT_PHP
SVNI_LINT_TEX
SVNI_LINT_XML

Specify alternate commands to check the syntax of source files, e.g.:

    SVNI_LINT_JAVASCRIPT='jslint_wrapper -s'
    SVNI_LINT_TEX=chktex_wrapper

svni assumes that the name of the file to be checked can be appended to this command, unless the string %s occurs in the commandline, in which case svni will replace it with the name of the file to be checked. The default TeX syntax checking command shows an example of such usage.

SVNI_OPTIONS

Used to specify default commandline options, e.g.:

    SVNI_OPTIONS='-l php,javascript --highlight'


CONFIG FILE

svni also reads config options from a user-specific $HOME/.svnirc file. Lines in this file should have the form key:value. Everything after a # character on the same line is discarded as a comment. An example file with the supported options:

    auto_svn_add:0 # can be 0 or 1
    #debug:0 # can be 0 or 1
    editor:vim -X
    #followup:svn_after_commit.sh
    highlight:svni
    lint:php,javascript,perl,tex
    #lint_c:
    lint_javascript:jslint_wrapper -s
    #lint_perl:
    #lint_php:
    lint_tex:chktex_wrapper
    #lint_xml:
    message:Standard commit message header
    #username:ruittenb


SYNTAX HIGHLIGHTING

svni is bundled with a vim(1) syntax file svni.vim. When installed, it can apply svn syntax highlighting (including the svni-specific command characters + and -) to the top part of the temporary message file, and diff syntax highlighting to the bottom part of the file.


BUGS and WARNINGS

None known.


VERSION

This manual pertains to svni version 0.36.


AUTHOR and COPYRIGHT

Copyright © René Uittenbogaard (ruittenb@users.sourceforge.net).

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability OR fitness for a particular purpose.

svni can be obtained from its project page at Sourceforge: http://sourceforge.net/projects/svni


SEE ALSO

chktex(1), rhino(1), svn(1), vim(1), xmllint(1).