1
# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Canonical Ltd
1
# Copyright (C) 2004-2010 Canonical Ltd
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
1180
1180
' directory exists, but does not already'
1181
1181
' have a control directory. This flag will'
1182
1182
' allow branch to proceed.'),
1184
help="Bind new branch to from location."),
1184
1186
aliases = ['get', 'clone']
1186
1188
def run(self, from_location, to_location=None, revision=None,
1187
1189
hardlink=False, stacked=False, standalone=False, no_tree=False,
1188
use_existing_dir=False, switch=False):
1190
use_existing_dir=False, switch=False, bind=False):
1189
1191
from bzrlib import switch as _mod_switch
1190
1192
from bzrlib.tag import _merge_tags_if_possible
1191
1193
accelerator_tree, br_from = bzrdir.BzrDir.open_tree_or_branch(
1244
1246
except (errors.NotStacked, errors.UnstackableBranchFormat,
1245
1247
errors.UnstackableRepositoryFormat), e:
1246
1248
note('Branched %d revision(s).' % branch.revno())
1250
# Bind to the parent
1251
parent_branch = Branch.open(from_location)
1252
branch.bind(parent_branch)
1253
note('New branch bound to %s' % from_location)
1248
1255
# Switch to the new branch
1249
1256
wt, _ = WorkingTree.open_containing('.')
2853
2862
chunks = content.splitlines(True)
2854
2863
content = filtered_output_bytes(chunks, filters,
2855
2864
ContentFilterContext(relpath, rev_tree))
2856
2866
self.outf.writelines(content)
2858
2869
self.outf.write(content)
4717
4728
CAUTION: Locks should only be broken when you are sure that the process
4718
4729
holding the lock has been stopped.
4720
You can get information on what locks are open via the 'bzr info' command.
4731
You can get information on what locks are open via the 'bzr info
4732
[location]' command.
4736
bzr break-lock bzr+ssh://example.com/bzr/foo
4725
4738
takes_args = ['location?']
4998
5011
directly from the merge directive, without retrieving data from a
5001
If --no-bundle is specified, then public_branch is needed (and must be
5002
up-to-date), so that the receiver can perform the merge using the
5003
public_branch. The public_branch is always included if known, so that
5004
people can check it later.
5006
The submit branch defaults to the parent, but can be overridden. Both
5007
submit branch and public branch will be remembered if supplied.
5009
If a public_branch is known for the submit_branch, that public submit
5010
branch is used in the merge instructions. This means that a local mirror
5011
can be used as your actual submit branch, once you have set public_branch
5014
`bzr send` creates a compact data set that, when applied using bzr
5015
merge, has the same effect as merging from the source branch.
5017
By default the merge directive is self-contained and can be applied to any
5018
branch containing submit_branch in its ancestory without needing access to
5021
If --no-bundle is specified, then Bazaar doesn't send the contents of the
5022
revisions, but only a structured request to merge from the
5023
public_location. In that case the public_branch is needed and it must be
5024
up-to-date and accessible to the recipient. The public_branch is always
5025
included if known, so that people can check it later.
5027
The submit branch defaults to the parent of the source branch, but can be
5028
overridden. Both submit branch and public branch will be remembered in
5029
branch.conf the first time they are used for a particular branch. The
5030
source branch defaults to that containing the working directory, but can
5031
be changed using --from.
5033
In order to calculate those changes, bzr must analyse the submit branch.
5034
Therefore it is most efficient for the submit branch to be a local mirror.
5035
If a public location is known for the submit_branch, that location is used
5036
in the merge directive.
5038
The default behaviour is to send the merge directive by mail, unless -o is
5039
given, in which case it is sent to a file.
5014
5041
Mail is sent using your preferred mail program. This should be transparent
5015
5042
on Windows (it uses MAPI). On Linux, it requires the xdg-email utility.
5036
5063
The merge directives created by bzr send may be applied using bzr merge or
5037
5064
bzr pull by specifying a file containing a merge directive as the location.
5066
bzr send makes extensive use of public locations to map local locations into
5067
URLs that can be used by other people. See `bzr help configuration` to
5068
set them, and use `bzr info` to display them.
5040
5071
encoding_type = 'exact'
5743
5774
enum_switch=False, value_switches=True,
5744
5775
apply="Apply changes and remove from the shelf.",
5745
5776
dry_run="Show changes, but do not apply or remove them.",
5777
preview="Instead of unshelving the changes, show the diff that "
5778
"would result from unshelving.",
5746
5779
delete_only="Delete changes without applying them.",
5747
5780
keep="Apply changes but don't delete them.",