~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: John Arbash Meinel
  • Date: 2008-04-18 18:11:56 UTC
  • mfrom: (2258.4.1 bzr.dev)
  • mto: This revision was merged to the branch mainline in revision 3413.
  • Revision ID: john@arbash-meinel.com-20080418181156-1yrtndjedlfye42r
Merge in and clean up the 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('.')