/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: Martin Pool
  • Date: 2007-10-08 07:29:57 UTC
  • mfrom: (2894 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2895.
  • Revision ID: mbp@sourcefrog.net-20071008072957-uhm1gl1mqcsdc377
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib.lazy_import import lazy_import
23
23
lazy_import(globals(), """
24
24
import codecs
25
 
import errno
26
25
import sys
27
 
import tempfile
28
26
import time
29
27
 
30
28
import bzrlib
31
29
from bzrlib import (
32
 
    branch,
33
30
    bugtracker,
34
31
    bundle,
35
32
    bzrdir,
43
40
    merge_directive,
44
41
    osutils,
45
42
    reconfigure,
46
 
    registry,
47
 
    repository,
48
43
    revision as _mod_revision,
49
 
    revisionspec,
50
44
    symbol_versioning,
51
45
    transport,
52
46
    tree as _mod_tree,
62
56
 
63
57
from bzrlib.commands import Command, display_command
64
58
from bzrlib.option import ListOption, Option, RegistryOption, custom_help
65
 
from bzrlib.progress import DummyProgress, ProgressPhase
66
 
from bzrlib.trace import mutter, note, log_error, warning, is_quiet, info
 
59
from bzrlib.trace import mutter, note, warning, is_quiet, info
67
60
 
68
61
 
69
62
def tree_files(file_list, default_branch=u'.'):
604
597
            tree_to = None
605
598
            branch_to = Branch.open_containing(directory)[0]
606
599
 
 
600
        possible_transports = []
607
601
        if location is not None:
608
602
            mergeable, location_transport = _get_mergeable_helper(location)
 
603
            possible_transports.append(location_transport)
609
604
 
610
605
        stored_loc = branch_to.get_parent()
611
606
        if location is None:
617
612
                        self.outf.encoding)
618
613
                self.outf.write("Using saved location: %s\n" % display_url)
619
614
                location = stored_loc
620
 
                location_transport = transport.get_transport(location)
 
615
                location_transport = transport.get_transport(
 
616
                    location, possible_transports=possible_transports)
621
617
 
622
618
        if mergeable is not None:
623
619
            if revision is not None:
643
639
        if verbose:
644
640
            old_rh = branch_to.revision_history()
645
641
        if tree_to is not None:
 
642
            change_reporter = delta._ChangeReporter(
 
643
                unversioned_filter=tree_to.is_ignored)
646
644
            result = tree_to.pull(branch_from, overwrite, revision_id,
647
 
                delta._ChangeReporter(unversioned_filter=tree_to.is_ignored))
 
645
                                  change_reporter,
 
646
                                  possible_transports=possible_transports)
648
647
        else:
649
648
            result = branch_to.pull(branch_from, overwrite, revision_id)
650
649
 
2253
2252
    def run(self, message=None, file=None, verbose=False, selected_list=None,
2254
2253
            unchanged=False, strict=False, local=False, fixes=None,
2255
2254
            author=None, show_diff=False):
2256
 
        from bzrlib.commit import (
2257
 
            NullCommitReporter,
2258
 
            ReportCommitToLog
2259
 
        )
2260
2255
        from bzrlib.errors import (
2261
2256
            PointlessCommit,
2262
2257
            ConflictsInTree,
2282
2277
            # selected-file merge commit is not done yet
2283
2278
            selected_list = []
2284
2279
 
 
2280
        if fixes is None:
 
2281
            fixes = []
2285
2282
        bug_property = self._get_bug_fix_properties(fixes, tree.branch)
2286
2283
        if bug_property:
2287
2284
            properties['bugs'] = bug_property
2637
2634
    
2638
2635
    @display_command
2639
2636
    def run(self, branch, other):
2640
 
        from bzrlib.revision import ensure_null, MultipleRevisionSources
 
2637
        from bzrlib.revision import ensure_null
2641
2638
        
2642
2639
        branch1 = Branch.open_containing(branch)[0]
2643
2640
        branch2 = Branch.open_containing(other)[0]
2700
2697
    _see_also = ['update', 'remerge', 'status-flags']
2701
2698
    takes_args = ['branch?']
2702
2699
    takes_options = [
 
2700
        'change',
2703
2701
        'revision',
2704
2702
        Option('force',
2705
2703
               help='Merge even if the destination tree has uncommitted changes.'),
2727
2725
            uncommitted=False, pull=False,
2728
2726
            directory=None,
2729
2727
            ):
2730
 
        from bzrlib.tag import _merge_tags_if_possible
2731
2728
        # This is actually a branch (or merge-directive) *location*.
2732
2729
        location = branch
2733
2730
        del branch
2788
2785
                return 0
2789
2786
            if pull:
2790
2787
                if merger.interesting_files is not None:
2791
 
                    raise BzrCommandError('Cannot pull individual files')
 
2788
                    raise errors.BzrCommandError('Cannot pull individual files')
2792
2789
                if (merger.base_rev_id == tree.last_revision()):
2793
2790
                    result = tree.pull(merger.other_branch, False,
2794
2791
                                       merger.other_rev_id)
3164
3161
            theirs_only=False, log_format=None, long=False, short=False, line=False, 
3165
3162
            show_ids=False, verbose=False, this=False, other=False):
3166
3163
        from bzrlib.missing import find_unmerged, iter_log_revisions
3167
 
        from bzrlib.log import log_formatter
3168
3164
 
3169
3165
        if this:
3170
3166
          mine_only = this
3479
3475
            dry_run=False, verbose=False,
3480
3476
            revision=None, force=False):
3481
3477
        from bzrlib.log import log_formatter, show_log
3482
 
        import sys
3483
3478
        from bzrlib.uncommit import uncommit
3484
3479
 
3485
3480
        if location is None:
3905
3900
 
3906
3901
    def _run(self, submit_branch, revision, public_branch, remember, format,
3907
3902
             no_bundle, no_patch, output, from_, mail_to, message):
3908
 
        from bzrlib.revision import ensure_null, NULL_REVISION
 
3903
        from bzrlib.revision import NULL_REVISION
3909
3904
        if output is None:
3910
3905
            outfile = StringIO()
3911
3906
        elif output == '-':