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 02/11] lei up: prefix `remote' and `local' with `o_'
  2021-10-19  9:33  6% [PATCH 00/11] refining lei up+inspect Eric Wong
@ 2021-10-19  9:33  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2021-10-19  9:33 UTC (permalink / raw)
  To: meta

This will help distinguish between mail outputs and external
public-inboxes.
---
 lib/PublicInbox/LeiUp.pm | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/lib/PublicInbox/LeiUp.pm b/lib/PublicInbox/LeiUp.pm
index 396041771ff9..c35b2e42d49f 100644
--- a/lib/PublicInbox/LeiUp.pm
+++ b/lib/PublicInbox/LeiUp.pm
@@ -46,7 +46,7 @@ sub up1 ($$) {
 
 sub redispatch_all ($$) {
 	my ($self, $lei) = @_;
-	my $upq = [ (@{$self->{local} // []}, @{$self->{remote} // []}) ];
+	my $upq = [ (@{$self->{o_local} // []}, @{$self->{o_remote} // []}) ];
 	return up1($lei, $upq->[0]) if @$upq == 1; # just one, may start MUA
 
 	# FIXME: this is also used per-query, see lei->_start_query
@@ -81,12 +81,12 @@ sub lei_up {
 			$lei->fail('--all and --mua= are incompatible');
 		@outs = PublicInbox::LeiSavedSearch::list($lei);
 		if ($all eq 'local') {
-			$self->{local} = [ grep(!/$REMOTE_RE/, @outs) ];
+			$self->{o_local} = [ grep(!/$REMOTE_RE/, @outs) ];
 		} elsif ($all eq 'remote') {
-			$self->{remote} = [ grep(/$REMOTE_RE/, @outs) ];
+			$self->{o_remote} = [ grep(/$REMOTE_RE/, @outs) ];
 		} elsif ($all eq '') {
-			$self->{remote} = [ grep(/$REMOTE_RE/, @outs) ];
-			$self->{local} = [ grep(!/$REMOTE_RE/, @outs) ];
+			$self->{o_remote} = [ grep(/$REMOTE_RE/, @outs) ];
+			$self->{o_local} = [ grep(!/$REMOTE_RE/, @outs) ];
 		} else {
 			$lei->fail("only --all=$all not understood");
 		}
@@ -94,16 +94,16 @@ sub lei_up {
 		scalar(@outs) == 1 or die "BUG: lse set w/ >1 out[@outs]";
 		return up1($lei, $outs[0]);
 	} else {
-		$self->{remote} = [ grep(/$REMOTE_RE/, @outs) ];
-		$self->{local} = [ grep(!/$REMOTE_RE/, @outs) ];
+		$self->{o_remote} = [ grep(/$REMOTE_RE/, @outs) ];
+		$self->{o_local} = [ grep(!/$REMOTE_RE/, @outs) ];
 	}
 	$lei->{lse} = $lei->_lei_store(1)->write_prepare($lei)->search;
-	((@{$self->{local} // []} + @{$self->{remote} // []}) > 1 &&
+	((@{$self->{o_local} // []} + @{$self->{o_remote} // []}) > 1 &&
 		defined($opt->{mua})) and return $lei->fail(<<EOM);
 multiple outputs and --mua= are incompatible
 EOM
-	if ($self->{remote}) { # setup lei->{auth}
-		$self->prepare_inputs($lei, $self->{remote}) or return;
+	if ($self->{o_remote}) { # setup lei->{auth}
+		$self->prepare_inputs($lei, $self->{o_remote}) or return;
 	}
 	if ($lei->{auth}) { # start auth worker
 		require PublicInbox::NetWriter;

^ permalink raw reply related	[relevance 7%]

* [PATCH 00/11] refining lei up+inspect
@ 2021-10-19  9:33  6% Eric Wong
  2021-10-19  9:33  7% ` [PATCH 02/11] lei up: prefix `remote' and `local' with `o_' Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2021-10-19  9:33 UTC (permalink / raw)
  To: meta

"lei up" gains some flexibility in dealing with offline
situations.  "inspect" is slightly nicer-to-use

11/11 is preparation for "lei fsck"...

Eric Wong (11):
  test_common: lazy-require AutoReap
  lei up: prefix `remote' and `local' with `o_'
  lei: use die for external and query handling
  lei up: propagate redispatch_all failure via exit code
  lei: conditionally add "\n" to error messages
  lei up: support --exclude=, --no-(external|remote|local)
  lei: remove unused ->busy time arg
  doc: lei: describe lei-daemon-kill and upgrades
  lei inspect: add atfork hook
  lei inspect: show ISO8601 {rt} and {dt}, too
  lei_mail_sync: show non-matching SHA

 Documentation/lei-daemon-kill.pod | 29 +++++++++++++++++--
 Documentation/lei-overview.pod    |  8 +++++-
 Documentation/lei-up.pod          | 28 ++++++++++++++----
 lib/PublicInbox/LEI.pm            | 15 +++++-----
 lib/PublicInbox/LeiExternal.pm    | 15 ++++++++--
 lib/PublicInbox/LeiInspect.pm     | 11 +++++++
 lib/PublicInbox/LeiMailSync.pm    |  9 ++++--
 lib/PublicInbox/LeiOverview.pm    |  6 ++--
 lib/PublicInbox/LeiQuery.pm       | 27 ++++++-----------
 lib/PublicInbox/LeiSavedSearch.pm |  8 +++---
 lib/PublicInbox/LeiUp.pm          | 48 ++++++++++++++++++++++---------
 lib/PublicInbox/LeiXSearch.pm     |  7 +++--
 lib/PublicInbox/TestCommon.pm     |  3 +-
 13 files changed, 149 insertions(+), 65 deletions(-)

^ 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 --
2021-10-19  9:33  6% [PATCH 00/11] refining lei up+inspect Eric Wong
2021-10-19  9:33  7% ` [PATCH 02/11] lei up: prefix `remote' and `local' with `o_' 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).