~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2009-12-21 17:24:22 UTC
  • mfrom: (4913 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4916.
  • Revision ID: john@arbash-meinel.com-20091221172422-0zy2v8x3fhcdc8c0
Merge bzr.dev 4913, to put NEWS in its place.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1401
1401
            possible_transports=possible_transports)
1402
1402
        if master is not None:
1403
1403
            tree.lock_write()
 
1404
            branch_location = master.base
1404
1405
        else:
1405
1406
            tree.lock_tree_write()
 
1407
            branch_location = tree.branch.base
 
1408
        # get rid of the final '/' and be ready for display
 
1409
        branch_location = urlutils.unescape_for_display(branch_location[:-1],
 
1410
                                                        self.outf.encoding)
1406
1411
        try:
1407
1412
            existing_pending_merges = tree.get_parent_ids()[1:]
1408
1413
            last_rev = _mod_revision.ensure_null(tree.last_revision())
1412
1417
                if master is None or last_rev == _mod_revision.ensure_null(
1413
1418
                    master.last_revision()):
1414
1419
                    revno = tree.branch.revision_id_to_revno(last_rev)
1415
 
                    note("Tree is up to date at revision %d." % (revno,))
 
1420
                    note('Tree is up to date at revision %d of branch %s'
 
1421
                         % (revno, branch_location))
1416
1422
                    return 0
1417
1423
            view_info = _get_view_info_for_change_reporter(tree)
1418
1424
            conflicts = tree.update(
1420
1426
                view_info=view_info), possible_transports=possible_transports)
1421
1427
            revno = tree.branch.revision_id_to_revno(
1422
1428
                _mod_revision.ensure_null(tree.last_revision()))
1423
 
            note('Updated to revision %d.' % (revno,))
 
1429
            note('Updated to revision %d of branch %s' %
 
1430
                 (revno, branch_location))
1424
1431
            if tree.get_parent_ids()[1:] != existing_pending_merges:
1425
1432
                note('Your local commits will now show as pending merges with '
1426
1433
                     "'bzr status', and can be committed with 'bzr commit'.")
2350
2357
            # Build the log formatter
2351
2358
            if log_format is None:
2352
2359
                log_format = log.log_formatter_registry.get_default(b)
 
2360
            # Make a non-encoding output to include the diffs - bug 328007
 
2361
            unencoded_output = ui.ui_factory.make_output_stream(encoding_type='exact')
2353
2362
            lf = log_format(show_ids=show_ids, to_file=self.outf,
 
2363
                            to_exact_file=unencoded_output,
2354
2364
                            show_timezone=timezone,
2355
2365
                            delta_format=get_verbosity_level(),
2356
2366
                            levels=levels,
3069
3079
 
3070
3080
        if message is not None:
3071
3081
            try:
3072
 
                file_exists = os.path.exists(message)
 
3082
                file_exists = osutils.lexists(message)
3073
3083
            except UnicodeError:
3074
3084
                # The commit message contains unicode characters that can't be
3075
3085
                # represented in the filesystem encoding, so that can't be a
5793
5803
            enum_switch=False, value_switches=True,
5794
5804
            apply="Apply changes and remove from the shelf.",
5795
5805
            dry_run="Show changes, but do not apply or remove them.",
5796
 
            delete_only="Delete changes without applying them."
 
5806
            delete_only="Delete changes without applying them.",
 
5807
            keep="Apply changes but don't delete them.",
5797
5808
        )
5798
5809
    ]
5799
5810
    _see_also = ['shelve']