~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: 2008-05-07 20:31:44 UTC
  • mfrom: (3373.4.1 test_83039)
  • Revision ID: pqm@pqm.ubuntu.com-20080507203144-i3ayws9rh7mf97rv
(jam) Simple test for bug #83039

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        tree = b.repository.revision_tree('rev2')
122
122
        self.assertFalse(tree.has_id('hello-id'))
123
123
 
 
124
    def test_partial_commit_move(self):
 
125
        """Test a partial commit where a file was renamed but not committed.
 
126
 
 
127
        https://bugs.launchpad.net/bzr/+bug/83039
 
128
        
 
129
        If not handled properly, commit will try to snapshot
 
130
        dialog.py with olive/ as a parent, while 
 
131
        olive/ has not been snapshotted yet.
 
132
        """
 
133
        wt = self.make_branch_and_tree('.')
 
134
        b = wt.branch
 
135
        self.build_tree(['annotate/', 'annotate/foo.py',
 
136
                         'olive/', 'olive/dialog.py'
 
137
                        ])
 
138
        wt.add(['annotate', 'olive', 'annotate/foo.py', 'olive/dialog.py'])
 
139
        wt.commit(message='add files')
 
140
        wt.rename_one("olive/dialog.py", "aaa")
 
141
        self.build_tree_contents([('annotate/foo.py', 'modified\n')])
 
142
        wt.commit('renamed hello', specific_files=["annotate"])
 
143
 
124
144
    def test_pointless_commit(self):
125
145
        """Commit refuses unless there are changes or it's forced."""
126
146
        wt = self.make_branch_and_tree('.')