Skip to content

Commit 7efbb3f

Browse files
committed
Merge branch 'development' release v0.5.1
2 parents 80de2cc + 86daac8 commit 7efbb3f

File tree

8 files changed

+72
-50
lines changed

8 files changed

+72
-50
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
config.sh
22
*.pyc
33
*.swp
4+
cron.log

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## gitlab-mirrors v0.5.1
2+
3+
* Certified compatibility with GitLab 7.6.2.
4+
* Documentation updates.
5+
* Add logging to gitlab-mirrors.
6+
7+
---
18
## gitlab-mirrors v0.5.0
29

310
* Support pushing to GitLab via HTTP instead of SSH.

CONTRIBUTING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Contributing
2+
3+
I enjoy contributions and encourage them! You should add your code to my
4+
project and make your mark. [Pick off an issue][issues] or implement a feature
5+
filling your need. I only make a few simple requests in order to contribute.
6+
7+
* Test your own work before submitting a pull request. Most of this project is
8+
bash code so we do not have the luxury of a test driven framework to assist
9+
our development. Needless to say I will be sure to test it myself before it
10+
ever makes it into a production release.
11+
* Create a feature branch with a name that does not exist in any of my branches
12+
(e.g. `feature/myfeature` or `feature-cool_feature`). This is where you
13+
should do your development. This will allow you to integrate my development
14+
with your own and ease integrating updated code if we're both concurrently
15+
developing.
16+
* When your feature is ready make a pull request to the *development* branch.
17+
Pull requests to the master branch will not be accepted. The master branch is
18+
intended to drive production systems and only stable production-ready commits
19+
will be made to it.
20+
21+
Happy hacking!

README.md

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ repositories. gitlab-mirrors creates read only copies of remote repositories in
77
gitlab. It provides a CLI management interface for managing the mirrored
88
repositories (e.g. add, delete, update) so that an admin may regularly update
99
all mirrors using `crontab`. It operates by interacting with the
10-
[GitLab API][gitlab-api] using [python-gitlab3][python-gitlab3].
10+
[GitLab API][gitlab-api] using [python-gitlab3][python-gitlab3]. Also, check
11+
out this cool [puppet module][puppet] for installing and configuring
12+
gitlab-mirrors.
1113

1214

1315
## Features
@@ -63,30 +65,6 @@ freenode.net and direct your questions to user `sag47`.
6365
be instant but in most channels people are in different time zones. At times
6466
chat replies can be in excess of 24hrs.
6567

66-
67-
---
68-
# Contributing
69-
70-
I enjoy contributions and encourage them! You should add your code to my
71-
project and make your mark. [Pick off an issue][issues] or implement a feature
72-
filling your need. I only make a few simple requests in order to contribute.
73-
74-
* Test your own work before submitting a pull request. Most of this project is
75-
bash code so we do not have the luxury of a test driven framework to assist
76-
our development. Needless to say I will be sure to test it myself before it
77-
ever makes it into a production release.
78-
* Create a feature branch with a name that does not exist in any of my branches
79-
(e.g. `feature/myfeature` or `feature-cool_feature`). This is where you
80-
should do your development. This will allow you to integrate my development
81-
with your own and ease integrating updated code if we're both concurrently
82-
developing.
83-
* When your feature is ready make a pull request to the *development* branch.
84-
Pull requests to the master branch will not be accepted. The master branch is
85-
intended to drive production systems and only stable production-ready commits
86-
will be made to it.
87-
88-
Happy hacking!
89-
9068
---
9169
# License
9270

@@ -95,11 +73,14 @@ Created by Sam Gleske under [MIT License](LICENSE).
9573
## Contributors
9674

9775
* Docs #1 [lmakarov](https://github.com/lmakarov)
98-
* Bzr support #6 [Agustín Cruz Lozano](https://github.com/agb80) (atin81@gmail.com)
76+
* Bzr support #6 [Agustín Cruz Lozano](https://github.com/agb80)
9977
* SVN update tags #13 [Nikolaus Krismer](https://github.com/nikolauskrismer)
10078
* Docs #26 [Glen Mailer](https://github.com/glenjamin)
79+
* Docs #54 [Martijn Vermaat](https://github.com/martijnvermaat)
80+
* Better logging #57 [Loic Dachary](https://github.com/dachary)
10181

102-
[mirror-missing]: http://feedback.gitlab.com/forums/176466-general/suggestions/4286666-mirror-git-svn-into-repo-
10382
[gitlab-api]: http://api.gitlab.org/
104-
[python-gitlab3]: https://github.com/alexvh/python-gitlab3
10583
[issues]: https://github.com/samrocketman/gitlab-mirrors/issues
84+
[mirror-missing]: http://feedback.gitlab.com/forums/176466-general/suggestions/4286666-mirror-git-svn-into-repo-
85+
[puppet]: https://github.com/logicminds/gitlab_mirrors
86+
[python-gitlab3]: https://github.com/alexvh/python-gitlab3

docs/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mirrored within the same repository folder.
6060

6161
Clone the gitlab-mirrors repository and set values in config.sh.
6262

63-
su - gitmirrors
63+
su - gitmirror
6464
mkdir repositories
6565
touch private_token
6666
git clone https://github.com/samrocketman/gitlab-mirrors.git

