~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_smart_add.py

  • Committer: Martin Pool
  • Date: 2005-09-22 13:32:02 UTC
  • Revision ID: mbp@sourcefrog.net-20050922133202-347cfd35d2941dd5
- simple weave-based annotate code (not complete)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
        from bzrlib.add import smart_add
13
13
        paths = ("original/", "original/file1", "original/file2")
14
14
        self.build_tree(paths)
15
 
        branch = Branch.initialize(".")
 
15
        branch = Branch(".", init=True)
16
16
        smart_add((".",), recurse=True)
17
17
        for path in paths:
18
18
            self.assertNotEqual(branch.inventory.path2id(path), None)
22
22
        from bzrlib.add import smart_add
23
23
        paths = ("original/", "original/file1", "original/file2")
24
24
        self.build_tree(paths)
25
 
        branch = Branch.initialize(".")
 
25
        branch = Branch(".", init=True)
26
26
        os.chdir("original")
27
27
        smart_add((".",), recurse=True)
28
28
        for path in paths:
35
35
        branch_paths = ("branch/", "branch/original/", "branch/original/file1",
36
36
                        "branch/original/file2")
37
37
        self.build_tree(branch_paths)
38
 
        branch = Branch.initialize("branch")
 
38
        branch = Branch("branch", init=True)
39
39
        smart_add(("branch",))
40
40
        for path in paths:
41
41
            self.assertNotEqual(branch.inventory.path2id(path), None)
51
51
                       "original/child/", "original/child/path")
52
52
        
53
53
        self.build_tree(build_paths)
54
 
        branch = Branch.initialize(".")
55
 
        child_branch = Branch.initialize("original/child")
 
54
        branch = Branch(".", init=True)
 
55
        child_branch = Branch("original/child", init=True)
56
56
        smart_add((".",), True, add_reporter_null)
57
57
        for path in paths:
58
58
            self.assertNotEqual((path, branch.inventory.path2id(path)),
68
68
        from bzrlib.add import smart_add
69
69
        paths = ("file1", "file2")
70
70
        self.build_tree(paths)
71
 
        branch = Branch.initialize(".")
 
71
        branch = Branch(".", init=True)
72
72
        smart_add(paths)
73
73
        for path in paths:
74
74
            self.assertNotEqual(branch.inventory.path2id(path), None)
81
81
        from bzrlib.add import smart_add_branch
82
82
        paths = ("original/", "original/file1", "original/file2")
83
83
        self.build_tree(paths)
84
 
        branch = Branch.initialize(".")
 
84
        branch = Branch(".", init=True)
85
85
        smart_add_branch(branch, (".",))
86
86
        for path in paths:
87
87
            self.assertNotEqual(branch.inventory.path2id(path), None)
91
91
        from bzrlib.add import smart_add_branch
92
92
        paths = ("original/", "original/file1", "original/file2")
93
93
        self.build_tree(paths)
94
 
        branch = Branch.initialize(".")
 
94
        branch = Branch(".", init=True)
95
95
        os.chdir("original")
96
96
        smart_add_branch(branch, (".",))
97
97
        for path in paths:
104
104
        branch_paths = ("branch/", "branch/original/", "branch/original/file1",
105
105
                        "branch/original/file2")
106
106
        self.build_tree(branch_paths)
107
 
        branch = Branch.initialize("branch")
 
107
        branch = Branch("branch", init=True)
108
108
        smart_add_branch(branch, ("branch",))
109
109
        for path in paths:
110
110
            self.assertNotEqual(branch.inventory.path2id(path), None)
118
118
        build_paths = ("original/", "original/file1", "original/file2", 
119
119
                       "original/child/", "original/child/path")
120
120
        self.build_tree(build_paths)
121
 
        branch = Branch.initialize(".")
122
 
        child_branch = Branch.initialize("original/child")
 
121
        branch = Branch(".", init=True)
 
122
        child_branch = Branch("original/child", init=True)
123
123
        smart_add_branch(branch, (".",))
124
124
        for path in paths:
125
125
            self.assertNotEqual((path, branch.inventory.path2id(path)),
135
135
        from bzrlib.add import smart_add_branch
136
136
        paths = ("file1", "file2")
137
137
        self.build_tree(paths)
138
 
        branch = Branch.initialize(".")
 
138
        branch = Branch(".", init=True)
139
139
        smart_add_branch(branch, paths)
140
140
        for path in paths:
141
141
            self.assertNotEqual(branch.inventory.path2id(path), None)