~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to testbzr

  • Committer: Martin Pool
  • Date: 2005-05-27 01:50:28 UTC
  • Revision ID: mbp@sourcefrog.net-20050527015028-83638384380101a8
- still use internal diff by default

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#! /usr/bin/python
 
2
# -*- coding: utf-8 -*-
2
3
 
3
4
# Copyright (C) 2005 Canonical Ltd
4
5
 
277
278
    runcmd("bzr add sub1")
278
279
    runcmd("bzr rename sub1 sub2")
279
280
    runcmd("bzr move hello.txt sub2")
280
 
    assert backtick("bzr relpath sub2/hello.txt") == "sub2/hello.txt\n"
 
281
    assert backtick("bzr relpath sub2/hello.txt") == os.path.join("sub2", "hello.txt\n")
281
282
 
282
283
    assert exists("sub2")
283
284
    assert exists("sub2/hello.txt")
301
302
    assert backtick('bzr root')[:-1] == os.path.join(test_root, 'branch1')
302
303
    runcmd('bzr move ../hello.txt .')
303
304
    assert exists('./hello.txt')
304
 
    assert backtick('bzr relpath hello.txt') == 'sub1/sub2/hello.txt\n'
305
 
    assert backtick('bzr relpath ../../sub1/sub2/hello.txt') == 'sub1/sub2/hello.txt\n'
 
305
    assert backtick('bzr relpath hello.txt') == os.path.join('sub1', 'sub2', 'hello.txt\n')
 
306
    assert backtick('bzr relpath ../../sub1/sub2/hello.txt') == os.path.join('sub1', 'sub2', 'hello.txt\n')
306
307
    runcmd(['bzr', 'commit', '-m', 'move to parent directory'])
307
308
    cd('..')
308
 
    assert backtick('bzr relpath sub2/hello.txt') == 'sub1/sub2/hello.txt\n'
 
309
    assert backtick('bzr relpath sub2/hello.txt') == os.path.join('sub1', 'sub2', 'hello.txt\n')
309
310
 
310
311
    runcmd('bzr move sub2/hello.txt .')
311
312
    assert exists('hello.txt')
341
342
    runcmd('bzr log --forward')
342
343
 
343
344
    runcmd('bzr info')
344
 
    
345
 
    
346
 
    cd('..')
 
345
 
 
346
 
 
347
 
 
348
    cd('..')
 
349
    cd('..')
 
350
 
 
351
    progress('status after remove')
 
352
    mkdir('status-after-remove')
 
353
    # see mail from William Dodé, 2005-05-25
 
354
    # $ bzr init; touch a; bzr add a; bzr commit -m "add a"
 
355
    #     * looking for changes...
 
356
    #     added a
 
357
    #     * commited r1
 
358
    #     $ bzr remove a
 
359
    #     $ bzr status
 
360
    #     bzr: local variable 'kind' referenced before assignment
 
361
    #     at /vrac/python/bazaar-ng/bzrlib/diff.py:286 in compare_trees()
 
362
    #     see ~/.bzr.log for debug information
 
363
    cd('status-after-remove')
 
364
    runcmd('bzr init')
 
365
    file('a', 'w').write('foo')
 
366
    runcmd('bzr add a')
 
367
    runcmd(['bzr', 'commit', '-m', 'add a'])
 
368
    runcmd('bzr remove a')
 
369
    runcmd('bzr status')
 
370
 
347
371
    cd('..')
348
372
 
349
373
    progress('ignore patterns')