~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/push.py

  • Committer: Robert Collins
  • Date: 2010-06-28 02:41:22 UTC
  • mto: This revision was merged to the branch mainline in revision 5324.
  • Revision ID: robertc@robertcollins.net-20100628024122-g951fzp74f3u6wst
Sanity check that new_trace_file in pop_log_file is valid, and also fix a test that monkey patched get_terminal_encoding.

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
 
58
58
def _show_push_branch(br_from, revision_id, location, to_file, verbose=False,
59
59
    overwrite=False, remember=False, stacked_on=None, create_prefix=False,
60
 
    use_existing_dir=False, no_tree=False):
 
60
    use_existing_dir=False):
61
61
    """Push a branch to a location.
62
62
 
63
63
    :param br_from: the source branch
87
87
        try:
88
88
            br_to = br_from.create_clone_on_transport(to_transport,
89
89
                revision_id=revision_id, stacked_on=stacked_on,
90
 
                create_prefix=create_prefix, use_existing_dir=use_existing_dir,
91
 
                no_tree=no_tree)
 
90
                create_prefix=create_prefix, use_existing_dir=use_existing_dir)
92
91
        except errors.FileExists, err:
93
92
            if err.path.endswith('/.bzr'):
94
93
                raise errors.BzrCommandError(
129
128
        push_result.target_branch = br_to
130
129
        push_result.old_revid = _mod_revision.NULL_REVISION
131
130
        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)):
 
131
        if br_from.get_push_location() is None or remember:
135
132
            br_from.set_push_location(br_to.base)
136
133
    else:
137
134
        if stacked_on is not None: