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 1/2] examples/grok-pull.post_update_hook: use "inbox_dir"
  2019-10-16  8:59  7% [PATCH 0/2] rename "mainrepo" to "inboxdir" Eric Wong
@ 2019-10-16  8:59  6% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2019-10-16  8:59 UTC (permalink / raw)
  To: meta

Move away from using "mainrepo" since it's confusing to
new users, especially with v2.
---
 examples/grok-pull.post_update_hook.sh | 28 +++++++++++++-------------
 1 file changed, 14 insertions(+), 14 deletions(-)

diff --git a/examples/grok-pull.post_update_hook.sh b/examples/grok-pull.post_update_hook.sh
index 66c5cea5..ab4e54e7 100755
--- a/examples/grok-pull.post_update_hook.sh
+++ b/examples/grok-pull.post_update_hook.sh
@@ -15,19 +15,19 @@ if git --git-dir="$full_git_dir" ls-tree --name-only HEAD | \
 	grep -E '^(m|d)$' >/dev/null
 then
 	inbox_fmt=2
-	inbox_mainrepo=$(expr "$full_git_dir" : "$EPOCH2MAIN")
-	inbox_name=$(basename "$inbox_mainrepo")
-	msgmap="$inbox_mainrepo"/msgmap.sqlite3
+	inbox_dir=$(expr "$full_git_dir" : "$EPOCH2MAIN")
+	inbox_name=$(basename "$inbox_dir")
+	msgmap="$inbox_dir"/msgmap.sqlite3
 else
 	inbox_fmt=1
-	inbox_mainrepo="$full_git_dir"
-	inbox_name=$(basename "$inbox_mainrepo" .git)
-	msgmap="$inbox_mainrepo"/public-inbox/msgmap.sqlite3
+	inbox_dir="$full_git_dir"
+	inbox_name=$(basename "$inbox_dir" .git)
+	msgmap="$inbox_dir"/public-inbox/msgmap.sqlite3
 fi
 
 # run public-inbox-init iff unconfigured
-cfg_mainrepo=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".mainrepo)
-case $cfg_mainrepo in
+cfg_dir=$(git config -f "$PI_CONFIG" publicinbox."$inbox_name".dir)
+case $cfg_dir in
 '')
 	remote_git_url=$(git --git-dir="$full_git_dir" config remote.origin.url)
 	case $remote_git_url in
@@ -47,7 +47,7 @@ case $cfg_mainrepo in
 	esac
 
 	config_url="$remote_inbox_url"/_/text/config/raw
-	remote_config="$inbox_mainrepo"/remote.config.$$
+	remote_config="$inbox_dir"/remote.config.$$
 	trap 'rm -f "$remote_config"' EXIT
 	if curl --compressed -sSf -v "$config_url" >"$remote_config"
 	then
@@ -68,15 +68,15 @@ case $cfg_mainrepo in
 		newsgroups=
 		addresses="$inbox_name@$$.$(hostname).example.com"
 		echo >&2 "E: curl $config_url failed"
-		echo >&2 "E: using bogus <$addresses> for $inbox_mainrepo"
+		echo >&2 "E: using bogus <$addresses> for $inbox_dir"
 	fi
 	local_url="http://127.0.0.1:8080/$inbox_name"
 	public-inbox-init -V$inbox_fmt "$inbox_name" \
-		"$inbox_mainrepo" "$local_url" $addresses
+		"$inbox_dir" "$local_url" $addresses
 
 	if test $? -ne 0
 	then
-		echo >&2 "E: public-inbox-init failed on $inbox_mainrepo"
+		echo >&2 "E: public-inbox-init failed on $inbox_dir"
 		exit 1
 	fi
 
@@ -87,7 +87,7 @@ case $cfg_mainrepo in
 		# only one newsgroup per inbox
 		break
 	done
-	echo "I: $inbox_name at $inbox_mainrepo ($addresses) $local_url"
+	echo "I: $inbox_name at $inbox_dir ($addresses) $local_url"
 	;;
 esac
 
@@ -102,7 +102,7 @@ then
 		: v2 inboxes may be init-ed with an empty msgmap
 		;;
 	*)
-		$EATMYDATA public-inbox-index -v "$inbox_mainrepo"
+		$EATMYDATA public-inbox-index -v "$inbox_dir"
 		;;
 	esac
 fi

^ permalink raw reply related	[relevance 6%]

