59
59
root = transform.get_id_tree(wt.get_root_id())
60
60
trans_id = transform.new_file('name', root, 'contents',
62
62
oz = transform.new_directory('oz', root, 'oz-id')
63
63
dorothy = transform.new_directory('dorothy', oz, 'dorothy-id')
64
64
toto = transform.new_file('toto', dorothy, 'toto-contents',
66
66
wizard = transform.new_symlink('wizard', oz, 'wizard-target',
69
69
self.assertEqual(len(transform.find_conflicts()), 0)
70
70
self.assertEqual('contents', file('name').read())
71
71
self.assertEqual(wt.path2id('name'), 'my_pretties')
72
self.assertIs(wt.is_executable('my_pretties'), True)
72
73
self.assertEqual(wt.path2id('oz'), 'oz-id')
73
74
self.assertEqual(wt.path2id('oz/dorothy'), 'dorothy-id')
74
75
self.assertEqual(wt.path2id('oz/dorothy/toto'), 'toto-id')
75
76
self.assertEqual(wt.path2id('oz/wizard'), 'wizard-id')
76
77
self.assertEqual('toto-contents', file('oz/dorothy/toto').read())
78
self.assertIs(wt.is_executable('toto-id'), False)
77
79
self.assertEqual(os.readlink('oz/wizard'), 'wizard-target')
79
81
transform.finalize()