Skip to content
Snippets Groups Projects
Commit 9de443ae authored by Git Mirror's avatar Git Mirror
Browse files

Merge branch 'development' release v0.2.5

parents 81537c2f c0097c22
No related branches found
No related tags found
No related merge requests found
gitlab-mirrors v0.2.5
* Fixed a critical bug with pagination when user can view more projects than 20.
* Had to patch upstream python-gitlab library for this functionality.
* Updated documentation to reference my bugfix-edition of python-gitlab in the
prerequisites.
gitlab-mirrors v0.2.4
* Fixing critical git svn mirror bug.
......
......@@ -41,7 +41,7 @@ Created by Sam Gleske under [MIT License](LICENSE). This project is meant to te
* [How to convert a git repository from normal to bare][11]
[1]: https://github.com/gitlabhq/gitlabhq/blob/master/doc/api/README.md
[2]: https://github.com/Itxaka/python-gitlab
[2]: https://github.com/sag47/python-gitlab
[3]: http://feedback.gitlab.com/forums/176466-general/suggestions/4286666-mirror-git-svn-into-repo-
[4]: http://feedback.gitlab.com/forums/176466-general/suggestions/3697598-feature-request-multi-master-mirroring
[5]: http://stackoverflow.com/questions/2756747/mirror-a-git-repository-by-pulling
......
......@@ -3,7 +3,7 @@
### Required software
* [GitLab 6.x][1]
* [python-gitlab @ 2ec0ba5][2]
* [python-gitlab][2] (note due to certain bugs you should obtain my fork [python-gitlab @ 6d6b270][8])
* [GNU coreutils][3]
* [git 1.8.4][4]
......@@ -15,9 +15,9 @@ If you plan on mirroring SVN repositories as well then you'll need the following
python-gitlab
yum install python-setuptools
git clone https://github.com/Itxaka/python-gitlab.git
git clone https://github.com/sag47/python-gitlab.git
cd python-gitlab
git checkout 2ec0ba588a1cce00bb1fde74bb7403cc9ab1ff5e
git checkout 6d6b270e9829012b99d700eb1ca3802ef05f40b4
python setup.py
You can find the source to git at the [git-core project][5]. For instructions on other platforms see the [Getting Started - Installing Git section of the git book][6].
......@@ -45,3 +45,4 @@ Next up is [Installation and Setup](installation.md).
[5]: http://code.google.com/p/git-core/
[6]: http://git-scm.com/book/en/Getting-Started-Installing-Git
[7]: https://www.kernel.org/pub/software/scm/git/docs/git-svn.html
[8]: https://github.com/sag47/python-gitlab/tree/bugfix-edition
VERSION="v0.2.4"
VERSION="v0.2.5"
......@@ -38,7 +38,10 @@ elif len(args) > 1:
project_name=args[0]
git=gitlab.Gitlab(gitlab_url,token_secret,version=6)
#current python-gitlab behavior
#git=gitlab.Gitlab(gitlab_url,token_secret,version=6)
#command for my forked version https://github.com/sag47/python-gitlab.git
git=gitlab.Gitlab(gitlab_url,token_secret)
def findgroup(gname):
#Locate the group
......@@ -52,9 +55,12 @@ def findgroup(gname):
exit(1)
def findproject(gname,pname):
for project in git.getProjects():
if project['namespace']['name'] == gname and project['name'] == pname:
return project
page=1
while len(git.getProjects(page=page)) > 0:
for project in git.getProjects(page=page):
if project['namespace']['name'] == gname and project['name'] == pname:
return project
page += 1
else:
return False
......@@ -68,6 +74,7 @@ def createproject(pname):
description=options.desc
new_project=git.createProject(pname,description=description,issues_enabled=str(int(options.issues)),wall_enabled=str(int(options.wall)),merge_requests_enabled=str(int(options.merge)),wiki_enabled=str(int(options.wiki)),snippets_enabled=str(int(options.snippets)),public=str(int(options.public)))
new_project=findproject(gitlab_user,pname)
print new_project
new_project=git.moveProject(found_group['id'],new_project['id'])
if findproject(gitlab_namespace,pname):
return findproject(gitlab_namespace,pname)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment