~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testchangeset.py

  • Committer: John Arbash Meinel
  • Date: 2005-07-14 01:28:34 UTC
  • mto: (0.5.85) (1185.82.1 bzr-w-changeset)
  • mto: This revision was merged to the branch mainline in revision 1738.
  • Revision ID: john@arbash-meinel.com-20050714012834-29c6539e56191f42
(broken) problem with removes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
326
326
        # Make sure we can handle files with spaces, tabs, other
327
327
        # bogus characters
328
328
        self.build_tree([
329
 
                'b1/with space.txt',
330
 
                'b1/dir/',
331
 
                'b1/dir/filein subdir.c',
332
 
                'b1/dir/WithCaps.txt'
 
329
                'b1/with space.txt'
 
330
                , 'b1/dir/'
 
331
                , 'b1/dir/filein subdir.c'
 
332
                , 'b1/dir/WithCaps.txt'
 
333
                , 'b1/sub/'
 
334
                , 'b1/sub/sub/'
 
335
                , 'b1/sub/sub/nonempty.txt'
333
336
                # Tabs are not valid in filenames on windows
334
337
                #'b1/with\ttab.txt'
335
338
                ])
 
339
        open('b1/sub/sub/emptyfile.txt', 'wb').close()
336
340
        self.b1.add([
337
 
                'with space.txt',
338
 
                'dir',
339
 
                'dir/filein subdir.c',
340
 
                'dir/WithCaps.txt'
 
341
                'with space.txt'
 
342
                , 'dir'
 
343
                , 'dir/filein subdir.c'
 
344
                , 'dir/WithCaps.txt'
 
345
                , 'sub'
 
346
                , 'sub/sub'
 
347
                , 'sub/sub/nonempty.txt'
 
348
                , 'sub/sub/emptyfile.txt'
341
349
                ])
342
350
        self.b1.commit('add whitespace', rev_id='a@cset-0-2')
343
351
 
344
352
        cset = self.get_valid_cset('a@cset-0-1', 'a@cset-0-2')
345
353
        # Check a rollup changeset
346
354
        cset = self.get_valid_cset(None, 'a@cset-0-2')
 
355
 
 
356
        # Now delete entries
 
357
        self.b1.remove(['sub/sub/nonempty.txt'
 
358
                , 'sub/sub/emptyfile.txt'
 
359
                , 'sub/sub'])
 
360
        self.b1.commit('removed', rev_id='a@cset-0-3')
347
361
        
 
362
        cset = self.get_valid_cset('a@cset-0-2', 'a@cset-0-3')
 
363
        # Check a rollup changeset
 
364
        cset = self.get_valid_cset(None, 'a@cset-0-3')
 
365
 
 
366
 
 
367
        # Now move the directory
 
368
        self.b1.rename_one('dir', 'sub/dir')
 
369
        self.b1.commit('rename dir', 'a@cset-0-4')
 
370
 
 
371
        cset = self.get_valid_cset('a@cset-0-3', 'a@cset-0-4')
 
372
        # Check a rollup changeset
 
373
        cset = self.get_valid_cset(None, 'a@cset-0-4')
 
374
 
348
375
TEST_CLASSES = [
349
376
    CTreeTester,
350
377
    CSetTester