comparison tests/test_push_command.py @ 928:d99ed94f4760

wrappers: do not change encoding when pushing This causes problems on platforms where the encoding is actually different, if the manifest contains a path which no longer matches the checkout, a following bailifchanged() actually fails. This happens on Windows with a repository containing UTF-8 encoded filenames checked out on a cp1252 environment.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 09 Sep 2012 14:54:43 +0200
parents 173065f9b715
children 8417be758047
comparison
equal deleted inserted replaced
927:3271fa883f34 928:d99ed94f4760
489 '(pull again and rebase on a newer revision)') 489 '(pull again and rebase on a newer revision)')
490 # verify that any pending transactions on the server got cleaned up 490 # verify that any pending transactions on the server got cleaned up
491 self.assertEqual([], os.listdir( 491 self.assertEqual([], os.listdir(
492 os.path.join(self.tmpdir, 'testrepo-1', 'db', 'transactions'))) 492 os.path.join(self.tmpdir, 'testrepo-1', 'db', 'transactions')))
493 493
494 def test_push_encoding(self):
495 self.test_push_two_revs()
496 # Writing then rebasing UTF-8 filenames in a cp1252 windows console
497 # used to fail because hg internal encoding was being changed during
498 # the interactions with subversion, *and during the rebase*, which
499 # confused the dirstate and made it believe the file was deleted.
500 fn = 'pi\xc3\xa8ce/test'
501 changes = [(fn, fn, 'a')]
502 par = self.repo['tip'].rev()
503 self.commitchanges(changes, parent=par)
504 self.pushrevisions()
505
494 def suite(): 506 def suite():
495 test_classes = [PushTests, ] 507 test_classes = [PushTests, ]
496 all_tests = [] 508 all_tests = []
497 # This is the quickest hack I could come up with to load all the tests from 509 # This is the quickest hack I could come up with to load all the tests from
498 # both classes. Would love a patch that simplifies this without adding 510 # both classes. Would love a patch that simplifies this without adding