Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
71295ccd
Commit
71295ccd
authored
Mar 20, 2013
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement pushgit command (issue #230)
This can be used to push changes upstream on commandline.
parent
d8030a4f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
docs/management.rst
docs/management.rst
+11
-0
trans/management/commands/pushgit.py
trans/management/commands/pushgit.py
+42
-0
trans/tests/commands.py
trans/tests/commands.py
+4
-0
No files found.
docs/management.rst
View file @
71295ccd
...
...
@@ -101,6 +101,17 @@ to date. Additionally you can limit languages to process with ``--lang``.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
pushgit <project|project/subproject>
------------------------------------
.. django-admin:: pushgit
Pushes commited changes to upstream Git repository. With ``--force-commit``
it also commits any pending changes.
You can either define which project or subproject to update (eg.
``weblate/master``) or use ``--all`` to update all existing subprojects.
rebuild_index
-------------
...
...
trans/management/commands/pushgit.py
0 → 100644
View file @
71295ccd
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2013 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
from
trans.management.commands
import
WeblateCommand
from
django.utils
import
timezone
from
datetime
import
timedelta
from
optparse
import
make_option
class
Command
(
WeblateCommand
):
help
=
'pushes all changes to upstream respository'
option_list
=
WeblateCommand
.
option_list
+
(
make_option
(
'--force-commit'
,
action
=
'store_true'
,
dest
=
'force_commit'
,
default
=
False
,
help
=
'Forces commiting pending changes'
),
)
def
handle
(
self
,
*
args
,
**
options
):
for
subproject
in
self
.
get_subprojects
(
*
args
,
**
options
):
subproject
.
do_push
(
force_commit
=
options
[
'force_commit'
])
trans/tests/commands.py
View file @
71295ccd
...
...
@@ -188,6 +188,10 @@ class CommitGitTest(CheckGitTest):
command_name
=
'commitgit'
class
PushGitTest
(
CheckGitTest
):
command_name
=
'pushgit'
class
LoadTest
(
CheckGitTest
):
command_name
=
'loadpo'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment