/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/push.py

  • Committer: Jonathan Riddell
  • Date: 2011-09-16 10:08:09 UTC
  • mto: This revision was merged to the branch mainline in revision 6145.
  • Revision ID: jriddell@canonical.com-20110916100809-uii7a1h5tp8qguhy
add gettext to progress bar strings

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
    note,
27
27
    warning,
28
28
    )
 
29
from bzrlib.i18n import gettext
29
30
 
30
31
 
31
32
class PushResult(object):
47
48
        """Write a human-readable description of the result."""
48
49
        if self.branch_push_result is None:
49
50
            if self.stacked_on is not None:
50
 
                note('Created new stacked branch referring to %s.' %
 
51
                note(gettext('Created new stacked branch referring to %s.') %
51
52
                    self.stacked_on)
52
53
            else:
53
 
                note('Created new branch.')
 
54
                note(gettext('Created new branch.'))
54
55
        else:
55
56
            self.branch_push_result.report(to_file)
56
57
 
57
58
 
58
59
def _show_push_branch(br_from, revision_id, location, to_file, verbose=False,
59
60
    overwrite=False, remember=False, stacked_on=None, create_prefix=False,
60
 
    use_existing_dir=False):
 
61
    use_existing_dir=False, no_tree=False):
61
62
    """Push a branch to a location.
62
63
 
63
64
    :param br_from: the source branch
87
88
        try:
88
89
            br_to = br_from.create_clone_on_transport(to_transport,
89
90
                revision_id=revision_id, stacked_on=stacked_on,
90
 
                create_prefix=create_prefix, use_existing_dir=use_existing_dir)
 
91
                create_prefix=create_prefix, use_existing_dir=use_existing_dir,
 
92
                no_tree=no_tree)
91
93
        except errors.FileExists, err:
92
94
            if err.path.endswith('/.bzr'):
93
95
                raise errors.BzrCommandError(
128
130
        push_result.target_branch = br_to
129
131
        push_result.old_revid = _mod_revision.NULL_REVISION
130
132
        push_result.old_revno = 0
131
 
        if br_from.get_push_location() is None or remember:
 
133
        # Remembers if asked explicitly or no previous location is set
 
134
        if (remember
 
135
            or (remember is None and br_from.get_push_location() is None)):
132
136
            br_from.set_push_location(br_to.base)
133
137
    else:
134
138
        if stacked_on is not None: