diff options
author | James Moger <james.moger@gitblit.com> | 2013-11-13 17:56:50 -0500 |
---|---|---|
committer | James Moger <james.moger@gitblit.com> | 2013-11-13 17:56:50 -0500 |
commit | c44dd099a432094a12131cf60dfc8a19f5aa8101 (patch) | |
tree | d71d6130a1bd5a85a3c5b764a28b5eeebcc97906 /src/main/java/com/gitblit/wicket/panels | |
parent | 064857d7b2a7e1a0c205dbecf7b5f147221898a2 (diff) | |
download | gitblit-c44dd099a432094a12131cf60dfc8a19f5aa8101.tar.gz gitblit-c44dd099a432094a12131cf60dfc8a19f5aa8101.zip |
Implement mirror executor (issue-5)
The mirror executor will fetch ref updates for repository mirrors. This
feature is disabled by default and can be enabled by setting
git.enableMirroring=true. The period between update checks is
configurable, but it is global. An individual rpeository may not set
it's own update schedule.
Requirements:
1. you must manually clone the repository using native git
git clone --mirror git://somewhere.com/myrepo.git
2. the "origin" remote must be the mirror source
3. the "origin" repository must be accessible without authentication OR
the credentials must be embedded in the origin url (not recommended)
Notes:
1. "origin" SSH urls are untested and not likely to work
2. mirrors cloned while Gitblit is running are likely to require
clearing the gitblit cache (link on the repositories page of an
administrator account)
3. Gitblit will automatically repair any invalid fetch refspecs with a
"//" sequence.
Change-Id: I4bbe3fb2df106366ae4c2313596d0fab0dfcac46
Diffstat (limited to 'src/main/java/com/gitblit/wicket/panels')
4 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html index 54c1e92b..d5a87d3f 100644 --- a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html +++ b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.html @@ -39,6 +39,7 @@ <span wicket:id="repositoryLinks"></span>
<div>
<img class="inlineIcon" wicket:id="sparkleshareIcon" />
+ <img class="inlineIcon" wicket:id="mirrorIcon" />
<img class="inlineIcon" wicket:id="frozenIcon" />
<img class="inlineIcon" wicket:id="federatedIcon" />
diff --git a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java index f6c80bd4..ed5780f5 100644 --- a/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/ProjectRepositoryPanel.java @@ -87,6 +87,12 @@ public class ProjectRepositoryPanel extends BasePanel { add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false));
}
+ if (entry.isMirror) {
+ add(WicketUtils.newImage("mirrorIcon", "mirror_16x16.png", localizer.getString("gb.isMirror", parent)));
+ } else {
+ add(WicketUtils.newClearPixel("mirrorIcon").setVisible(false));
+ }
+
if (entry.isFrozen) {
add(WicketUtils.newImage("frozenIcon", "cold_16x16.png", localizer.getString("gb.isFrozen", parent)));
} else {
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html index e080103b..0cf3ef29 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html +++ b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.html @@ -89,7 +89,7 @@ <td class="left" style="padding-left:3px;" ><b><span class="repositorySwatch" wicket:id="repositorySwatch"></span></b> <span style="padding-left:3px;" wicket:id="repositoryName">[repository name]</span></td>
<td class="hidden-phone"><span class="list" wicket:id="repositoryDescription">[repository description]</span></td>
<td class="hidden-tablet hidden-phone author"><span wicket:id="repositoryOwner">[repository owner]</span></td>
- <td class="hidden-phone" style="text-align: right;padding-right:10px;"><img class="inlineIcon" wicket:id="sparkleshareIcon" /><img class="inlineIcon" wicket:id="forkIcon" /><img class="inlineIcon" wicket:id="frozenIcon" /><img class="inlineIcon" wicket:id="federatedIcon" /><img class="inlineIcon" wicket:id="accessRestrictionIcon" /></td>
+ <td class="hidden-phone" style="text-align: right;padding-right:10px;"><img class="inlineIcon" wicket:id="sparkleshareIcon" /><img class="inlineIcon" wicket:id="mirrorIcon" /><img class="inlineIcon" wicket:id="forkIcon" /><img class="inlineIcon" wicket:id="frozenIcon" /><img class="inlineIcon" wicket:id="federatedIcon" /><img class="inlineIcon" wicket:id="accessRestrictionIcon" /></td>
<td><span wicket:id="repositoryLastChange">[last change]</span></td>
<td class="hidden-phone" style="text-align: right;padding-right:15px;"><span style="font-size:0.8em;" wicket:id="repositorySize">[repository size]</span></td>
<td class="rightAlign">
diff --git a/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java index cb271504..9de387a8 100644 --- a/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java +++ b/src/main/java/com/gitblit/wicket/panels/RepositoriesPanel.java @@ -243,6 +243,13 @@ public class RepositoriesPanel extends BasePanel { row.add(WicketUtils.newClearPixel("sparkleshareIcon").setVisible(false));
}
+ if (entry.isMirror) {
+ row.add(WicketUtils.newImage("mirrorIcon", "mirror_16x16.png",
+ getString("gb.isMirror")));
+ } else {
+ row.add(WicketUtils.newClearPixel("mirrorIcon").setVisible(false));
+ }
+
if (entry.isFork()) {
row.add(WicketUtils.newImage("forkIcon", "commit_divide_16x16.png",
getString("gb.isFork")));
|