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
85258c61
Commit
85258c61
authored
Aug 22, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement status
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
3e5ba447
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
weblate/trans/tests/test_vcs.py
weblate/trans/tests/test_vcs.py
+7
-0
weblate/trans/vcs.py
weblate/trans/vcs.py
+7
-0
No files found.
weblate/trans/tests/test_vcs.py
View file @
85258c61
...
...
@@ -65,3 +65,10 @@ class VCSGitTest(RepoTestCase):
def
test_rebase
(
self
):
repo
=
GitRepository
.
clone
(
self
.
repo_path
,
self
.
_tempdir
)
repo
.
rebase
(
'master'
)
def
test_status
(
self
):
repo
=
GitRepository
.
clone
(
self
.
repo_path
,
self
.
_tempdir
)
status
=
repo
.
status
()
self
.
assertTrue
(
"Your branch is up-to-date with 'origin/master'."
in
status
)
weblate/trans/vcs.py
View file @
85258c61
...
...
@@ -41,6 +41,7 @@ class Repository(object):
_cmd_clone
=
'clone'
_cmd_update_remote
=
None
_cmd_push
=
None
_cmd_status
=
[
'status'
]
def
__init__
(
self
,
path
):
self
.
path
=
path
...
...
@@ -96,6 +97,12 @@ class Repository(object):
"""
self
.
_execute
(
self
.
_cmd_update_remote
)
def
status
(
self
):
"""
Returns status of the repository.
"""
return
self
.
_execute
(
self
.
_cmd_status
)
def
push
(
self
,
branch
):
"""
Pushes given branch to remote repository.
...
...
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