[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to limit file revisions
Steven W. Orr
Re: How to limit file revisions
Tue, 25 Oct 2005 14:58:47 -0400 (EDT)
On Tuesday, Oct 25th 2005 at 16:51 -0200, quoth Maicon Stihler:
=>I'm having some troubles with files that get too large after a certain
=>time. What I would like to do is to erase past revisions and to keep
=>only a small number of revisions. I know that there is the admin -o
=>command, but Im not too sure how do I use it. I tried using 'cvs log
=>somefile' to see how many revisions the given file has, but I get this
=>error: CVS/Entries not found (or something alike, I dont remember the
=>right spelling) I found that logging is not enabled on cvs's config
=>Could someone give me some tips and ideas of how to perform this task?
cvs log only works in a workspace. If you're not in a workspace then use
You are correct that cvs admin -o will remove revisions. I assume you read
the manual. What part do you not understand?
Deletes ("outdates") the revisions given by RANGE.
Note that this command can be quite dangerous unless you know
_exactly_ what you are doing (for example see the warnings below
about how the REV1:REV2 syntax is confusing).
If you are short on disc this option might help you. But think
twice before using it--there is no way short of restoring the
latest backup to undo this command! If you delete different
revisions than you planned, either due to carelessness or (heaven
forbid) a CVS bug, there is no opportunity to correct the error
before the revisions are deleted. It probably would be a good
idea to experiment on a copy of the repository first.
Specify RANGE in one of the following ways:
Collapse all revisions between rev1 and rev2, so that CVS
only stores the differences associated with going from rev1
to rev2, not intermediate steps. For example, after `-o
1.3::1.5' one can retrieve revision 1.3, revision 1.5, or the
differences to get from 1.3 to 1.5, but not the revision 1.4,
or the differences between 1.3 and 1.4. Other examples: `-o
1.3::1.4' and `-o 1.3::1.3' have no effect, because there are
no intermediate revisions to remove.
Collapse revisions between the beginning of the branch
containing REV and REV itself. The branchpoint and REV are
left intact. For example, `-o ::18.104.22.168' deletes revision
22.214.171.124, revision 126.96.36.199, and everything in between, but
leaves 1.3 and 188.8.131.52 intact.
Collapse revisions between REV and the end of the branch
containing REV. Revision REV is left intact but the head
revision is deleted.
Delete the revision REV. For example, `-o 1.3' is equivalent
to `-o 1.2::1.4'.
Delete the revisions from REV1 to REV2, inclusive, on the
same branch. One will not be able to retrieve REV1 or REV2
or any of the revisions in between. For example, the command
`cvs admin -oR_1_01:R_1_02 .' is rarely useful. It means to
delete revisions up to, and including, the tag R_1_02. But
beware! If there are files that have not changed between
R_1_02 and R_1_03 the file will have _the same_ numerical
revision number assigned to the tags R_1_02 and R_1_03. So
not only will it be impossible to retrieve R_1_02; R_1_03
will also have to be restored from the tapes! In most cases
you want to specify REV1::REV2 instead.
Delete revisions from the beginning of the branch containing
REV up to and including REV.
Delete revisions from revision REV, including REV itself, to
the end of the branch containing REV.
None of the revisions to be deleted may have branches or locks.
If any of the revisions to be deleted have symbolic names, and one
specifies one of the `::' syntaxes, then CVS will give an error
and not delete any revisions. If you really want to delete both
the symbolic names and the revisions, first delete the symbolic
names with `cvs tag -d', then run `cvs admin -o'. If one
specifies the non-`::' syntaxes, then CVS will delete the
revisions but leave the symbolic names pointing to nonexistent
revisions. This behavior is preserved for compatibility with
previous versions of CVS, but because it isn't very useful, in the
future it may change to be like the `::' case.
Due to the way CVS handles branches REV cannot be specified
symbolically if it is a branch. *Note Magic branch numbers::, for
Make sure that no-one has checked out a copy of the revision you
outdate. Strange things will happen if he starts to edit it and
tries to check it back in. For this reason, this option is not a
good way to take back a bogus commit; commit a new revision
undoing the bogus change instead (*note Merging two revisions::).
Time flies like the wind. Fruit flies like a banana. Stranger things have .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steve_orr at guardium dot com