docs/prerequisites.md

Lines changed: 30 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,25 @@
22

33
### Required software
44

5-
* [GitLab 6.x][1]
6-
* [pyapi-gitlab3 @ v0.5.4][2]
7-
* [GNU coreutils][3]
8-
* [git 1.6.5][4] or later (git 1.6.5 introduced transport helpers)
5+
* [GitLab 6.x/7.x][gitlab]
6+
* [pyapi-gitlab3 @ v0.5.4][python-gitlab3]
7+
* [GNU coreutils][coreutils]
8+
* [git 1.6.5][git] or later (git 1.6.5 introduced transport helpers)
99

1010
If you plan on mirroring SVN repositories as well then you'll need the
1111
following additional options.
1212

13-
* [git-svn][7]
13+
* [git-svn][git-svn]
1414

1515
If you plan on mirroring BZR repositories then you'll need the following
1616
aditional options.
1717

18-
* [git-bzr-helper][8]
18+
* [git-bzr-helper][git-bzr]
1919

2020
If you plan on mirroring Mercurial repositories then you'll need the following
2121
aditional options.
2222

23-
* [git-hg-helper][9]
23+
* [git-hg-helper][git-hg]
2424

2525
### Required software install snippets
2626

@@ -37,8 +37,8 @@ aditional options.
3737

3838
If you use package management then it will likely be best for you to install git
3939
via package management for your OS. You can find the source to git at the
40-
[git-core project][5]. For instructions on other platforms see the
41-
[Getting Started - Installing Git section of the git book][6]. The following is
40+
[git-core project][git-src]. For instructions on other platforms see the
41+
[Getting Started - Installing Git section of the git book][git-guide]. The following is
4242
for compiling git 1.8.4 on RHEL 6.4.
4343

4444
yum install perl-ExtUtils-MakeMaker zlib zlib-devel openssh libcurl libcurl-devel expat expat-devel gettext gettext-devel
@@ -55,6 +55,18 @@ for compiling git 1.8.4 on RHEL 6.4.
5555
Your git should now be located in `/usr/local/bin/git`. You should edit
5656
`/etc/profile` and place `/usr/local/bin` at the beginning of your `$PATH`.
5757

58+
#### git-svn
59+
60+
Notice in [`config.sh.SAMPLE`](../config.sh.SAMPLE) the option
61+
`git_svn_additional_options="-s"`. This behavior assumes that your SVN project
62+
is laid out with a standard directory structure: `trunk/`, `branches/`, and
63+
`tags/`. If your project does not conform to this layout then you should modify
64+
that option by removing `-s`. That means setting
65+
`git_svn_additional_options=""`. See the [`git-svn(1)`][git-svn] man page to
66+
learn more about what `-s` does. The additional options will pass in parameters
67+
to the `git svn` command. If a project to be mirrored has a custom layout then
68+
this option can be modified to account for that.
69+
5870
#### git-bzr-helper
5971

6072
sudo -i -u gitmirror
@@ -73,12 +85,12 @@ Your git should now be located in `/usr/local/bin/git`. You should edit
7385
---
7486
Next up is [Installation and Setup](installation.md).
7587

76-
[1]: https://github.com/gitlabhq/gitlabhq/tree/6-2-stable
77-
[2]: https://github.com/alexvh/python-gitlab3
78-
[3]: http://www.gnu.org/software/coreutils/
79-
[4]: http://git-scm.com/
80-
[5]: http://code.google.com/p/git-core/
81-
[6]: http://git-scm.com/book/en/Getting-Started-Installing-Git
82-
[7]: https://www.kernel.org/pub/software/scm/git/docs/git-svn.html
83-
[8]: https://github.com/felipec/git/wiki/git-remote-bzr
84-
[9]: https://github.com/felipec/git/wiki/git-remote-hg
88+
[coreutils]: http://www.gnu.org/software/coreutils/
89+
[git-bzr]: https://github.com/felipec/git/wiki/git-remote-bzr
90+
[git-guide]: http://git-scm.com/book/en/Getting-Started-Installing-Git
91+
[git-hg]: https://github.com/felipec/git/wiki/git-remote-hg
92+
[git]: http://git-scm.com/
93+
[gitlab]: https://about.gitlab.com/
94+
[git-src]: http://code.google.com/p/git-core/
95+
[git-svn]: https://www.kernel.org/pub/software/scm/git/docs/git-svn.html
96+
[python-gitlab3]: https://github.com/alexvh/python-gitlab3

git-mirrors.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ cd "${git_mirrors_dir}"
1818
STATUS=0
1919

2020
ls -1 "${repo_dir}/${gitlab_namespace}" | while read mirror;do
21-
if ! ./update_mirror.sh "${mirror}" &> /dev/null;then
22-
red_echo "Error: ./update_mirror.sh ${mirror}" 1>&2
21+
if ! ./update_mirror.sh "${mirror}" >> ${git_mirrors_dir}/cron.log 2>&1 ;then
22+
red_echo "Error: ./update_mirror.sh ${mirror} (more information in ${git_mirrors_dir}/cron.log)" 1>&2
2323
STATUS=1
2424
fi
2525
done

lib/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
VERSION="v0.5.0"
1+
VERSION="v0.5.1"

0 commit comments

Comments
 (0)