77
77
sr = ScriptRunner()
78
78
sr.run_script(self, '''
80
81
$ bzr shelve --all -m Foo
84
2>Changes shelved with id "1".
81
85
$ bzr shelve --list
83
87
$ bzr unshelve --keep
88
2>Using changes with id "1".
91
2>All changes applied successfully.
84
92
$ bzr shelve --list
98
class TestUnshelvePreview(TestCaseWithTransport):
100
def test_non_ascii(self):
101
"""Test that we can show a non-ascii diff that would result from unshelving"""
103
init_content = u'Initial: \u0418\u0437\u043d\u0430\u0447\n'.encode('utf-8')
104
more_content = u'More: \u0415\u0449\u0451\n'.encode('utf-8')
105
next_content = init_content + more_content
106
diff_part = '@@ -1,1 +1,2 @@\n %s+%s' % (init_content, more_content)
108
tree = self.make_branch_and_tree('.')
109
self.build_tree_contents([('a_file', init_content)])
111
tree.commit(message='committed')
112
self.build_tree_contents([('a_file', next_content)])
113
self.run_bzr(['shelve', '--all'])
114
out, err = self.run_bzr(['unshelve', '--preview'], encoding='latin-1')
116
self.assertContainsString(out, diff_part)
92
119
class TestShelveRelpath(TestCaseWithTransport):