@@ -107,8 +107,8 @@ def quarterly_3monthly_period_func(dt):
107107PRUNE_QUARTERLY_3MONTHLY = PruningRule ("quarterly_3monthly" , quarterly_3monthly_period_func )
108108PRUNE_YEARLY = PruningRule ("yearly" , pattern_period_func ("%Y" ))
109109
110- # Fake rule used to indicate archives skipped by --since
111- PRUNE_SINCE = PruningRule ("skip" , unique_period_func ())
110+ # Fake rule used to indicate archives skipped by --from
111+ PRUNE_FROM = PruningRule ("skip" , unique_period_func ())
112112
113113PRUNING_RULES = [
114114 PRUNE_KEEP ,
@@ -182,18 +182,18 @@ def do_prune(self, args, repository, manifest):
182182 # Archives to keep along with the rule that ensured them being kept
183183 keep = {}
184184
185- since = getattr (args , PRUNE_SINCE .key )
185+ from_timestamp = getattr (args , PRUNE_FROM .key )
186186 candidate_archives = archives
187187
188- if since is not None :
189- base_timestamp = since
188+ if from_timestamp is not None :
189+ base_timestamp = from_timestamp
190190
191- # `--since ` is a prefilter: Archives made at or after this time are kept by default. They are not considered
191+ # `--from ` is a prefilter: Archives made at or after this time are kept by default. They are not considered
192192 # for pruning at all and thus won't falsely occupy an active retention period.
193193 for archive in archives :
194- if archive .ts < since :
194+ if archive .ts < from_timestamp :
195195 break
196- keep [archive ] = KeepResult (rule = PRUNE_SINCE , idx = len (keep ))
196+ keep [archive ] = KeepResult (rule = PRUNE_FROM , idx = len (keep ))
197197 candidate_archives = archives [len (keep ) :]
198198 else :
199199 base_timestamp = datetime .now ().astimezone ()
@@ -366,7 +366,7 @@ def build_parser_prune(self, subparsers, common_parser, mid_common_parser):
366366 policy. It accepts a count or a time interval for retention (e.g.
367367 ``10`` or ``7d``, ``4w``). With a count it keeps at most that many
368368 recent archives; with an interval it keeps all archives created within
369- that time window. When ``--since `` is given together with an interval
369+ that time window. When ``--from `` is given together with an interval
370370 retention, the interval is measured backwards from that timestamp
371371 instead of from the current time. See ``Date and Time`` docs for exact
372372 INTERVAL format.
@@ -380,14 +380,14 @@ def build_parser_prune(self, subparsers, common_parser, mid_common_parser):
380380 period, e.g. one per day or one per month until the retention count is
381381 met). With a retention interval, they keep one archive per period
382382 within that time span (e.g. at most one per day in a span of seven
383- days, even if some days had none) -- measured from ``--since `` if given,
383+ days, even if some days had none) -- measured from ``--from `` if given,
384384 otherwise from the current time. Specifying a count of ``-1`` (or the
385385 word ``all``) means no limit. A zero count or zero-length interval
386386 keeps nothing.
387387
388- The ``--since `` option restricts pruning to archives older than the given
388+ The ``--from `` option restricts pruning to archives older than the given
389389 TIMESTAMP. Archives made at or after this timestamp are kept unconditionally
390- as a pre-filter. When ``--since `` is used together with interval-based
390+ as a pre-filter. When ``--from `` is used together with interval-based
391391 ``--keep-*`` options (e.g. ``--keep-daily 7d``), the interval is measured
392392 backwards from the given timestamp rather than from the current time.
393393 Count-based retention does not count the unconditionally kept archives.
@@ -417,10 +417,10 @@ def build_parser_prune(self, subparsers, common_parser, mid_common_parser):
417417 older history gradually thins out with time. For example,
418418 ``--keep-daily 7d --keep-weekly 4w --keep-monthly 6`` keeps an
419419 archive per day for the past week, per week for the past month, and
420- one per month for six months after that. Combine this with ``--since ``
420+ one per month for six months after that. Combine this with ``--from ``
421421 to align time windows to calendar boundaries rather than the exact
422422 moment you run prune for more predictable behavior of coarser rules:
423- ``--keep-daily 7d --keep-weekly 4w --since $(date +%F)``.
423+ ``--keep-daily 7d --keep-weekly 4w --from $(date +%F)``.
424424
425425 Count-based retention keeps archives less bound to time. For instance,
426426 ``--keep-yearly 3`` retains 3 yearly archives however far back they
@@ -476,9 +476,9 @@ def build_parser_prune(self, subparsers, common_parser, mid_common_parser):
476476 "Some keys are always present. Note: JSON can only represent text." ,
477477 )
478478 subparser .add_argument (
479- "--since " ,
479+ "--from " ,
480480 metavar = "TIMESTAMP" ,
481- dest = PRUNE_SINCE .key ,
481+ dest = PRUNE_FROM .key ,
482482 type = timestamp ,
483483 action = Highlander ,
484484 help = "only consider archives older than this for pruning" ,
0 commit comments