summaryrefslogtreecommitdiff
path: root/contrib/triggers/file_mirror
diff options
context:
space:
mode:
authorSitaram Chamarty <sitaramc@gmail.com>2020-08-04 18:45:27 +0530
committerSitaram Chamarty <sitaramc@gmail.com>2020-08-04 18:45:27 +0530
commit91f73356bd2a30fcf6ab923ad8e616351adb6cbd (patch)
tree8cc3c53a490e8ea88060f1d6602e637a25fcf795 /contrib/triggers/file_mirror
parent98d1fc8030490e6a16fafb23695b01dc5bc5f5c9 (diff)
gitolite mirroring terminology changes
This affects the mirroring code and documentation: "slave"/"slaves" are now "copy"/"copies". Backward compatibility should be maintained; you do not need to change either your gitolite.conf, or any scripts you have written on top, until you are ready to do so. (This in turn means the word "slave" will still be present in the code, though only just as much as needed.) Should you wish to make this change, you need to migrate to the latest version (which is also tagged as 3.6.12, so if you want to wait till the distros pick it up wait for that), and then: - In the gitolite.conf file, change `option mirror.slaves` to `option mirror.copies`. - If you have any scripts that use the `gitolite mirror list slaves` command, change to `gitolite mirror list copies`. sitaram
Diffstat (limited to 'contrib/triggers/file_mirror')
-rwxr-xr-xcontrib/triggers/file_mirror16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/triggers/file_mirror b/contrib/triggers/file_mirror
index e3d083b..755ce86 100755
--- a/contrib/triggers/file_mirror
+++ b/contrib/triggers/file_mirror
@@ -22,16 +22,16 @@ exit 0 if $trigger eq 'POST_GIT' and $op ne 'W';
chdir("$rc{GL_REPO_BASE}/$repo.git") or _die "chdir failed: $!\n";
-my %config = config( $repo, "gitolite-options\\.mirror\\.extslave" );
-for my $slave ( values %config ) {
- _do($slave);
+my %config = config( $repo, "gitolite-options\\.mirror\\.extcopy" );
+for my $copy ( values %config ) {
+ _do($copy);
- # processing one slave is sufficient for restoring!
+ # processing one copy is sufficient for restoring!
last if $trigger eq 'POST_CREATE';
}
# in shell, that would be something like:
-# gitolite git-config -r $repo gitolite-options\\.mirror\\.extslave | cut -f3 | while read slave
+# gitolite git-config -r $repo gitolite-options\\.mirror\\.extcopy | cut -f3 | while read copy
# do
# ...
@@ -94,7 +94,7 @@ DESIGN NOTES
------------
This is really just a combination of "upstream" (see src/triggers/upstream)
-and mirroring (gitolite mirroring does allow a slave to be non-gitolite, as
+and mirroring (gitolite mirroring does allow a copy to be non-gitolite, as
long as the ssh stuff is done the same way).
The main difference is that gitolite mirroring expects peers to all talk ssh,
@@ -127,8 +127,8 @@ SETUP
4. Do something like this in your gitolite.conf file:
repo @all
- option mirror.extslave-1 = file:///tmp/he1/%GL_REPO.git
- option mirror.extslave-2 = file:///tmp/he2/%GL_REPO.git
+ option mirror.extcopy-1 = file:///tmp/he1/%GL_REPO.git
+ option mirror.extcopy-2 = file:///tmp/he2/%GL_REPO.git
As you can see, since this is just for demo/test, we're using a couple of
temp directories to serve as our "remotes" using the file:// protocol.