~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/push.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-02-17 13:49:11 UTC
  • mfrom: (4988.11.1 imports)
  • Revision ID: pqm@pqm.ubuntu.com-20100217134911-s77se00ni7xc1hz8
(Jelmer) Remove some unused imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
"""UI helper for the push command."""
18
18
 
19
19
from bzrlib import (
 
20
    builtins,
 
21
    branch,
20
22
    bzrdir,
21
23
    errors,
22
24
    revision as _mod_revision,
57
59
 
58
60
def _show_push_branch(br_from, revision_id, location, to_file, verbose=False,
59
61
    overwrite=False, remember=False, stacked_on=None, create_prefix=False,
60
 
    use_existing_dir=False, no_tree=False):
 
62
    use_existing_dir=False):
61
63
    """Push a branch to a location.
62
64
 
63
65
    :param br_from: the source branch
87
89
        try:
88
90
            br_to = br_from.create_clone_on_transport(to_transport,
89
91
                revision_id=revision_id, stacked_on=stacked_on,
90
 
                create_prefix=create_prefix, use_existing_dir=use_existing_dir,
91
 
                no_tree=no_tree)
 
92
                create_prefix=create_prefix, use_existing_dir=use_existing_dir)
92
93
        except errors.FileExists, err:
93
94
            if err.path.endswith('/.bzr'):
94
95
                raise errors.BzrCommandError(
129
130
        push_result.target_branch = br_to
130
131
        push_result.old_revid = _mod_revision.NULL_REVISION
131
132
        push_result.old_revno = 0
132
 
        # Remembers if asked explicitly or no previous location is set
133
 
        if (remember
134
 
            or (remember is None and br_from.get_push_location() is None)):
 
133
        if br_from.get_push_location() is None or remember:
135
134
            br_from.set_push_location(br_to.base)
136
135
    else:
137
136
        if stacked_on is not None: