~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/test_smart_add.py

  • Committer: Robert Collins
  • Date: 2005-09-27 07:24:40 UTC
  • mfrom: (1185.1.41)
  • Revision ID: robertc@robertcollins.net-20050927072440-1bf4d99c3e1db5b3
pair programming worx... merge integration and weave

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(".", init=True)
 
15
        branch = Branch.initialize(".")
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(".", init=True)
 
25
        branch = Branch.initialize(".")
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("branch", init=True)
 
38
        branch = Branch.initialize("branch")
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(".", init=True)
55
 
        child_branch = Branch("original/child", init=True)
 
54
        branch = Branch.initialize(".")
 
55
        child_branch = Branch.initialize("original/child")
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(".", init=True)
 
71
        branch = Branch.initialize(".")
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(".", init=True)
 
84
        branch = Branch.initialize(".")
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(".", init=True)
 
94
        branch = Branch.initialize(".")
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("branch", init=True)
 
107
        branch = Branch.initialize("branch")
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(".", init=True)
122
 
        child_branch = Branch("original/child", init=True)
 
121
        branch = Branch.initialize(".")
 
122
        child_branch = Branch.initialize("original/child")
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(".", init=True)
 
138
        branch = Branch.initialize(".")
139
139
        smart_add_branch(branch, paths)
140
140
        for path in paths:
141
141
            self.assertNotEqual(branch.inventory.path2id(path), None)