From 02a9630c7198c0079439d1904816f2f2a844aa14 Mon Sep 17 00:00:00 2001 From: Thomas Nikolajsen Date: Wed, 16 Jul 2008 01:27:09 +0000 Subject: [PATCH] Update `-t' flag; now it is always transaction-id. --- usr.bin/undo/undo.1 | 22 ++++++++++++---------- usr.bin/undo/undo.c | 9 ++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/usr.bin/undo/undo.1 b/usr.bin/undo/undo.1 index a913f22b2c..dea40da9d4 100644 --- a/usr.bin/undo/undo.1 +++ b/usr.bin/undo/undo.1 @@ -30,7 +30,7 @@ .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $DragonFly: src/usr.bin/undo/undo.1,v 1.3 2008/07/15 17:04:35 thomas Exp $ +.\" $DragonFly: src/usr.bin/undo/undo.1,v 1.4 2008/07/16 01:27:09 thomas Exp $ .Dd May 31, 2008 .Dt UNDO 1 .Os @@ -41,10 +41,9 @@ .Nm .Op Fl dDhiuv .Op Fl o Ar outfile -.Op Fl t Ar {s,m,h,d} -.Op Fl t Ar {s,m,h,d} -.Ar file -.Ar ... +.Op Fl t Ar transaction-id +.Op Fl t Ar transaction-id +.Ar .Sh DESCRIPTION The .Nm @@ -86,16 +85,18 @@ each file path. When used with multiple files '%%' must be used in the specification to indicate a '%'. When used with a single file the .Ar outfile string is used verbatim. -.It Fl t Ar {s,m,h,d} -Specify how far to go back relative to the current time. A HAMMER -transaction id (0x16chars) may also be specified. If not specified +.It Fl t Ar transaction-id +Specify how far to go back in time, by giving a HAMMER +transaction id (0x16chars). If not specified the program will attempt to locate the most recent version of the file(s) prior to the current version. This option does not apply if .Fl h is specified. .Pp -A second time specification may be given when the +A second +.Fl t +specification may be given when the .Fl d or .Fl D @@ -122,4 +123,5 @@ utility first appeared in .Sh BUGS HAMMER only synchronizes information to disk every 30 seconds or so and a quick file create / delete is done entirely in system memory and cannot -be undone. This can be worked around by running 'hammer synctid '. +be undone. This can be worked around by running +.Dq Ar hammer synctid Op filesystem . diff --git a/usr.bin/undo/undo.c b/usr.bin/undo/undo.c index 71a5862356..cdf27f4624 100644 --- a/usr.bin/undo/undo.c +++ b/usr.bin/undo/undo.c @@ -31,7 +31,7 @@ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $DragonFly: src/usr.bin/undo/undo.c,v 1.3 2008/07/15 17:04:35 thomas Exp $ + * $DragonFly: src/usr.bin/undo/undo.c,v 1.4 2008/07/16 01:27:09 thomas Exp $ */ /* * UNDO - retrieve an older version of a file. @@ -614,7 +614,7 @@ timestamp(hammer_ioc_hist_entry_t hen) static void usage(void) { - fprintf(stderr, "undo [-dDhiuv] [-o outfile] [-t n{s,m,h,d}] [-t n...] " + fprintf(stderr, "undo [-dDhiuv] [-o outfile] [-t transaction-id] [-t transaction-id] " "file ...\n"); fprintf(stderr, " -d Forward diff\n" " -D Reverse diff\n" @@ -623,9 +623,8 @@ usage(void) " -u Generate .undo files\n" " -v Verbose\n" " -o file Output to the specified file\n" - " -t spec Retrieve as of n secs,mins,etc ago\n" - " (a second `-t spec' to diff two versions)\n" - " (a 0x transaction id may also be specified)\n"); + " -t TID Retrieve as of transaction-id, TID\n" + " (a second `-t TID' to diff two versions)\n"); exit(1); } -- 2.41.0