2010-07-14 17:39:14 +04:00
|
|
|
import test_util
|
|
|
|
|
2010-07-14 17:39:18 +04:00
|
|
|
import unittest
|
|
|
|
|
2010-07-14 17:39:14 +04:00
|
|
|
class TestPushEol(test_util.TestBase):
|
2013-08-09 21:30:25 +04:00
|
|
|
obsolete_mode_tests = True
|
2013-08-10 01:45:59 +04:00
|
|
|
stupid_mode_tests = True
|
2013-08-09 21:30:25 +04:00
|
|
|
|
2010-07-14 17:39:14 +04:00
|
|
|
def setUp(self):
|
|
|
|
test_util.TestBase.setUp(self)
|
2012-04-19 20:29:25 +04:00
|
|
|
self._load_fixture_and_fetch('emptyrepo.svndump')
|
2010-07-14 17:39:14 +04:00
|
|
|
|
2013-08-10 01:45:59 +04:00
|
|
|
def test_push_dirs(self):
|
2010-07-14 17:39:14 +04:00
|
|
|
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)
|
2013-08-10 01:45:59 +04:00
|
|
|
self.pushrevisions()
|
2010-07-14 17:39:14 +04:00
|
|
|
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)
|
2013-08-10 01:45:59 +04:00
|
|
|
self.pushrevisions()
|
2010-07-14 17:39:14 +04:00
|
|
|
self.assertchanges(changes, self.repo['tip'])
|