/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/builtins.py

  • Committer: Vincent Ladeuil
  • Date: 2011-05-31 21:08:52 UTC
  • mfrom: (5743.12.19 config-options)
  • mto: This revision was merged to the branch mainline in revision 5945.
  • Revision ID: v.ladeuil+lp@free.fr-20110531210852-0uyfsjkws5zbfs8m
Merge trunk resolving conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
    rename_map,
45
45
    revision as _mod_revision,
46
46
    static_tuple,
47
 
    symbol_versioning,
48
47
    timestamp,
49
48
    transport,
50
49
    ui,
72
71
    _parse_revision_str,
73
72
    )
74
73
from bzrlib.trace import mutter, note, warning, is_quiet, get_verbosity_level
 
74
from bzrlib import (
 
75
    symbol_versioning,
 
76
    )
75
77
 
76
78
 
77
79
@symbol_versioning.deprecated_function(symbol_versioning.deprecated_in((2, 3, 0)))
3646
3648
        if typestring == "sftp":
3647
3649
            from bzrlib.tests import stub_sftp
3648
3650
            return stub_sftp.SFTPAbsoluteServer
3649
 
        if typestring == "memory":
 
3651
        elif typestring == "memory":
3650
3652
            from bzrlib.tests import test_server
3651
3653
            return memory.MemoryServer
3652
 
        if typestring == "fakenfs":
 
3654
        elif typestring == "fakenfs":
3653
3655
            from bzrlib.tests import test_server
3654
3656
            return test_server.FakeNFSServer
3655
3657
        msg = "No known transport type %s. Supported types are: sftp\n" %\
3689
3691
                     Option('randomize', type=str, argname="SEED",
3690
3692
                            help='Randomize the order of tests using the given'
3691
3693
                                 ' seed or "now" for the current time.'),
3692
 
                     Option('exclude', type=str, argname="PATTERN",
3693
 
                            short_name='x',
3694
 
                            help='Exclude tests that match this regular'
3695
 
                                 ' expression.'),
 
3694
                     ListOption('exclude', type=str, argname="PATTERN",
 
3695
                                short_name='x',
 
3696
                                help='Exclude tests that match this regular'
 
3697
                                ' expression.'),
3696
3698
                     Option('subunit',
3697
3699
                        help='Output test progress via subunit.'),
3698
3700
                     Option('strict', help='Fail on missing dependencies or '
3749
3751
                "--benchmark is no longer supported from bzr 2.2; "
3750
3752
                "use bzr-usertest instead")
3751
3753
        test_suite_factory = None
 
3754
        if not exclude:
 
3755
            exclude_pattern = None
 
3756
        else:
 
3757
            exclude_pattern = '(' + '|'.join(exclude) + ')'
3752
3758
        selftest_kwargs = {"verbose": verbose,
3753
3759
                          "pattern": pattern,
3754
3760
                          "stop_on_failure": one,
3759
3765
                          "matching_tests_first": first,
3760
3766
                          "list_only": list_only,
3761
3767
                          "random_seed": randomize,
3762
 
                          "exclude_pattern": exclude,
 
3768
                          "exclude_pattern": exclude_pattern,
3763
3769
                          "strict": strict,
3764
3770
                          "load_list": load_list,
3765
3771
                          "debug_flags": debugflag,
3834
3840
    The source of the merge can be specified either in the form of a branch,
3835
3841
    or in the form of a path to a file containing a merge directive generated
3836
3842
    with bzr send. If neither is specified, the default is the upstream branch
3837
 
    or the branch most recently merged using --remember.
 
3843
    or the branch most recently merged using --remember.  The source of the
 
3844
    merge may also be specified in the form of a path to a file in another
 
3845
    branch:  in this case, only the modifications to that file are merged into
 
3846
    the current working tree.
3838
3847
 
3839
3848
    When merging from a branch, by default bzr will try to merge in all new
3840
3849
    work from the other branch, automatically determining an appropriate base
4004
4013
        self.sanity_check_merger(merger)
4005
4014
        if (merger.base_rev_id == merger.other_rev_id and
4006
4015
            merger.other_rev_id is not None):
 
4016
            # check if location is a nonexistent file (and not a branch) to
 
4017
            # disambiguate the 'Nothing to do'
 
4018
            if merger.interesting_files:
 
4019
                if not merger.other_tree.has_filename(
 
4020
                    merger.interesting_files[0]):
 
4021
                    note("merger: " + str(merger))
 
4022
                    raise errors.PathsDoNotExist([location])
4007
4023
            note('Nothing to do.')
4008
4024
            return 0
4009
4025
        if pull and not preview:
4952
4968
 
4953
4969
        if not force:
4954
4970
            if not ui.ui_factory.confirm_action(
4955
 
                    'Uncommit these revisions',
 
4971
                    u'Uncommit these revisions',
4956
4972
                    'bzrlib.builtins.uncommit',
4957
4973
                    {}):
4958
4974
                self.outf.write('Canceled\n')
5636
5652
            unstacked=None):
5637
5653
        directory = bzrdir.BzrDir.open(location)
5638
5654
        if stacked_on and unstacked:
5639
 
            raise BzrCommandError("Can't use both --stacked-on and --unstacked")
 
5655
            raise errors.BzrCommandError("Can't use both --stacked-on and --unstacked")
5640
5656
        elif stacked_on is not None:
5641
5657
            reconfigure.ReconfigureStackedOn().apply(directory, stacked_on)
5642
5658
        elif unstacked: