self.repo.save_text(title, text, author, comment, parent=-1)
saved = self.repo.open_page(title).read()
assert saved == text
-
+
def test_save_merge_line_conflict(self):
text = u"test\ntest\n"
text1 = u"test\ntext\n"
def test_document_not_found(self):
self.repo.open_page(u'unknown entity')
+ def test_open_existing_repository(self):
+ self.repo.save_text(u'Python!', u'ham and spam')
+ current_repo_revision = self.repo.repo_revision()
+ same_repo = vstorage.VersionedStorage(self.repo_path)
+ assert same_repo.repo_revision() == current_repo_revision
+
import mimetypes
import urllib
-import sys
-
# Note: we have to set these before importing Mercurial
os.environ['HGENCODING'] = 'utf-8'
os.environ['HGMERGE'] = "internal:merge"
if p1 == p2:
return text
- try:
- unresolved = mercurial.merge.update(self.repo, tip_node, True, False, partial)
- except mercurial.util.Abort:
- raise
- unresolved = 1, 1, 1, 1
+ # TODO: Check if merge was successful
+ mercurial.merge.update(self.repo, tip_node, True, False, partial)
self.repo.dirstate.setparents(tip_node, node)
# Mercurial 1.1 and later need updating the merge state