~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-06 06:48:25 UTC
  • mfrom: (4070.8.6 debug-config)
  • Revision ID: pqm@pqm.ubuntu.com-20090306064825-kbpwggw21dygeix6
(mbp) debug_flags configuration option

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
 
18
18
import os
107
107
        tree2.unlock()
108
108
        self.assertEqual('version 2', text)
109
109
 
110
 
    def test_missing_commit(self):
111
 
        """Test a commit with a missing file"""
 
110
    def test_delete_commit(self):
 
111
        """Test a commit with a deleted file"""
112
112
        wt = self.make_branch_and_tree('.')
113
113
        b = wt.branch
114
114
        file('hello', 'w').write('hello world')
550
550
        this_tree.merge_from_branch(other_tree.branch)
551
551
        reporter = CapturingReporter()
552
552
        this_tree.commit('do the commit', reporter=reporter)
553
 
        expected = set([
 
553
        self.assertEqual([
 
554
            ('change', 'unchanged', ''),
 
555
            ('change', 'unchanged', 'dirtoleave'),
 
556
            ('change', 'unchanged', 'filetoleave'),
554
557
            ('change', 'modified', 'filetomodify'),
555
558
            ('change', 'added', 'newdir'),
556
559
            ('change', 'added', 'newfile'),
560
563
            ('renamed', 'renamed', 'filetoreparent', 'renameddir/reparentedfile'),
561
564
            ('deleted', 'dirtoremove'),
562
565
            ('deleted', 'filetoremove'),
563
 
            ])
564
 
        result = set(reporter.calls)
565
 
        missing = expected - result
566
 
        new = result - expected
567
 
        self.assertEqual((set(), set()), (missing, new))
 
566
            ],
 
567
            reporter.calls)
568
568
 
569
569
    def test_commit_removals_respects_filespec(self):
570
570
        """Commit respects the specified_files for removals."""