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
592ae0db
Commit
592ae0db
authored
May 14, 2015
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Test actual merging/rebasing remote commit
Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
c368af35
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
2 deletions
+32
-2
weblate/trans/tests/test_vcs.py
weblate/trans/tests/test_vcs.py
+32
-2
No files found.
weblate/trans/tests/test_vcs.py
View file @
592ae0db
...
...
@@ -86,15 +86,37 @@ class VCSGitTest(RepoTestCase):
def
setUp
(
self
):
super
(
VCSGitTest
,
self
).
setUp
()
self
.
_tempdir
=
tempfile
.
mkdtemp
()
self
.
repo
=
self
.
_class
.
clone
(
self
.
repo
=
self
.
clone_repo
(
self
.
_tempdir
)
def
clone_repo
(
self
,
path
):
return
self
.
_class
.
clone
(
getattr
(
self
,
'{0}_repo_path'
.
format
(
self
.
_vcs
)),
self
.
_tempdir
path
,
)
def
tearDown
(
self
):
if
self
.
_tempdir
is
not
None
:
shutil
.
rmtree
(
self
.
_tempdir
)
def
add_remote_commit
(
self
):
tempdir
=
tempfile
.
mkdtemp
()
try
:
repo
=
self
.
clone_repo
(
tempdir
)
repo
.
set_committer
(
'Second Bar'
,
'second@example.net'
)
# Create test file
with
open
(
os
.
path
.
join
(
self
.
_tempdir
,
'test2'
),
'w'
)
as
handle
:
handle
.
write
(
'TEST FILE
\
n
'
)
# Commit it
self
.
repo
.
commit
(
'Test commit'
,
'Foo Bar <foo@bar.com>'
,
datetime
.
datetime
.
now
(),
[
'test2'
]
)
finally
:
shutil
.
rmtree
(
tempdir
)
def
test_clone
(
self
):
self
.
assertTrue
(
os
.
path
.
exists
(
os
.
path
.
join
(
self
.
_tempdir
,
'.{0}'
.
format
(
self
.
_vcs
))
...
...
@@ -133,6 +155,14 @@ class VCSGitTest(RepoTestCase):
self
.
test_commit
()
self
.
test_rebase
()
def
test_merge_remote
(
self
):
self
.
add_remote_commit
()
self
.
test_merge
()
def
test_rebase_remote
(
self
):
self
.
add_remote_commit
()
self
.
test_rebase
()
def
test_merge
(
self
):
self
.
repo
.
merge
(
self
.
_branch
)
...
...
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