Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pagure
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Rahulkrishnan R A
pagure
Commits
fe501713
Commit
fe501713
authored
Mar 24, 2015
by
Pierre-Yves Chibon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename progit to pagure
Fixes
http://209.132.184.222/progit/issue/47
parent
d5d3459c
Changes
134
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
134 changed files
with
1349 additions
and
1353 deletions
+1349
-1353
MANIFEST.in
MANIFEST.in
+1
-1
README.rst
README.rst
+19
-19
createdb.py
createdb.py
+2
-2
files/progit.cfg.sample
files/progit.cfg.sample
+5
-5
files/progit.conf
files/progit.conf
+4
-4
files/progit.spec
files/progit.spec
+19
-20
files/progit.wsgi
files/progit.wsgi
+4
-4
pagure/__init__.py
pagure/__init__.py
+31
-31
pagure/api/__init__.py
pagure/api/__init__.py
+7
-7
pagure/default_config.py
pagure/default_config.py
+9
-9
pagure/doc_utils.py
pagure/doc_utils.py
+0
-0
pagure/exceptions.py
pagure/exceptions.py
+4
-4
pagure/flask_fas_openid.py
pagure/flask_fas_openid.py
+0
-0
pagure/forms.py
pagure/forms.py
+0
-0
pagure/hooks/__init__.py
pagure/hooks/__init__.py
+4
-4
pagure/hooks/files/git_multimail.py
pagure/hooks/files/git_multimail.py
+0
-0
pagure/hooks/files/pagure_hook.py
pagure/hooks/files/pagure_hook.py
+37
-37
pagure/hooks/files/pagure_hook_requests.py
pagure/hooks/files/pagure_hook_requests.py
+16
-16
pagure/hooks/files/pagure_hook_tickets.py
pagure/hooks/files/pagure_hook_tickets.py
+11
-11
pagure/hooks/files/post-receive
pagure/hooks/files/post-receive
+0
-0
pagure/hooks/irc.py
pagure/hooks/irc.py
+5
-5
pagure/hooks/mail.py
pagure/hooks/mail.py
+5
-5
pagure/hooks/pagure_hook.py
pagure/hooks/pagure_hook.py
+22
-22
pagure/hooks/pagure_request_hook.py
pagure/hooks/pagure_request_hook.py
+22
-22
pagure/hooks/pagure_ticket_hook.py
pagure/hooks/pagure_ticket_hook.py
+22
-22
pagure/lib/__init__.py
pagure/lib/__init__.py
+55
-55
pagure/lib/git.py
pagure/lib/git.py
+30
-30
pagure/lib/link.py
pagure/lib/link.py
+3
-3
pagure/lib/login.py
pagure/lib/login.py
+14
-14
pagure/lib/model.py
pagure/lib/model.py
+16
-16
pagure/lib/notify.py
pagure/lib/notify.py
+12
-12
pagure/login_forms.py
pagure/login_forms.py
+1
-1
pagure/mail_logging.py
pagure/mail_logging.py
+1
-1
pagure/static/delete.png
pagure/static/delete.png
+0
-0
pagure/static/header-bg.png
pagure/static/header-bg.png
+0
-0
pagure/static/images/edit.png
pagure/static/images/edit.png
+0
-0
pagure/static/images/file.png
pagure/static/images/file.png
+0
-0
pagure/static/images/folder.png
pagure/static/images/folder.png
+0
-0
pagure/static/images/fork_button.png
pagure/static/images/fork_button.png
+0
-0
pagure/static/images/fork_button_hover.png
pagure/static/images/fork_button_hover.png
+0
-0
pagure/static/images/forked.png
pagure/static/images/forked.png
+0
-0
pagure/static/images/git.png
pagure/static/images/git.png
+0
-0
pagure/static/images/profile_button.png
pagure/static/images/profile_button.png
+0
-0
pagure/static/images/profile_button_hover.png
pagure/static/images/profile_button_hover.png
+0
-0
pagure/static/images/settings_button.png
pagure/static/images/settings_button.png
+0
-0
pagure/static/images/settings_button_hover.png
pagure/static/images/settings_button_hover.png
+0
-0
pagure/static/images/ui-bg_flat_0_aaaaaa_40x100.png
pagure/static/images/ui-bg_flat_0_aaaaaa_40x100.png
+0
-0
pagure/static/images/ui-bg_flat_0_eeeeee_40x100.png
pagure/static/images/ui-bg_flat_0_eeeeee_40x100.png
+0
-0
pagure/static/images/ui-bg_flat_55_ffffff_40x100.png
pagure/static/images/ui-bg_flat_55_ffffff_40x100.png
+0
-0
pagure/static/images/ui-bg_flat_75_ffffff_40x100.png
pagure/static/images/ui-bg_flat_75_ffffff_40x100.png
+0
-0
pagure/static/images/ui-bg_glass_65_ffffff_1x400.png
pagure/static/images/ui-bg_glass_65_ffffff_1x400.png
+0
-0
pagure/static/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png
...e/static/images/ui-bg_highlight-soft_100_f6f6f6_1x100.png
+0
-0
pagure/static/images/ui-bg_highlight-soft_25_3c6eb4_1x100.png
...re/static/images/ui-bg_highlight-soft_25_3c6eb4_1x100.png
+0
-0
pagure/static/images/ui-bg_highlight-soft_50_dddddd_1x100.png
...re/static/images/ui-bg_highlight-soft_50_dddddd_1x100.png
+0
-0
pagure/static/images/ui-bg_highlight-soft_75_dddddd_1x100.png
...re/static/images/ui-bg_highlight-soft_75_dddddd_1x100.png
+0
-0
pagure/static/images/ui-icons_3c6eb4_256x240.png
pagure/static/images/ui-icons_3c6eb4_256x240.png
+0
-0
pagure/static/images/ui-icons_454545_256x240.png
pagure/static/images/ui-icons_454545_256x240.png
+0
-0
pagure/static/images/ui-icons_666666_256x240.png
pagure/static/images/ui-icons_666666_256x240.png
+0
-0
pagure/static/images/ui-icons_db3279_256x240.png
pagure/static/images/ui-icons_db3279_256x240.png
+0
-0
pagure/static/images/ui-icons_ffffff_256x240.png
pagure/static/images/ui-icons_ffffff_256x240.png
+0
-0
pagure/static/jquery-1.10.2.js
pagure/static/jquery-1.10.2.js
+0
-0
pagure/static/jquery-ui-1.11.2.custom.css
pagure/static/jquery-ui-1.11.2.custom.css
+0
-0
pagure/static/jquery-ui-1.11.2.custom.min.js
pagure/static/jquery-ui-1.11.2.custom.min.js
+0
-0
pagure/static/koji.css
pagure/static/koji.css
+0
-0
pagure/static/pagure-logo.png
pagure/static/pagure-logo.png
+0
-0
pagure/static/pagure.css
pagure/static/pagure.css
+0
-0
pagure/static/pink_arrow.png
pagure/static/pink_arrow.png
+0
-0
pagure/static/placebo.png
pagure/static/placebo.png
+0
-0
pagure/static/toggle.css
pagure/static/toggle.css
+0
-0
pagure/static/upload.js
pagure/static/upload.js
+1
-1
pagure/static/users.png
pagure/static/users.png
+0
-0
pagure/templates/_formhelper.html
pagure/templates/_formhelper.html
+0
-0
pagure/templates/add_user.html
pagure/templates/add_user.html
+0
-0
pagure/templates/admin_index.html
pagure/templates/admin_index.html
+1
-1
pagure/templates/commit.html
pagure/templates/commit.html
+0
-0
pagure/templates/docs.html
pagure/templates/docs.html
+0
-0
pagure/templates/edit_tag.html
pagure/templates/edit_tag.html
+0
-0
pagure/templates/fatal_error.html
pagure/templates/fatal_error.html
+0
-0
pagure/templates/file.html
pagure/templates/file.html
+0
-0
pagure/templates/forks.html
pagure/templates/forks.html
+0
-0
pagure/templates/index.html
pagure/templates/index.html
+0
-0
pagure/templates/issue.html
pagure/templates/issue.html
+0
-0
pagure/templates/issues.html
pagure/templates/issues.html
+0
-0
pagure/templates/login/admin_groups.html
pagure/templates/login/admin_groups.html
+1
-1
pagure/templates/login/admin_users.html
pagure/templates/login/admin_users.html
+1
-1
pagure/templates/login/login.html
pagure/templates/login/login.html
+0
-0
pagure/templates/login/password_change.html
pagure/templates/login/password_change.html
+0
-0
pagure/templates/login/password_reset.html
pagure/templates/login/password_reset.html
+0
-0
pagure/templates/login/user_new.html
pagure/templates/login/user_new.html
+0
-0
pagure/templates/master.html
pagure/templates/master.html
+5
-5
pagure/templates/new_issue.html
pagure/templates/new_issue.html
+0
-0
pagure/templates/new_project.html
pagure/templates/new_project.html
+0
-0
pagure/templates/not_found.html
pagure/templates/not_found.html
+0
-0
pagure/templates/plugin.html
pagure/templates/plugin.html
+0
-0
pagure/templates/pull_request.html
pagure/templates/pull_request.html
+0
-0
pagure/templates/pull_request_comment.html
pagure/templates/pull_request_comment.html
+0
-0
pagure/templates/render_repo.html
pagure/templates/render_repo.html
+0
-0
pagure/templates/repo_info.html
pagure/templates/repo_info.html
+0
-0
pagure/templates/repo_master.html
pagure/templates/repo_master.html
+0
-0
pagure/templates/requests.html
pagure/templates/requests.html
+0
-0
pagure/templates/settings.html
pagure/templates/settings.html
+0
-0
pagure/templates/unauthorized.html
pagure/templates/unauthorized.html
+0
-0
pagure/templates/user_info.html
pagure/templates/user_info.html
+0
-0
pagure/templates/user_list.html
pagure/templates/user_list.html
+0
-0
pagure/templates/user_settings.html
pagure/templates/user_settings.html
+0
-0
pagure/ui/__init__.py
pagure/ui/__init__.py
+0
-0
pagure/ui/admin.py
pagure/ui/admin.py
+6
-6
pagure/ui/app.py
pagure/ui/app.py
+25
-25
pagure/ui/docs.py
pagure/ui/docs.py
+9
-9
pagure/ui/filters.py
pagure/ui/filters.py
+5
-5
pagure/ui/fork.py
pagure/ui/fork.py
+41
-41
pagure/ui/issues.py
pagure/ui/issues.py
+47
-47
pagure/ui/login.py
pagure/ui/login.py
+38
-38
pagure/ui/plugins.py
pagure/ui/plugins.py
+10
-10
pagure/ui/repo.py
pagure/ui/repo.py
+44
-44
runserver.py
runserver.py
+1
-1
runtests.sh
runtests.sh
+1
-1
setup.py
setup.py
+5
-5
tests/__init__.py
tests/__init__.py
+20
-21
tests/test_progit_flask_api.py
tests/test_progit_flask_api.py
+13
-13
tests/test_progit_flask_ui_admin.py
tests/test_progit_flask_ui_admin.py
+27
-27
tests/test_progit_flask_ui_app.py
tests/test_progit_flask_ui_app.py
+26
-26
tests/test_progit_flask_ui_docs.py
tests/test_progit_flask_ui_docs.py
+18
-18
tests/test_progit_flask_ui_issues.py
tests/test_progit_flask_ui_issues.py
+80
-80
tests/test_progit_flask_ui_plugins.py
tests/test_progit_flask_ui_plugins.py
+18
-18
tests/test_progit_flask_ui_plugins_irc.py
tests/test_progit_flask_ui_plugins_irc.py
+16
-16
tests/test_progit_flask_ui_plugins_mail.py
tests/test_progit_flask_ui_plugins_mail.py
+16
-16
tests/test_progit_flask_ui_plugins_progit_hook.py
tests/test_progit_flask_ui_plugins_progit_hook.py
+30
-30
tests/test_progit_flask_ui_plugins_progit_ticket_hook.py
tests/test_progit_flask_ui_plugins_progit_ticket_hook.py
+32
-32
tests/test_progit_flask_ui_repo.py
tests/test_progit_flask_ui_repo.py
+62
-64
tests/test_progit_lib.py
tests/test_progit_lib.py
+273
-273
tests/test_progit_lib_git.py
tests/test_progit_lib_git.py
+39
-39
tests/test_progit_lib_link.py
tests/test_progit_lib_link.py
+34
-34
tests/test_progit_lib_model.py
tests/test_progit_lib_model.py
+23
-23
No files found.
MANIFEST.in
View file @
fe501713
include LICENSE README.rst requirements.txt
include createdb.py
recursive-include p
rogit
*
recursive-include p
agure
*
recursive-include files *
README.rst
View file @
fe501713
P
roGit
P
agure
======
:Author: Pierre-Yves Chibon <pingou@pingoured.fr>
P
roGit
is a light-weight git-centered forge based on pygit2.
P
agure
is a light-weight git-centered forge based on pygit2.
Currently, P
roGit
offers a decent web-interface for git repositories, a
Currently, P
agure
offers a decent web-interface for git repositories, a
simplistic ticket system (that needs improvements) and possibilities to create
new projects, fork existing ones and create/merge pull-requests across or
within projects.
Homepage: https://github.com/pypingou/
ProGit
Homepage: https://github.com/pypingou/
pagure
Dev instance: http://209.132.184.222/ (/!\\ May change unexpectedly, it's a dev instance ;-))
...
...
@@ -22,7 +22,7 @@ Get it running
* Retrieve the sources::
git clone git://github.com/pypingou/p
rogit
git clone git://github.com/pypingou/p
agure
* Create the folder that will receive the projects, forks, docs and tickets'
...
...
@@ -49,42 +49,42 @@ UI overview
.. image:: screenshots/overview_home.png
:scale: 50 %
:alt: P
roGit
's home page overview
:alt: P
agure
's home page overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_home.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_home.png
.. image:: screenshots/overview_main.png
:scale: 50 %
:alt: P
roGit
's project page overview
:alt: P
agure
's project page overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_main.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_main.png
.. image:: screenshots/overview_commit.png
:scale: 50 %
:alt: P
roGit
's commit overview
:alt: P
agure
's commit overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_commit.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_commit.png
.. image:: screenshots/overview_request_pull.png
:scale: 50 %
:alt: P
roGit
's pull-request overview
:alt: P
agure
's pull-request overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_request_pull.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_request_pull.png
.. image:: screenshots/overview_issues_list.png
:scale: 50 %
:alt: P
roGit
's issues list overview
:alt: P
agure
's issues list overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_issues_list.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_issues_list.png
.. image:: screenshots/overview_issue.png
:scale: 50 %
:alt: P
roGit
's issue overview
:alt: P
agure
's issue overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_issue.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_issue.png
.. image:: screenshots/overview_users.png
:scale: 50 %
:alt: P
roGit
's users overview
:alt: P
agure
's users overview
:align: center
:target: https://github.com/pypingou/
ProGit
/raw/master/screenshots/overview_users.png
:target: https://github.com/pypingou/
pagure
/raw/master/screenshots/overview_users.png
createdb.py
View file @
fe501713
...
...
@@ -4,8 +4,8 @@
__requires__
=
[
'SQLAlchemy >= 0.8'
,
'jinja2 >= 2.4'
]
import
pkg_resources
from
p
rogit
import
APP
from
p
rogit
.lib
import
model
from
p
agure
import
APP
from
p
agure
.lib
import
model
model
.
create_tables
(
APP
.
config
[
'DB_URL'
],
...
...
files/progit.cfg.sample
View file @
fe501713
...
...
@@ -5,19 +5,19 @@ SECRET_KEY='<The web application secret key>'
### url to the database server:
#DB_URL=mysql://user:pass@host/db_name
#DB_URL=postgres://user:pass@host/db_name
DB_URL = 'sqlite:////var/tmp/p
rogit
_dev.sqlite'
DB_URL = 'sqlite:////var/tmp/p
agure
_dev.sqlite'
### The FAS group in which the admin of p
rogit
are
### The FAS group in which the admin of p
agure
are
ADMIN_GROUP = ['sysadmin-main', 'sysadmin-cvs']
### The email address to which the flask.log will send the errors (tracebacks)
EMAIL_ERROR = 'pingou@pingoured.fr'
### The URL at which the project is available.
APP_URL = 'https://fedorahosted.org/p
rogit
/'
APP_URL = 'https://fedorahosted.org/p
agure
/'
### The URL to use to clone git repositories.
GIT_URL = 'git@p
rogit
.fedorahosted.org'
GIT_URL = 'git@p
agure
.fedorahosted.org'
### Folder containing to the git repos
GIT_FOLDER = os.path.join(
...
...
@@ -69,7 +69,7 @@ GL_BINDIR = None
#SMTP_SERVER = 'localhost'
### Email used to sent emails
#FROM_EMAIL = 'p
rogit
@fedoraproject.org'
#FROM_EMAIL = 'p
agure
@fedoraproject.org'
### the number of items (packages, packagers..) to display on the search
### pages
...
...
files/progit.conf
View file @
fe501713
# Apache configuration file for p
rogit
# Apache configuration file for p
agure
#WSGIDaemonProcess p
rogit user=apache maximum-requests=1000 display-name=progit
processes=2 threads=1
#WSGIDaemonProcess p
agure user=apache maximum-requests=1000 display-name=pagure
processes=2 threads=1
#WSGISocketPrefix run/wsgi
#WSGIRestrictStdout On
#WSGIRestrictSignal Off
#WSGIPythonOptimize 1
#WSGIScriptAlias /p
rogit /usr/share/progit/progit
.wsgi
#WSGIScriptAlias /p
agure /usr/share/pagure/pagure
.wsgi
#<Location />
# WSGIProcessGroup p
rogit
# WSGIProcessGroup p
agure
# <IfModule mod_authz_core.c>
# # Apache 2.4
# Require all granted
...
...
files/progit.spec
View file @
fe501713
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from
%distutils.sysconfig import get_python_lib; print (get_python_lib())")}
Name: p
rogit
Name: p
agure
Version: 0.0
Release: 1.20141008%{?dist}
Summary: A git-centered forge
License: GPLv2+
URL: http://fedorahosted.org/p
rogit
/
Source0: https://fedorahosted.org/releases/p/r/p
rogit
/%{name}-%{version}.tar.gz
URL: http://fedorahosted.org/p
agure
/
Source0: https://fedorahosted.org/releases/p/r/p
agure
/%{name}-%{version}.tar.gz
BuildArch: noarch
...
...
@@ -59,12 +59,11 @@ Requires: python-wtforms
Requires: mod_wsgi
%description
P
roGit
is a light-weight git-centered forge based on pygit2.
P
agure
is a light-weight git-centered forge based on pygit2.
Currently, ProGit offers a decent web-interface for git repositories, a
simplistic ticket system (that needs improvements) and possibilities to
create new projects, fork existing ones and create/merge pull-requests
across or within projects.
Currently, Pagure offers a web-interface for git repositories, a ticket
system and possibilities to create new projects, fork existing ones and
create/merge pull-requests across or within projects.
%prep
%setup -q
...
...
@@ -80,28 +79,28 @@ rm -rf $RPM_BUILD_ROOT
# Install apache configuration file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/
install -m 644 files/p
rogit.conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/progit
.conf
install -m 644 files/p
agure.conf $RPM_BUILD_ROOT/%{_sysconfdir}/httpd/conf.d/pagure
.conf
# Install configuration file
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/p
rogit
install -m 644 files/p
rogit.cfg.sample $RPM_BUILD_ROOT/%{_sysconfdir}/progit/progit
.cfg
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/p
agure
install -m 644 files/p
agure.cfg.sample $RPM_BUILD_ROOT/%{_sysconfdir}/pagure/pagure
.cfg
# Install WSGI file
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/p
rogit
install -m 644 files/p
rogit.wsgi $RPM_BUILD_ROOT/%{_datadir}/progit/progit
.wsgi
mkdir -p $RPM_BUILD_ROOT/%{_datadir}/p
agure
install -m 644 files/p
agure.wsgi $RPM_BUILD_ROOT/%{_datadir}/pagure/pagure
.wsgi
# Install the createdb script
install -m 644 createdb.py $RPM_BUILD_ROOT/%{_datadir}/p
rogit/progit
_createdb.py
install -m 644 createdb.py $RPM_BUILD_ROOT/%{_datadir}/p
agure/pagure
_createdb.py
%files
%doc README.rst LICENSE
%config(noreplace) %{_sysconfdir}/httpd/conf.d/p
rogit
.conf
%config(noreplace) %{_sysconfdir}/p
rogit/progit
.cfg
%dir %{_sysconfdir}/p
rogit
/
%{_datadir}/p
rogit
/
%{python_sitelib}/p
rogit
/
%{python_sitelib}/p
rogit
*.egg-info
%config(noreplace) %{_sysconfdir}/httpd/conf.d/p
agure
.conf
%config(noreplace) %{_sysconfdir}/p
agure/pagure
.cfg
%dir %{_sysconfdir}/p
agure
/
%{_datadir}/p
agure
/
%{python_sitelib}/p
agure
/
%{python_sitelib}/p
agure
*.egg-info
%changelog
...
...
files/progit.wsgi
View file @
fe501713
...
...
@@ -9,14 +9,14 @@
#import os
## Set the environment variable pointing to the configuration file
#os.environ['P
ROGIT_CONFIG'] = '/etc/progit/progit
.cfg'
#os.environ['P
AGURE_CONFIG'] = '/etc/pagure/pagure
.cfg'
## The following is only needed if you did not install p
rogit
## The following is only needed if you did not install p
agure
## as a python module (for example if you run it from a git clone).
#import sys
#sys.path.insert(0, '/path/to/p
rogit
/')
#sys.path.insert(0, '/path/to/p
agure
/')
## The most import line to make the wsgi working
#from p
rogit
import APP as application
#from p
agure
import APP as application
#application.debug = True
p
rogit
/__init__.py
→
p
agure
/__init__.py
View file @
fe501713
...
...
@@ -29,10 +29,10 @@ from flask_fas_openid import FAS
from
functools
import
wraps
from
sqlalchemy.exc
import
SQLAlchemyError
import
p
rogit
.lib
import
p
rogit
.mail_logging
import
p
rogit
.doc_utils
import
p
rogit
.login_forms
import
p
agure
.lib
import
p
agure
.mail_logging
import
p
agure
.doc_utils
import
p
agure
.login_forms
from
pygments
import
highlight
from
pygments.lexers.text
import
DiffLexer
...
...
@@ -44,17 +44,17 @@ APP.jinja_env.trim_blocks = True
APP
.
jinja_env
.
lstrip_blocks
=
True
# set up FAS
APP
.
config
.
from_object
(
'p
rogit
.default_config'
)
APP
.
config
.
from_object
(
'p
agure
.default_config'
)
if
'P
ROGIT
_CONFIG'
in
os
.
environ
:
APP
.
config
.
from_envvar
(
'P
ROGIT
_CONFIG'
)
if
'P
AGURE
_CONFIG'
in
os
.
environ
:
APP
.
config
.
from_envvar
(
'P
AGURE
_CONFIG'
)
FAS
=
FAS
(
APP
)
SESSION
=
p
rogit
.
lib
.
create_session
(
APP
.
config
[
'DB_URL'
])
SESSION
=
p
agure
.
lib
.
create_session
(
APP
.
config
[
'DB_URL'
])
if
not
APP
.
debug
:
APP
.
logger
.
addHandler
(
p
rogit
.
mail_logging
.
get_mail_handler
(
APP
.
logger
.
addHandler
(
p
agure
.
mail_logging
.
get_mail_handler
(
smtp_server
=
APP
.
config
.
get
(
'SMTP_SERVER'
,
'127.0.0.1'
),
mail_admin
=
APP
.
config
.
get
(
'MAIL_ADMIN'
,
APP
.
config
[
'EMAIL_ERROR'
])
))
...
...
@@ -106,7 +106,7 @@ def is_admin():
user
=
flask
.
g
.
fas_user
auth_method
=
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
auth_method
=
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
if
auth_method
==
'fas'
:
if
not
user
.
cla_done
or
len
(
user
.
groups
)
<
1
:
return
False
...
...
@@ -134,7 +134,7 @@ def is_repo_admin(repo_obj):
def
generate_gitolite_acls
():
""" Generate the gitolite configuration file for all repos
"""
p
rogit
.
lib
.
git
.
write_gitolite_acls
(
p
agure
.
lib
.
git
.
write_gitolite_acls
(
SESSION
,
APP
.
config
[
'GITOLITE_CONFIG'
])
gitolite_folder
=
APP
.
config
.
get
(
'GITOLITE_HOME'
,
None
)
...
...
@@ -166,7 +166,7 @@ def generate_authorized_key_file():
"""
gitolite_home
=
APP
.
config
.
get
(
'GITOLITE_HOME'
,
None
)
if
gitolite_home
:
users
=
p
rogit
.
lib
.
search_user
(
SESSION
)
users
=
p
agure
.
lib
.
search_user
(
SESSION
)
authorized_file
=
os
.
path
.
join
(
gitolite_home
,
'.ssh'
,
'authorized_keys'
)
...
...
@@ -189,7 +189,7 @@ To use this decorator you need to have a function named 'auth_login'.
Without that function the redirect if the user is not logged in will not
work.
"""
auth_method
=
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
auth_method
=
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
@
wraps
(
function
)
def
decorated_function
(
*
args
,
**
kwargs
):
...
...
@@ -199,7 +199,7 @@ work.
flask
.
url_for
(
'auth_login'
,
next
=
flask
.
request
.
url
))
elif
auth_method
==
'fas'
and
not
flask
.
g
.
fas_user
.
cla_done
:
flask
.
flash
(
'You must sign the FPCA (Fedora Project Contributor '
'Agreement to use p
rogit
'
,
'errors'
)
'Agreement to use p
agure
'
,
'errors'
)
return
flask
.
redirect
(
flask
.
url_for
(
'.index'
))
return
function
(
*
args
,
**
kwargs
)
return
decorated_function
...
...
@@ -229,7 +229,7 @@ def set_session():
def
set_user
(
return_url
):
''' After login method. '''
try
:
p
rogit
.
lib
.
set_up_user
(
p
agure
.
lib
.
set_up_user
(
session
=
SESSION
,
username
=
flask
.
g
.
fas_user
.
username
,
fullname
=
flask
.
g
.
fas_user
.
fullname
,
...
...
@@ -281,10 +281,10 @@ def auth_login():
else
:
# pragma: no cover
admins
=
set
(
admins
)
if
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
==
'fas'
:
if
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
==
'fas'
:
return
FAS
.
login
(
return_url
=
return_point
,
groups
=
admins
)
elif
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
==
'local'
:
form
=
p
rogit
.
login_forms
.
LoginForm
()
elif
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
==
'local'
:
form
=
p
agure
.
login_forms
.
LoginForm
()
return
flask
.
render_template
(
'login/login.html'
,
next_url
=
return_point
,
...
...
@@ -303,11 +303,11 @@ def auth_logout():
if
not
authenticated
():
return
flask
.
redirect
(
return_point
)
if
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
==
'fas'
:
if
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
==
'fas'
:
if
hasattr
(
flask
.
g
,
'fas_user'
)
and
flask
.
g
.
fas_user
is
not
None
:
FAS
.
logout
()
flask
.
flash
(
"You are no longer logged-in"
)
elif
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
==
'local'
:
elif
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
==
'local'
:
login
.
logout
()
return
flask
.
redirect
(
return_point
)
...
...
@@ -344,20 +344,20 @@ def get_repo_path(repo):
# Import the application
import
p
rogit
.ui.app
import
p
rogit
.ui.admin
import
p
rogit
.ui.docs
import
p
rogit
.ui.fork
import
p
rogit
.ui.issues
import
p
rogit
.ui.plugins
import
p
rogit
.ui.repo
import
p
agure
.ui.app
import
p
agure
.ui.admin
import
p
agure
.ui.docs
import
p
agure
.ui.fork
import
p
agure
.ui.issues
import
p
agure
.ui.plugins
import
p
agure
.ui.repo
import
p
rogit
.api
APP
.
register_blueprint
(
p
rogit
.
api
.
API
)
import
p
agure
.api
APP
.
register_blueprint
(
p
agure
.
api
.
API
)
# Only import the login controller if the app is set up for local login
if
APP
.
config
.
get
(
'P
ROGIT
_AUTH'
,
None
)
==
'local'
:
import
p
rogit
.ui.login
as
login
if
APP
.
config
.
get
(
'P
AGURE
_AUTH'
,
None
)
==
'local'
:
import
p
agure
.ui.login
as
login
APP
.
before_request
(
login
.
_check_session_cookie
)
APP
.
after_request
(
login
.
_send_session_cookie
)
p
rogit
/api/__init__.py
→
p
agure
/api/__init__.py
View file @
fe501713
...
...
@@ -15,9 +15,9 @@ import flask
API
=
flask
.
Blueprint
(
'api_ns'
,
__name__
,
url_prefix
=
'/api/0'
)
from
p
rogit
import
__api_version__
,
APP
,
SESSION
import
p
rogit
import
p
rogit
.lib
from
p
agure
import
__api_version__
,
APP
,
SESSION
import
p
agure
import
p
agure
.lib
@
API
.
route
(
'/version/'
)
...
...
@@ -52,7 +52,7 @@ def api_users():
'''
List users
-----------
Returns the list of all users that have logged into this p
rogit
instances.
Returns the list of all users that have logged into this p
agure
instances.
This can then be used as input for autocompletion in some forms/fields.
::
...
...
@@ -78,7 +78,7 @@ def api_users():
{
'users'
:
[
user
.
username
for
user
in
p
rogit
.
lib
.
search_user
(
for
user
in
p
agure
.
lib
.
search_user
(
SESSION
,
pattern
=
pattern
)
]
}
...
...
@@ -116,7 +116,7 @@ def api_project_tags(repo, username=None):
if
pattern
is
not
None
and
not
pattern
.
endswith
(
'*'
):
pattern
+=
'*'
project
=
p
rogit
.
lib
.
get_project
(
SESSION
,
repo
,
username
)
project
=
p
agure
.
lib
.
get_project
(
SESSION
,
repo
,
username
)
if
not
project
:
output
=
{
'output'
:
'notok'
,
'error'
:
'Project not found'
}
jsonout
=
flask
.
jsonify
(
output
)
...
...
@@ -127,7 +127,7 @@ def api_project_tags(repo, username=None):
{
'tags'
:
[
tag
.
tag
for
tag
in
p
rogit
.
lib
.
get_tags_of_project
(
for
tag
in
p
agure
.
lib
.
get_tags_of_project
(
SESSION
,
project
,
pattern
=
pattern
)
]
}
...
...
p
rogit
/default_config.py
→
p
agure
/default_config.py
View file @
fe501713
...
...
@@ -19,20 +19,20 @@ ADMIN_SESSION_LIFETIME = timedelta(minutes=20)
SECRET_KEY
=
'<insert here your own key>'
# url to the database server:
DB_URL
=
'sqlite:////var/tmp/p
rogit
_dev.sqlite'
DB_URL
=
'sqlite:////var/tmp/p
agure
_dev.sqlite'
# The FAS group in which the admin of p
rogit
are
# The FAS group in which the admin of p
agure
are
ADMIN_GROUP
=
'sysadmin-main'
# The email address to which the flask.log will send the errors (tracebacks)
EMAIL_ERROR
=
'pingou@pingoured.fr'
# The URL at which the project is available.
APP_URL
=
'https://fedorahosted.org/p
rogit
/'
APP_URL
=
'https://fedorahosted.org/p
agure
/'
# The URL to use to clone the git repositories.
GIT_URL_SSH
=
'git@p
rogit
.fedorahosted.org'
GIT_URL_GIT
=
'git://p
rogit
.fedorahosted.org'
GIT_URL_SSH
=
'git@p
agure
.fedorahosted.org'
GIT_URL_GIT
=
'git://p
agure
.fedorahosted.org'
# Number of items displayed per page
...
...
@@ -99,12 +99,12 @@ GL_BINDIR = None
SMTP_SERVER
=
'localhost'
# Email used to sent emails
FROM_EMAIL
=
'p
rogit
@fedoraproject.org'
FROM_EMAIL
=
'p
agure
@fedoraproject.org'
# Specify which authentication method to use, defaults to `fas` can be or
# `local`
# Default: ``fas``.
P
ROGIT
_AUTH
=
'fas'
P
AGURE
_AUTH
=
'fas'
# When this is set to True, the session cookie will only be returned to the
# server via ssl (https). If you connect to the server via plain http, the
...
...
@@ -112,11 +112,11 @@ PROGIT_AUTH = 'fas'
# This may be set to False when testing your application but should always
# be set to True in production.
# Default: ``True``.
P
ROGIT
_COOKIE_REQUIRES_HTTPS
=
False
P
AGURE
_COOKIE_REQUIRES_HTTPS
=
False
# The name of the cookie used to store the session id.
# Default: ``.MirrorManager``.
P
ROGIT_COOKIE_NAME
=
'progit
'
P
AGURE_COOKIE_NAME
=
'pagure
'
# If not specified the application will rely on the root_url when sending
# emails, otherwise it will use this URL
...
...
p
rogit
/doc_utils.py
→
p
agure
/doc_utils.py
View file @
fe501713
File moved
p
rogit
/exceptions.py
→
p
agure
/exceptions.py
View file @
fe501713
...
...
@@ -9,21 +9,21 @@
"""
class
P
rogit
Exception
(
Exception
):
''' Parent class of all the exception for all P
rogit
specific
class
P
agure
Exception
(
Exception
):
''' Parent class of all the exception for all P
agure
specific
exceptions.
'''
pass
class
RepoExistsException
(
P
rogit
Exception
):
class
RepoExistsException
(
P
agure
Exception
):
''' Exception thrown when trying to create a repository that already
exists.
'''
pass
class
FileNotFoundException
(
P
rogit
Exception
):
class
FileNotFoundException
(
P
agure
Exception
):
''' Exception thrown when trying to create a repository that already
exists.
'''
...
...
p
rogit
/flask_fas_openid.py
→
p
agure
/flask_fas_openid.py
View file @
fe501713
File moved
p
rogit
/forms.py
→
p
agure
/forms.py
View file @
fe501713
File moved
p
rogit
/hooks/__init__.py
→
p
agure
/hooks/__init__.py
View file @
fe501713
...
...
@@ -12,7 +12,7 @@ import os
import
shutil
import
wtforms
from
p
rogit
import
APP
,
get_repo_path
from
p
agure
import
APP
,
get_repo_path
class
RequiredIf
(
wtforms
.
validators
.
Required
):
...
...
@@ -37,7 +37,7 @@ class RequiredIf(wtforms.validators.Required):
class
BaseHook
(
object
):
''' Base class for p
rogit
's hooks. '''
''' Base class for p
agure
's hooks. '''
name
=
None
form
=
None
...
...
@@ -69,7 +69,7 @@ class BaseHook(object):
def
install
(
cls
,
project
,
dbobj
):
# pragma: no cover
''' Method called to install the hook for a project.
:arg project: a ``p
rogit
.model.Project`` object to which the hook
:arg project: a ``p
agure
.model.Project`` object to which the hook
should be installed
:arg dbobj: the DB object the hook uses to store the settings
information.
...
...
@@ -81,7 +81,7 @@ class BaseHook(object):
def
remove
(
cls
,
project
):
# pragma: no cover
''' Method called to remove the hook of a project.
:arg project: a ``p
rogit
.model.Project`` object to which the hook
:arg project: a ``p
agure
.model.Project`` object to which the hook
should be installed
'''
...
...
p
rogit
/hooks/files/git_multimail.py
→
p
agure
/hooks/files/git_multimail.py
View file @
fe501713
File moved
p
rogit/hooks/files/progit
_hook.py
→
p
agure/hooks/files/pagure
_hook.py
View file @
fe501713
#! /usr/bin/env python2
"""P
rogit
specific hook to add comment on issues if the commits fixes or
"""P
agure
specific hook to add comment on issues if the commits fixes or
relates to an issue.
"""
...
...
@@ -11,15 +11,15 @@ import sys
import
subprocess
if
'P
ROGIT
_CONFIG'
not
in
os
.
environ
\
and
os
.
path
.
exists
(
'/etc/p
rogit/progit
.cfg'
):
print
'Using configuration file `/etc/p
rogit/progit
.cfg`'
os
.
environ
[
'P
ROGIT_CONFIG'
]
=
'/etc/progit/progit
.cfg'
if
'P
AGURE
_CONFIG'
not
in
os
.
environ
\
and
os
.
path
.
exists
(
'/etc/p
agure/pagure
.cfg'
):
print
'Using configuration file `/etc/p
agure/pagure
.cfg`'
os
.
environ
[
'P
AGURE_CONFIG'
]
=
'/etc/pagure/pagure
.cfg'
import
p
rogit
import
p
rogit
.exceptions
import
p
rogit
.lib.link
import
p
agure
import
p
agure
.exceptions
import
p
agure
.lib.link
def
read_git_output
(
args
,
input
=
None
,
keepends
=
False
,
**
kw
):
...
...
@@ -68,15 +68,15 @@ def generate_revision_change_log(new_commits_list):
line
=
line
.
strip
()
print
'*'
,
line
for
issue
in
p
rogit
.
lib
.
link
.
get_relation
(
p
rogit
.
SESSION
,
get_repo_name
(),
get_username
(),
for
issue
in
p
agure
.
lib
.
link
.
get_relation
(
p
agure
.
SESSION
,
get_repo_name
(),
get_username
(),
line
,
'fixes'
):
fixes_commit
(
commitid
,
issue
,
p
rogit
.
APP
.
config
.
get
(
'APP_URL'
))
fixes_commit
(
commitid
,
issue
,
p
agure
.
APP
.
config
.
get
(
'APP_URL'
))
for
issue
in
p
rogit
.
lib
.
link
.
get_relation
(