From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH 1/2] lei_mirror: trim current symlinks from warning
Date: Mon, 12 Dec 2022 09:58:53 +0000 [thread overview]
Message-ID: <20221212095854.17921-2-e@80x24.org> (raw)
In-Reply-To: <20221212095854.17921-1-e@80x24.org>
This quiets needless warnings from current symlinks, while still
complaining about out-of-date ones.
---
lib/PublicInbox/LeiMirror.pm | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/PublicInbox/LeiMirror.pm b/lib/PublicInbox/LeiMirror.pm
index 33cf55ab..d6d2c69e 100644
--- a/lib/PublicInbox/LeiMirror.pm
+++ b/lib/PublicInbox/LeiMirror.pm
@@ -707,6 +707,7 @@ sub update_ent {
}
if (my $symlinks = $self->{-ent}->{symlinks}) {
my $top = File::Spec->rel2abs($self->{dst});
+ push @{$self->{-new_symlinks}}, @$symlinks;
for my $p (@$symlinks) {
my $ln = "$top/$p";
$ln =~ tr!/!/!s;
@@ -1007,6 +1008,8 @@ sub dump_project_list ($$) {
$new{substr($_, 1)} = 1 for keys %$m; # drop leading '/'
my @list = sort keys %new;
my @remote = grep { !defined($new{$_}) } @list;
+ my %lnk = map { substr($_, 1) => undef } @{$self->{-new_symlinks}};
+ @remote = grep { !exists($lnk{$_}) } @remote;
warn <<EOM if @remote;
The following local repositories are ignored/gone from $self->{src}:
@@ -1058,6 +1061,7 @@ sub try_manifest {
}
local $self->{chg} = {};
local $self->{-local_manifest} = load_current_manifest($self);
+ local $self->{-new_symlinks} = [];
my ($path_pfx, $n, $multi) = multi_inbox($self, \$path, $m);
return $lei->child_error(1, $multi) if !ref($multi);
my $v2 = delete $multi->{v2};
next prev parent reply other threads:[~2022-12-12 9:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-12 9:58 [PATCH 0/2] lei_mirror: minor tweaks and fixups Eric Wong
2022-12-12 9:58 ` Eric Wong [this message]
2022-12-12 9:58 ` [PATCH 2/2] lei_mirror: break circular references Eric Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://public-inbox.org/README
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221212095854.17921-2-e@80x24.org \
--to=e@80x24.org \
--cc=meta@public-inbox.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).