user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 4/7] v2writable: purge ignores non-existent git epoch directories
  2019-01-11  4:10  6% [PATCH 0/7] implement purge tool Eric Wong
@ 2019-01-11  4:10  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-01-11  4:10 UTC (permalink / raw)
  To: meta

We don't require every git epoch to exist since we support
the --skip feature in public-inbox-init.
---
 lib/PublicInbox/V2Writable.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm
index 08d18fc..970244e 100644
--- a/lib/PublicInbox/V2Writable.pm
+++ b/lib/PublicInbox/V2Writable.pm
@@ -286,7 +286,9 @@ sub purge_oids {
 	my $pfx = "$self->{-inbox}->{mainrepo}/git";
 	my $purges = [];
 	foreach my $i (0..$self->{epoch_max}) {
-		my $git = PublicInbox::Git->new("$pfx/$i.git");
+		my $git_dir = "$pfx/$i.git";
+		-d $git_dir or next;
+		my $git = PublicInbox::Git->new($git_dir);
 		my $im = $self->import_init($git, 0, 1);
 		$purges->[$i] = $im->purge_oids($purge);
 	}
-- 
EW


^ permalink raw reply related	[relevance 7%]

* [PATCH 0/7] implement purge tool
@ 2019-01-11  4:10  6% Eric Wong
  2019-01-11  4:10  7% ` [PATCH 4/7] v2writable: purge ignores non-existent git epoch directories Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-01-11  4:10 UTC (permalink / raw)
  To: meta

Of course, I found and fixed a bunch of little purge bugs
in the process :x

Still need to WTFM so I can tell others to RTFM :>

The following changes since commit b0e5062d43a96372801713ef78a78d6a1bc852bc:

  Merge commit 'mem' (2019-01-10 21:41:55 +0000)

are available in the Git repository at:

  https://public-inbox.org/ purge

for you to fetch changes up to 440b0feaa209e12e4bcb8ef16a95041fce71e7dc:

  implement public-inbox-purge tool (2019-01-11 04:07:17 +0000)

----------------------------------------------------------------
Eric Wong (7):
      hoist out resolve_repo_dir from -index
      import: purge: reap fast-export process
      v2writable: ->purge returns undef on no-op
      v2writable: purge ignores non-existent git epoch directories
      v2writable: cleanup processes when done
      v2writable: read epoch on purge
      implement public-inbox-purge tool

 MANIFEST                      |   4 ++
 lib/PublicInbox/Admin.pm      |  44 +++++++++++++++++
 lib/PublicInbox/Import.pm     |   3 +-
 lib/PublicInbox/V2Writable.pm |  16 ++++--
 script/public-inbox-index     |  32 +-----------
 script/public-inbox-purge     | 111 ++++++++++++++++++++++++++++++++++++++++++
 t/admin.t                     |  81 ++++++++++++++++++++++++++++++
 t/purge.t                     |  97 ++++++++++++++++++++++++++++++++++++
 t/v2writable.t                |   3 ++
 9 files changed, 357 insertions(+), 34 deletions(-)
 create mode 100644 lib/PublicInbox/Admin.pm
 create mode 100755 script/public-inbox-purge
 create mode 100644 t/admin.t
 create mode 100644 t/purge.t

-- 
EW

^ permalink raw reply	[relevance 6%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-01-11  4:10  6% [PATCH 0/7] implement purge tool Eric Wong
2019-01-11  4:10  7% ` [PATCH 4/7] v2writable: purge ignores non-existent git epoch directories Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).