537
537
location can be accessed.
540
takes_options = ['remember', 'overwrite', 'revision', 'verbose']
540
takes_options = ['remember', 'overwrite', 'revision', 'verbose',
542
help='branch to pull into, '
543
'rather than the one containing the working directory',
541
548
takes_args = ['location?']
542
549
encoding_type = 'replace'
544
def run(self, location=None, remember=False, overwrite=False, revision=None, verbose=False):
551
def run(self, location=None, remember=False, overwrite=False,
552
revision=None, verbose=False,
545
554
# FIXME: too much stuff is in the command class
555
if directory is None:
547
tree_to = WorkingTree.open_containing(u'.')[0]
558
tree_to = WorkingTree.open_containing(directory)[0]
548
559
branch_to = tree_to.branch
549
560
except errors.NoWorkingTree:
551
branch_to = Branch.open_containing(u'.')[0]
562
branch_to = Branch.open_containing(directory)[0]
554
565
if location is not None:
632
642
takes_options = ['remember', 'overwrite', 'verbose',
633
Option('create-prefix',
634
help='Create the path leading up to the branch '
635
'if it does not already exist'),
636
Option('use-existing-dir',
637
help='By default push will fail if the target'
638
' directory exists, but does not already'
639
' have a control directory. This flag will'
640
' allow push to proceed.'),
643
Option('create-prefix',
644
help='Create the path leading up to the branch '
645
'if it does not already exist'),
647
help='branch to push from, '
648
'rather than the one containing the working directory',
652
Option('use-existing-dir',
653
help='By default push will fail if the target'
654
' directory exists, but does not already'
655
' have a control directory. This flag will'
656
' allow push to proceed.'),
642
658
takes_args = ['location?']
643
659
encoding_type = 'replace'
645
661
def run(self, location=None, remember=False, overwrite=False,
646
create_prefix=False, verbose=False, use_existing_dir=False):
662
create_prefix=False, verbose=False,
663
use_existing_dir=False,
647
665
# FIXME: Way too big! Put this into a function called from the
650
br_from = Branch.open_containing('.')[0]
667
if directory is None:
669
br_from = Branch.open_containing(directory)[0]
651
670
stored_loc = br_from.get_push_location()
652
671
if location is None:
653
672
if stored_loc is None:
2351
2370
default, use --remember. The value will only be saved if the remote
2352
2371
location can be accessed.
2373
The results of the merge are placed into the destination working
2374
directory, where they can be reviewed (with bzr diff), tested, and then
2375
committed to record the result of the merge.
2356
2379
To merge the latest revision from bzr.dev
2370
2393
takes_args = ['branch?']
2371
2394
takes_options = ['revision', 'force', 'merge-type', 'reprocess', 'remember',
2372
Option('show-base', help="Show base revision text in "
2374
Option('uncommitted', help='Apply uncommitted changes'
2375
' from a working copy, instead of branch changes'),
2376
Option('pull', help='If the destination is already'
2377
' completely merged into the source, pull from the'
2378
' source rather than merging. When this happens,'
2379
' you do not need to commit the result.'),
2395
Option('show-base', help="Show base revision text in "
2397
Option('uncommitted', help='Apply uncommitted changes'
2398
' from a working copy, instead of branch changes'),
2399
Option('pull', help='If the destination is already'
2400
' completely merged into the source, pull from the'
2401
' source rather than merging. When this happens,'
2402
' you do not need to commit the result.'),
2404
help='branch to merge into, '
2405
'rather than the one containing the working directory',
2382
2411
def run(self, branch=None, revision=None, force=False, merge_type=None,
2383
show_base=False, reprocess=False, remember=False,
2384
uncommitted=False, pull=False):
2412
show_base=False, reprocess=False, remember=False,
2413
uncommitted=False, pull=False,
2385
2416
if merge_type is None:
2386
2417
merge_type = _mod_merge.Merge3Merger
2388
tree = WorkingTree.open_containing(u'.')[0]
2418
if directory is None: directory = u'.'
2419
tree = WorkingTree.open_containing(directory)[0]
2390
2421
if branch is not None: