mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
fb54cc5694
Summary: Let's move hgsubversion to absolute_import, just to be consistent with the rest of Mercurial codebase. Reviewed By: markbt Differential Revision: D15392154 fbshipit-source-id: e4c32939aff0616790828da508f3feea158669e1
40 lines
1.1 KiB
Python
40 lines
1.1 KiB
Python
from __future__ import absolute_import
|
|
|
|
import test_hgsubversion_util
|
|
|
|
|
|
class TestPushEol(test_hgsubversion_util.TestBase):
|
|
obsolete_mode_tests = True
|
|
stupid_mode_tests = True
|
|
|
|
def setUp(self):
|
|
test_hgsubversion_util.TestBase.setUp(self)
|
|
self._load_fixture_and_fetch("emptyrepo.svndump")
|
|
|
|
def test_push_dirs(self):
|
|
changes = [
|
|
# Root files with LF, CRLF and mixed EOL
|
|
("lf", "lf", "a\nb\n\nc"),
|
|
("crlf", "crlf", "a\r\nb\r\n\r\nc"),
|
|
("mixed", "mixed", "a\r\nb\n\r\nc\nd"),
|
|
]
|
|
self.commitchanges(changes)
|
|
self.pushrevisions()
|
|
self.assertchanges(changes, self.repo["tip"])
|
|
|
|
changes = [
|
|
# Update all files once, with same EOL
|
|
("lf", "lf", "a\nb\n\nc\na\nb\n\nc"),
|
|
("crlf", "crlf", "a\r\nb\r\n\r\nc\r\na\r\nb\r\n\r\nc"),
|
|
("mixed", "mixed", "a\r\nb\n\r\nc\nd\r\na\r\nb\n\r\nc\nd"),
|
|
]
|
|
self.commitchanges(changes)
|
|
self.pushrevisions()
|
|
self.assertchanges(changes, self.repo["tip"])
|
|
|
|
|
|
if __name__ == "__main__":
|
|
import silenttestrunner
|
|
|
|
silenttestrunner.main(__name__)
|