~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_mv.py

  • Committer: Marius Kruger
  • Date: 2006-12-22 16:49:38 UTC
  • mto: (2220.1.1 bzr.enhanced_move)
  • mto: This revision was merged to the branch mainline in revision 2241.
  • Revision ID: amanic@gmail.com-20061222164938-rbjxiq858d78k5lw
Converted move/rename error messages to show source => target.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
    def test_mv_unversioned(self):
62
62
        self.build_tree(['unversioned.txt'])
63
63
        self.run_bzr_error(
64
 
            ["^bzr: ERROR: Could not rename file. .* is not versioned$"],
 
64
            ["^bzr: ERROR: Could not rename unversioned.txt => elsewhere."
 
65
             " .*unversioned.txt is not versioned$"],
65
66
            'mv', 'unversioned.txt', 'elsewhere')
66
67
 
67
68
    def test_mv_nonexisting(self):
68
69
        self.run_bzr_error(
69
 
            ["^bzr: ERROR: Could not rename file. .* is not versioned$"],
 
70
            ["^bzr: ERROR: Could not rename doesnotexist => somewhereelse."
 
71
             " .*doesnotexist is not versioned$"],
70
72
            'mv', 'doesnotexist', 'somewhereelse')
71
73
 
72
74
    def test_mv_unqualified(self):
78
80
        tree.add(['test.txt'])
79
81
 
80
82
        self.run_bzr_error(
81
 
            ["^bzr: ERROR: Invalid move destination. .* is not versioned$"],
 
83
            ["^bzr: ERROR: Could not move to sub1. sub1 is not versioned$"],
82
84
            'mv', 'test.txt', 'sub1')
83
85
 
84
86
        self.run_bzr_error(
171
173
    
172
174
        os.remove('a')
173
175
        self.run_bzr_error(
174
 
            ["^bzr: ERROR: Could not move file. .+ is already versioned$"],
 
176
            ["^bzr: ERROR: Could not move a => b. b is already versioned$"],
175
177
            'mv', 'a', 'b')
176
178
        self.failIfExists('a')
177
179
        self.failUnlessExists('b')
228
230
        tree.commit('initial commit')
229
231
 
230
232
        os.rename('a1', 'sub1/a1')
231
 
        self.run_bzr_error(            
232
 
            ["^bzr: ERROR: Invalid move destination. .* is not versioned$"],
 
233
        self.run_bzr_error(
 
234
            ["^bzr: ERROR: Could not move to sub1. sub1 is not versioned$"],
233
235
            'mv', 'a1', 'a2', 'sub1')
234
236
        self.failIfExists('a1')
235
237
        self.failUnlessExists('a2')
245
247
        tree.commit('initial commit')
246
248
 
247
249
        self.run_bzr_error(
248
 
            ["^bzr: ERROR: Files exist: .+ .+: Could not rename file."
 
250
            ["^bzr: ERROR: Files exist: a b: Could not rename a => b."
249
251
             " Use option '--after' to force rename."],
250
252
            'mv', 'a', 'b')
251
253
        self.failUnlessExists('a')
273
275
        tree.commit('initial commit')
274
276
 
275
277
        self.run_bzr_error(
276
 
            ["^bzr: ERROR: Files exist: .+ .+: Could not rename file."
 
278
            ["^bzr: ERROR: Files exist: a1 .*a1: Could not rename a1 => a1."
277
279
             " Use option '--after' to force rename."],
278
280
            'mv', 'a1', 'a2', 'sub1')
279
281
        self.failUnlessExists('a1')