Three patches for optimize subcommands plus one cleanup dependency.
4 patches for repository http://darcs.net/screened:
patch 83f6afeba5d5f9da1320d34aeec61f86f766e857
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Jun 25 19:36:00 CEST 2021
* optimize reorder: add --deep/--shallow option
With --shallow (the default) the behavior is as before: we make the latest
tag clean and create a Tagged section for it (which will become an inventory
when saved to disk). Note that this may make the latest clean tag dirty. It
may also increase the size of the head inventory and therefore fail to be an
optimization, since the latest tag may cover less patches than an earlier
clean tag.
With --deep, we traverse all patches in order, trying to make every tag
clean as long as that doesn't make any previous clean tag dirty, and create
Tagged sections (and thus inventories) for all of them. Since this never
makes a clean tag dirty, the size of the head inventory is guaranteed to be
smaller or equal to the original one. This operation is idempotent.
patch 5d6bdbf9a695247173d9bbc6ff9afa66a1cc73d7
Author: Ben Franksen <ben.franksen@online.de>
Date: Thu Nov 24 23:54:43 CET 2022
* optimize (un)compress: also handle pristine
patch 4afe38f0a53cc3551436be01a4ebae3be1c02e22
Author: Ben Franksen <ben.franksen@online.de>
Date: Mon Jun 27 19:18:05 CEST 2022
* use System.Directory.withCurrentDirectory instead of Darcs.Util.File.<same>
This does not catch exceptions and has no special treatment of "". Catching
expceptions such as "does not exist" in such a generic way is bad, so this
is not just simpler but also more informative to the end user. The special
treatment of "" seems to be no longer needed.
patch fcf29158c008dcf67ad115e69078c508f25dd48d
Author: Ben Franksen <ben.franksen@online.de>
Date: Fri Nov 25 22:43:56 CET 2022
* optimize cache: remove traversal of darcs repos and clean the cache properly
Previously you could pass repositories as arguments (and if you didn't, it
would search your whole HOME for darcs repos) and then it would do the
equivalent of `darcs clean` on them, too. This functionality is is out of
scope for darcs and can be emulated with a simple shell command e.g.
> find -type d -name _darcs -execdir darcs optimize clean \;
What remains is to clean the global cache. There is a much better solution
for this and it is already implemented in Darcs.Util.Cache.cleanCaches:
simply remove all files in the cache that have a hard-link count < 2. This
is what the command now does (for all three types of hashed dirs).
Attachments
|