librelist archives

« back to archive

--dry-run

--dry-run

From:
Dan Christensen
Date:
2014-02-19 @ 02:07
I like the replacement of "verify" with "extract --dry-run".

A few ideas.

A --dry-run option for prune would probably be useful for testing
prune options, especially since they are a bit counterintuitive.
And it would be very easy to implement, if none of the pruning
was actually simulated.  I can take a stab at it if you like.

For create, I also think a --dry-run option could be useful.  By
default, it would mean that not much happened.  But if -v is specified,
then it would go through the specified paths and the exclude options,
and list the files that would be included, which would help when
creating exclude patterns.  And if --stats was specified, it could
actually simulate the de-duplication, and report back the usual stats.
This sounds a bit trickier to implement, beyond what I could do.

By the way, it's common to make -n a short form for --dry-run
(e.g. rsync does this).

Oh, and since the UI is changed by the removal of "verify", maybe it's
ok to rename the prune options without warning?  Or should "verify" be
translated into "extract --dry-run", with a warning?

Dan

Re: [attic] --dry-run

From:
Jonas Borgström
Date:
2014-02-19 @ 22:40
On 2014-02-19 03:07, Dan Christensen wrote:
> I like the replacement of "verify" with "extract --dry-run".
> 
> A few ideas.
> 
> A --dry-run option for prune would probably be useful for testing
> prune options, especially since they are a bit counterintuitive.
> And it would be very easy to implement, if none of the pruning
> was actually simulated.  I can take a stab at it if you like.

That would be great!

> For create, I also think a --dry-run option could be useful.  By
> default, it would mean that not much happened.  But if -v is specified,
> then it would go through the specified paths and the exclude options,
> and list the files that would be included, which would help when
> creating exclude patterns.  And if --stats was specified, it could
> actually simulate the de-duplication, and report back the usual stats.
> This sounds a bit trickier to implement, beyond what I could do.

Yeah, that could be useful. But the --stats part might not be worth the
effort...

> By the way, it's common to make -n a short form for --dry-run
> (e.g. rsync does this).

Agreed, I've added that now

> Oh, and since the UI is changed by the removal of "verify", maybe it's
> ok to rename the prune options without warning?  Or should "verify" be
> translated into "extract --dry-run", with a warning?

I just pushed a change that makes the deprecated "attic verify" and
"prune --hourly|..." options work but logs a warning.

/ Jonas