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
4b252f6e
Commit
4b252f6e
authored
Sep 26, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bare option to clone
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
4c7ef5ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
weblate/trans/vcs.py
weblate/trans/vcs.py
+14
-4
No files found.
weblate/trans/vcs.py
View file @
4b252f6e
...
...
@@ -40,7 +40,6 @@ class Repository(object):
_cmd
=
'false'
_cmd_last_revision
=
None
_cmd_last_remote_revision
=
None
_cmd_clone
=
'clone'
_cmd_update_remote
=
None
_cmd_push
=
None
_cmd_status
=
[
'status'
]
...
...
@@ -86,13 +85,12 @@ class Repository(object):
return
self
.
_last_remote_revision
@
classmethod
def
clone
(
cls
,
source
,
target
):
def
clone
(
cls
,
source
,
target
,
bare
=
False
):
"""
Clones repository and returns Repository object for cloned
repository.
"""
cls
.
_popen
([
cls
.
_cmd_clone
,
source
,
target
])
return
cls
(
target
)
raise
NotImplementedError
()
def
update_remote
(
self
):
"""
...
...
@@ -209,6 +207,18 @@ class GitRepository(Repository):
_cmd_update_remote
=
[
'remote'
,
'update'
,
'origin'
]
_cmd_push
=
[
'push'
,
'origin'
]
@
classmethod
def
clone
(
cls
,
source
,
target
,
bare
=
False
):
"""
Clones repository and returns Repository object for cloned
repository.
"""
if
bare
:
cls
.
_popen
([
'clone'
,
'--bare'
,
source
,
target
])
else
:
cls
.
_popen
([
'clone'
,
source
,
target
])
return
cls
(
target
)
def
get_config
(
self
,
path
):
"""
Reads entry from configuration.
...
...
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