vcheckin(1)

Name

vcheckin - Check a new version of a package into the Vesta repository

Synopsis

vcheckin [-q] [-Q] [-f] [-m message | -M] [-s session-dir] [-S] [-c content | -C] [-n new-version] [-R repos] [-d dstrepos | -D] [[-w] work-dir] [-W]

In the most common usage, vcheckin is invoked from the checkout session's working directory, and no arguments are needed.

Contents

Description

See the vesta-intro man page's Terminology section for definitions of terms, and its Name Interpretation section for an explanation of how names are looked up.

The vcheckin command checks in a new public version of a package, binding the new package content that was created in a checkout session to the new version name that was reserved by vcheckout. It also ends the checkout session by deleting the session's working directory.

vcheckin will abort the checkin and print the following error message if any files in the working directory tree have been changed, renamed, or deleted since the most recent vadvance or vmake operation.

  vcheckin: work-dir has been modified since last advance
This safeguard is included to prevent inadvertent checkins of changes that have yet to be built. To proceed with the checkin, you should first run vmake; vadvance can be used instead of vmake, but if the changes in question are substantive, you may very well check in changes that fail to build successfully.

vcheckin figure

In more detail, vcheckin:

Directory names used as attribute values are canonicalized to start with "/". The checkout-by attribute is set to the invoking user's global name and the creation-time attribute to the current date and time. The old-version attribute is copied from the corresponding attribute on session-dir, or from the master stub if there is no session-dir.

You must have read access to content, write access to the existing new-version stub, and write access to the parent directories of new-version and work-dir. The newly created version is owned by you, but has access permissions inherited from its parent directory.

In the presence of replication, the package may have been checked out from another repository. (See vrepl(1) and vmaster(1) for more information about replication and mastership.) As a convenience, if the new-version stub has a checkout-from attribute specifying a remote repository, vcheckin attempts to replicate new-version to that repository after checking it in. This behavior can be altered with the -d or -D flag.

vcheckin returns status 0 for success, 1 for parameter syntax errors, or 2 for more serious errors.

Flags

-q
Quiet; suppress printing out what is being done.
-Q
Query; print out what the command would do, but don't do it. Also suppresses prompting for the change history message.
-m message
The change history message. If neither -m nor -M is given, vcheckin reads the message from standard input. A prompt is printed if the standard input is a terminal.
-M
Omit the change history message.
-s session-dir
The session directory that was created at checkout time. If the name session-dir is unqualified (does not have "/", ".", or ".." as its first arc), it is interpreted relative to the site's default directory of packages, DefaultPackageParent. Defaults to the session-dir attribute of work-dir, if any.
-S
There is no session directory. Other flags whose default values depend on session-dir must be given explicitly, and the step of updating the session directory's attributes is omitted.
-c content
The content of the new version that is to be checked in. If the name content is unqualified, it is interpreted relative to session-dir, or to DefaultPackageParent if there is no session-dir. Defaults to the highest version number bound in session-dir, if any. That is, if there is a session-dir, it is searched for arcs consisting entirely of decimal digits, and the one with the highest value is chosen. If there are no such arcs, -C is taken as the default. Hint: You can "vcheckin -c 0" to abandon a checkout session by checking in a version identical to what you checked out.
-C
Check in an empty directory as the new version.
-n new-version
The name of the new version. A master stub by this name must exist. If the name new-version is unqualified, it is interpreted relative to the site's default directory of packages, DefaultPackageParent. Defaults to the new-version attribute of session-dir if any; otherwise to the new-version attribute of work-dir, if any.
-w work-dir
The mutable working directory. If you place this option last on the command line, you can omit the -w. If work-dir is unqualified, it is relative to DefaultWorkParent/user, where user is your local user name. Defaults to the current directory.
-W
There is no working directory. Other flags whose default values depend on work-dir must be given explicitly, and the step of deleting the working directory is omitted.
-R repos
Check in a working directory and session from repos instead of the default local repository. The repository is specified by host name and TCP port number in the format host:port. The :port portion may be omitted; it defaults to [Repository]VestaSourceSRPC_port.
-d dstrepos
Replicate new-version to the specified destination repository after checking it in. The repository is specified by host name and TCP port number in the format host:port. The :port portion may be omitted; it defaults to [Repository]VestaSourceSRPC_port. If neither -d nor -D is given, the default is taken from the checkout-from attribute on the new-version stub; if this attribute does not have a value, no replication is done.
-D
Do not replicate new-version to another repository after checking it in.
-f
Force; omit sanity checking. The directory session-dir must be of type session (that is, its type attribute must include this value), unless the -f or -S flag is given. The directory work-dir must have a nonempty checkout-time attribute, unless the -f or -W flag is given. The directory tree rooted at work-dir must not have been modified since content was created, unless the -f, -c, or -C flag is given. The new-version must initially be a checkout stub (a master stub with a nonempty checkout-time attribute), unless the -f flag is given. Even with -f, new-version must be a master stub.

Configuration

The following values are obtained from the [UserInterface] section of the Vesta configuration file (vesta.cfg).

AppendableRootName
The filename under which the global root directory of Vesta repositories is mounted. Ordinarily set to /vesta.
MutableRootName
The filename under which the local tree of mutable directories provided by Vesta is mounted. Ordinarily set to /vesta-work.
DefaultPackageParent
The default directory to put new packages in. Ordinarily a subdirectory of the appendable root, named with an Internet domain name belonging to the local site.
DefaultWorkParent
The default parent directory for mutable working directory trees belonging to individual users. Ordinarily the same as the mutable root.
realm
Global user names are formed by appending @realm to the local name.
TimeFormat
A format string for strftime(3) to produce time strings for Vesta attributes. A common setting is "%a %b %e %T %Z %Y".

The following values are obtained from the [Repository] section of the Vesta configuration file.

VestaSourceSRPC_host
The host name of the default (local) repository.
VestaSourceSRPC_port
The default TCP port number for repositories.

Limitations

It is annoying when vcheckin deletes the current directory, which is what happens in the default case; you tend to get messages like "Stale NFS file handle" from the shell afterwards. Here is a csh alias that avoids the problem by automatically changing to the parent directory after a successful vcheckin:

alias vcheckin "pushd .. > /dev/null ; pushd > /dev/null ; \
	\vcheckin \!* || pushd > /dev/null ; popd > /dev/null"

See Also

vesta-intro(1), repos-ui(1), vadvance(1), vmake(1)

Author

Tim Mann

Last modified on Tue Apr 29 23:58:37 PDT 2003 by mann
     modified on Tue Nov 13 11:49:37 EST 2001 by ken@xorian.net   
     modified on Tue Jan 19 12:18:30 PST 1999 by heydon 
This page was generated automatically by mtex software.