From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id ABC761F5CB for ; Wed, 2 Oct 2024 22:39:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1727908742; bh=L/2zQeMaPR4OEOqMXeUm0lmFrI0Br1kHPWe0y8Oa8Xo=; h=From:To:Subject:Date:In-Reply-To:References:From; b=RW68fpIJ5p9PhIL/HJ1/FvF5Q++qIYtYkhy0Tjjb4dwF0xt8yhNXEa2LL4pJo/MIU vs4CHmnIH1uOJ1gNK1i/hQ8DSJrRfx8WlRpeOYOa0LYwd+Cyu5IWY/nnG3+Fo3F6NH YPStUCqBlqHDZKPJYXISgczQBw8ibof6/2bLJNvo= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH v2 0/3] viewvcs: commit => query improvements Date: Wed, 2 Oct 2024 22:38:59 +0000 Message-ID: <20241002223902.4139389-1-e@80x24.org> In-Reply-To: <20241002194448.4123393-1-e@80x24.org> References: <20241002194448.4123393-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Threw in some minor formatting and HTML fixups, as well. Most notably, there is consistently a
before the textarea. Eric Wong (3): viewvcs: close the
 tag if no query is extracted
  viewvcs: use wider textarea for search query
  viewvcs: generate search query for merge commits

 lib/PublicInbox/ViewVCS.pm | 75 ++++++++++++++++++++++++++++----------
 1 file changed, 55 insertions(+), 20 deletions(-)

Range-diff against v1:
-:  -------- > 1:  62e2c882 viewvcs: close the 
 tag if no query is extracted
-:  -------- > 2:  f4b73a39 viewvcs: use wider textarea for search query
1:  8e9b1865 ! 3:  b49fa73f viewvcs: generate search query for merge commits
    @@ lib/PublicInbox/ViewVCS.pm: sub ibx_url_for {
     +			$in_titles = 1;
     +		} elsif ($in_titles) { # commit titles
     +			if (s/^  //) { # break up Xapian phrases
    -+				$t = join ' AND ', map { qq{s:"$_"} }
    ++				$t = join " AND\n ", map { qq{s:"$_"} }
     +					split /["\x{201c}\x{201d}]+/;
     +				push @s, $t if $t ne 's:"..."';
     +			} else { # trailing text or trailers?
    @@ lib/PublicInbox/ViewVCS.pm: committer $co
      	if (-s $fh > $MAX_SIZE) {
     @@ lib/PublicInbox/ViewVCS.pm: EOM
      		# commit?
    + 		print $zfh '
'; my ($rows, $q) = PublicInbox::View::dfqry_text $ctx, $s; - if ($rows) { +- if ($rows) { - my $ibx_url = ibx_url_for($ctx); - my $alt; - if (defined $ibx_url) { @@ lib/PublicInbox/ViewVCS.pm: EOM - $ibx_url = $upfx; - $alt = ''; - } - print $zfh <
find related emails, including ancestors/descendants/conflicts
    -@@ lib/PublicInbox/ViewVCS.pm: id=related>
find related emails, including ancestors/descendants/conflicts
    + 
    + \t(help)
EOM - } - } +- } ++ } + if ($merge_titles) { + print $zfh <
find merged patch emails
    ++
find merged patch emails
     +