~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2009-12-14 15:51:36 UTC
  • mto: (4894.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4895.
  • Revision ID: v.ladeuil+lp@free.fr-20091214155136-rf4nkqvxda9oiw4u
Cleanup tests and tweak the text displayed.

* bzrlib/tests/blackbox/test_update.py:
Fix imports and replace the assertContainsRe with assertEqualDiff
to make the test clearer, more robust and easier to debug.

* bzrlib/tests/commands/test_update.py: 
Fix imports.

* bzrlib/tests/blackbox/test_filtered_view_ops.py: 
Fix imports and strange accesses to base class methods.
(TestViewTreeOperations.test_view_on_update): Avoid os.chdir()
call, simplify string matching assertions.

* bzrlib/builtins.py:
(cmd_update.run): Fix spurious space, get rid of the final '/' for
the base path, don't add a final period (it's a legal char in a
path and would be annoying for people that like to copy/paste).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1404
1404
        else:
1405
1405
            tree.lock_tree_write()
1406
1406
            branch_location = tree.branch.base
1407
 
        branch_location = urlutils.unescape_for_display(branch_location,
 
1407
        # get rid of the final '/' and be ready for display
 
1408
        branch_location = urlutils.unescape_for_display(branch_location[:-1],
1408
1409
                                                        self.outf.encoding)
1409
1410
        try:
1410
1411
            existing_pending_merges = tree.get_parent_ids()[1:]
1415
1416
                if master is None or last_rev == _mod_revision.ensure_null(
1416
1417
                    master.last_revision()):
1417
1418
                    revno = tree.branch.revision_id_to_revno(last_rev)
1418
 
                    note("Tree is up to date at revision %d of branch %s." % 
1419
 
                         (revno, branch_location))
 
1419
                    note('Tree is up to date at revision %d of branch %s'
 
1420
                         % (revno, branch_location))
1420
1421
                    return 0
1421
1422
            view_info = _get_view_info_for_change_reporter(tree)
1422
1423
            conflicts = tree.update(
1424
1425
                view_info=view_info), possible_transports=possible_transports)
1425
1426
            revno = tree.branch.revision_id_to_revno(
1426
1427
                _mod_revision.ensure_null(tree.last_revision()))
1427
 
            note('Updated to revision %d of branch %s.' %
 
1428
            note('Updated to revision %d of branch %s' %
1428
1429
                 (revno, branch_location))
1429
1430
            if tree.get_parent_ids()[1:] != existing_pending_merges:
1430
1431
                note('Your local commits will now show as pending merges with '