qdelrev (see also)

You use qdelrev to delete specific revisions from a QVCS archive so that the history associated with those revisions won't consume any space in the QVCS archive. Once deleted, all information about those revisions is lost.

You typically use qdelrev to delete revisions that aren't needed anymore. This usually happens after a major product release, or after a point in the project where you are confident that you'll never need to retrieve the deleted revisions again.

qdelrev is not a merge utility. When you delete a revision from the QVCS archive, all information about that revision is lost, but, if there are newer revisions within the QVCS archive than the one(s) deleted, these retain whatever edits that may have been described by the deleted revisions.

If there are any labels associated with any of the deleted revisions, qdelrev also removes those labels from the QVCS archive. Floating labels are not removed from the QVCS archive until all revisions on the branch associated with the floating label are deleted.

Restrictions

qdelrev can only delete consecutive revisions within a QVCS archive that are on the same branch. A revision range that includes either a locked revision or a branch point will not delete the locked or branch point revision. This means that if you have a QVCS archive with branches, to delete branch revisions, you must "prune" the revision tree starting with the outermost branches and work your way back to the trunk. You have to run qdelrev multiple times, once for each branch that you want to prune.

Command Template

qdelrev {-d DATERANGE}|{-r REVISIONRANGE}|{-label LABEL} [-offset LABELOFFSET] [-yes|-no|-proceed] [-q] filename

*One of the options enclosed in {} must be specified.

where:

-d DATERANGE (cannot be used with -r or -label)

Specifies the range of dates of the revisions to be deleted. The format for the date range is:

startDate:endDateFor a range between two fixed dates. The first date must precede the second date. The date range is fully inclusive; i.e., all revisions on the beginning and ending dates will be deleted in addition to those on the dates between.
*:endDateFor all revisions preceding midnight of the specified date.
startDate:*For all revisions created on or following the given date.
DateFor all revisions created on the given date.

In each case, the date format is specific to your locale. You should use the short date format defined via your Windows regional settings.

-r REVISIONRANGE (cannot be used with -d or -label)

Specifies the revision or range of revisions to be deleted.

The format for the revision or revision range is:

Major.Minor...for the deletion of a single revision. This can be a wildcard revision, in which case, all revisions matching the wildcard will be deleted. For example 1.* would match all revisions with a major number of 1; 1.1.* would match all branch revisions that are attached to the trunk at revision 1.1.
LowMajor.LowMinor...:HiMajor.HiMinor...for the deletion of all revisions between the low and hi revisions (inclusive).
*:HiMajor.HiMinorfor the deletion of all revisions up to and including the hi revision.
LowMajor.LowMinor:*for the deletion of the low revision and all revisions newer than the low revision.

-label LABEL (cannot be used with -d or -r)

Specifies the label of the revision to be deleted. If more than a single word, the label should be enclosed in single or double quotes. The single revision associated with the label will be deleted unless the -offset (see below) switch is also used.

-offset LABELOFFSET (optional, can only be used with -label)

If a -label switch is used, the -offset switch may be used to specify a number of revisions to save that are older than the revision specified with the -label switch. Specifying an offset value of 0 causes all revisions older than the revision specified by the -label switch to be deleted, but not the specified revision itself. Specifying an offset value of 1 will cause the one revision preceding the specified revision to be saved, and all revisions preceding that one will be deleted.

-proceed|-yes|-no (optional)

If specified, qdelrev will use these options when seeking your permission to delete the requested revisions. -proceed and -no cause qdelrev to not delete the revisions; -yes causes qdelrev to delete the revisions. If you are deleting all the revisions within a QVCS archive, a -yes switch is ignored, and qdelrev asks you to confirm the revision deletions. If you then answer Yes, qdelrev deletes the QVCS archive.

Unless the -yes, -no, or -proceed switch is specified, qdelrev will ask for confirmation before deleting any revisions.

filename (required)

The work file associated with the QVCS archive from which you are deleting revisions.

Examples

qdelrev -r 1.2 foobar.c
deletes the 1.2 revision from foobar.c's QVCS archive.

qdelrev -r 1.2:1.5 foobar.c
deletes revisions 1.2 through 1.5 (inclusive) from foobar.c's QVCS archive.

qdelrev -r 1.3.1.1:1.3.1.5 foobar.c
deletes branch revisions 1.3.1.1 through 1.3.1.5 (inclusive) from foobar.c's QVCS archive.

qdelrev -r 1.3 -yes foobar.c
deletes the 1.3 revision from foobar.c's QVCS archive without asking for confirmation.

qdelrev -label 'Version 1' foobar.c
deletes the revision associated with the 'Version 1' label. The label will also be deleted from the QVCS archive header.

qdelrev -label 'Version 1' -offset 0 foobar.c
deletes all revisions that are older than the revision associated with the 'Version 1' label. The revision associated with the 'Version 1' label is not deleted.

qdelrev -label 'Version 1' -offset 5 foobar.c
retains the 5 revisions that precede the revision associated with the 'Version 1' label. All revisions preceding that are deleted.

qdelrev -r 1.2.1.* foobar.c
deletes all revisions on the 1.2.1 branch.


Command Line Utilities
qdelrevqdiffqeditqgetqidentqlockqlogqmergeqmodhdrqmodrevqputqstampqunlockqunstampqrecurse


See also: QWin's corresponding Delete Revisions... option.