* [PATCH 0/2] rename "mainrepo" to "inboxdir"
@ 2019-10-16  8:59  7% Eric Wong
  2019-10-16  8:59  6% ` [PATCH 1/2] examples/grok-pull.post_update_hook: use "inbox_dir" Eric Wong
  0 siblings, 1 reply; 2+ results
From: Eric Wong @ 2019-10-16  8:59 UTC (permalink / raw)
  To: meta

"mainrepo" is a bad name made even more confusing given the
v2 layout.  See PATCH 2/2 for more reasoning.

Eric Wong (2):
  examples/grok-pull.post_update_hook: use "inbox_dir"
  config: support "inboxdir" in addition to "mainrepo"

 Documentation/public-inbox-config.pod  | 19 +++++++++-----
 Documentation/public-inbox-convert.pod |  2 +-
 Documentation/public-inbox-init.pod    |  2 +-
 Documentation/public-inbox-watch.pod   |  4 +--
 examples/grok-pull.post_update_hook.sh | 28 ++++++++++-----------
 examples/public-inbox-config           |  6 +++--
 lib/PublicInbox/Admin.pm               |  8 +++---
 lib/PublicInbox/AdminEdit.pm           |  4 +--
 lib/PublicInbox/AltId.pm               |  4 +--
 lib/PublicInbox/Config.pm              | 10 +++++---
 lib/PublicInbox/Inbox.pm               | 14 +++++------
 lib/PublicInbox/InboxWritable.pm       |  2 +-
 lib/PublicInbox/Search.pm              |  6 ++---
 lib/PublicInbox/SearchIdx.pm           |  8 +++---
 lib/PublicInbox/V2Writable.pm          | 16 ++++++------
 lib/PublicInbox/WwwAtomStream.pm       |  2 +-
 lib/PublicInbox/WwwListing.pm          |  2 +-
 lib/PublicInbox/WwwStream.pm           |  2 +-
 lib/PublicInbox/WwwText.pm             |  3 +++
 lib/PublicInbox/Xapcmd.pm              |  4 +--
 script/public-inbox-convert            | 16 ++++++------
 script/public-inbox-edit               |  2 +-
 script/public-inbox-init               | 16 ++++++------
 script/public-inbox-mda                |  2 +-
 scripts/dupe-finder                    |  2 +-
 scripts/import_vger_from_mbox          |  6 ++---
 t/admin.t                              |  2 +-
 t/altid.t                              |  2 +-
 t/altid_v2.t                           |  6 ++---
 t/cgi.t                                |  2 +-
 t/config.t                             | 34 +++++++++++++++++++-------
 t/config_limiter.t                     |  4 +--
 t/convert-compact.t                    | 20 +++++++--------
 t/edit.t                               | 32 ++++++++++++------------
 t/feed.t                               |  2 +-
 t/filter_rubylang.t                    |  2 +-
 t/html_index.t                         |  2 +-
 t/indexlevels-mirror.t                 | 16 ++++++------
 t/mda.t                                |  2 +-
 t/mda_filter_rubylang.t                |  6 ++---
 t/nntp.t                               |  2 +-
 t/nntpd-tls.t                          |  6 ++---
 t/nntpd-validate.t                     |  4 +--
 t/nntpd.t                              |  6 ++---
 t/perf-msgview.t                       |  2 +-
 t/perf-nntpd.t                         |  4 +--
 t/perf-threading.t                     |  2 +-
 t/plack.t                              |  2 +-
 t/psgi_attach.t                        |  2 +-
 t/psgi_bad_mids.t                      |  6 ++---
 t/psgi_mount.t                         |  2 +-
 t/psgi_multipart_not.t                 |  4 +--
 t/psgi_scan_all.t                      |  6 ++---
 t/psgi_search.t                        |  4 +--
 t/psgi_text.t                          |  2 +-
 t/psgi_v2.t                            |  6 ++---
 t/purge.t                              | 12 ++++-----
 t/replace.t                            |  4 +--
 t/search-thr-index.t                   |  2 +-
 t/search.t                             |  2 +-
 t/solver_git.t                         |  6 ++---
 t/v1-add-remove-add.t                  |  6 ++---
 t/v1reindex.t                          | 20 +++++++--------
 t/v2-add-remove-add.t                  |  4 +--
 t/v2mda.t                              |  4 +--
 t/v2mirror.t                           |  4 +--
 t/v2reindex.t                          | 18 +++++++-------
 t/v2writable.t                         | 22 ++++++++---------
 t/watch_filter_rubylang.t              |  8 +++---
 t/watch_maildir.t                      |  2 +-
 t/watch_maildir_v2.t                   | 10 ++++----
 t/www_listing.t                        |  6 ++---
 t/xcpdb-reshard.t                      |  8 +++---
 73 files changed, 276 insertions(+), 244 deletions(-)

^ permalink raw reply	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2019-10-16  8:59  7% [PATCH 0/2] rename "mainrepo" to "inboxdir" Eric Wong
2019-10-16  8:59  6% ` [PATCH 1/2] examples/grok-pull.post_update_hook: use "inbox_dir" 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).