Project

General

Profile

Actions

Bug #1319

closed

another undo patch: a feature request and implementation, should it be of interest

Added by joelkp about 15 years ago. Updated about 15 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

The previous patch I sent came about after fiddling with the undo
utility source for another reason, this being a feature I wanted to
try implementing - no idea if of interest to you; if not, I can always
continue to use it regardless.

This patch does not change the usage notice nor documentation, so this
remains to do. (and perhaps stylistic or other changes if the code is
not up to your standards or I messed up somewhere)

The feature (the point of it being usability) is a new option, a dash
followed immediately by one or more digits, this number being the
number of revisions to go back from the present (so -1 matches the
default, -0 the present revision). Each such argument replaces a [-t
transaction-id] argument, so you can use one of either, one of each,
or two of one of them.

So for instance, if you want to diff the revision three versions back
with the one two versions back, you can for example use one of:

undo -3 -d -2 filename
undo -3d2 filename
undo -2D3 filename

These giving the same result. (this - two of these numbers for a
comparison - however, requires the previously sent patch, since it
fixes what seems a bug, namely that a second transaction id -
alternatively number as above, given this patch - is left unused after
being set in main()) This seems to me rather quicker and simpler to do
than using

undo -i

to get a list of transaction ids, then finding and using the relevant
one or two, if accessing revision(s) a given number of versions back
is all you want to do.


Files

undo.patch (3.45 KB) undo.patch joelkp, 03/22/2009 08:17 PM
undo.patch (3.6 KB) undo.patch joelkp, 03/23/2009 01:28 AM
undo.patch (4.73 KB) undo.patch joelkp, 03/29/2009 03:40 AM
undo.patch (3.13 KB) undo.patch joelkp, 03/29/2009 02:50 PM
Actions

Also available in: Atom PDF