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

  • Committer: Vincent Ladeuil
  • Date: 2019-03-06 14:03:19 UTC
  • mfrom: (7290.1.15 work)
  • mto: This revision was merged to the branch mainline in revision 7295.
  • Revision ID: v.ladeuil+brz@free.fr-20190306140319-zgjegynpjv3vv0jg
Merge 3.0 into trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
348
348
        Not versioned and not matching an ignore pattern.
349
349
 
350
350
    Additionally for directories, symlinks and files with a changed
351
 
    executable bit, Bazaar indicates their type using a trailing
 
351
    executable bit, Breezy indicates their type using a trailing
352
352
    character: '/', '@' or '*' respectively. These decorations can be
353
353
    disabled using the '--no-classify' option.
354
354
 
454
454
 
455
455
        b = controldir.ControlDir.open_containing_tree_or_branch(directory)[1]
456
456
 
457
 
        revisions = b.repository.revisions
 
457
        revisions = getattr(b.repository, "revisions", None)
458
458
        if revisions is None:
459
459
            raise errors.BzrCommandError(
460
460
                gettext('Repository %r does not support '
461
 
                        'access to raw revision texts'))
 
461
                        'access to raw revision texts') % b.repository)
462
462
 
463
463
        with b.repository.lock_read():
464
464
            # TODO: jam 20060112 should cat-revision always output utf-8?
1344
1344
            use_existing_dir=False, directory=None, stacked_on=None,
1345
1345
            stacked=False, strict=None, no_tree=False,
1346
1346
            overwrite_tags=False, lossy=False):
 
1347
        from .location import location_to_url
1347
1348
        from .push import _show_push_branch
1348
1349
 
1349
1350
        if overwrite:
1371
1372
                more_warning='Uncommitted changes will not be pushed.')
1372
1373
        # Get the stacked_on branch, if any
1373
1374
        if stacked_on is not None:
 
1375
            stacked_on = location_to_url(stacked_on, 'read')
1374
1376
            stacked_on = urlutils.normalize_url(stacked_on)
1375
1377
        elif stacked:
1376
1378
            parent_url = br_from.get_parent()
1728
1730
    If the tree's branch is bound to a master branch, brz will also update
1729
1731
    the branch from the master.
1730
1732
 
1731
 
    You cannot update just a single file or directory, because each Bazaar
 
1733
    You cannot update just a single file or directory, because each Breezy
1732
1734
    working tree has just a single basis revision.  If you want to restore a
1733
1735
    file that has been removed locally, use 'brz revert' instead of 'brz
1734
1736
    update'.  If you want to restore a file to its state in a previous
1871
1873
class cmd_remove(Command):
1872
1874
    __doc__ = """Remove files or directories.
1873
1875
 
1874
 
    This makes Bazaar stop tracking changes to the specified files. Bazaar will
 
1876
    This makes Breezy stop tracking changes to the specified files. Breezy will
1875
1877
    delete them if they can easily be recovered using revert otherwise they
1876
1878
    will be backed up (adding an extension of the form .~#~). If no options or
1877
 
    parameters are given Bazaar will scan for files that are being tracked by
1878
 
    Bazaar but missing in your tree and stop tracking them for you.
 
1879
    parameters are given Breezy will scan for files that are being tracked by
 
1880
    Breezy but missing in your tree and stop tracking them for you.
1879
1881
    """
1880
1882
    takes_args = ['file*']
1881
1883
    takes_options = ['verbose',
3091
3093
    using this command or directly by using an editor, be sure to commit
3092
3094
    it.
3093
3095
 
3094
 
    Bazaar also supports a global ignore file ~/.bazaar/ignore. On Windows
3095
 
    the global ignore file can be found in the application data directory as
3096
 
    C:\\Documents and Settings\\<user>\\Application Data\\Bazaar\\2.0\\ignore.
 
3096
    Breezy also supports a global ignore file ~/.config/breezy/ignore. On
 
3097
    Windows the global ignore file can be found in the application data
 
3098
    directory as
 
3099
    C:\\Documents and Settings\\<user>\\Application Data\\Breezy\\3.0\\ignore.
3097
3100
    Global ignores are not touched by this command. The global ignore file
3098
3101
    can be edited directly using an editor.
3099
3102
 
3732
3735
    unreferenced ancestors
3733
3736
        Texts that are ancestors of other texts, but
3734
3737
        are not properly referenced by the revision ancestry.  This is a
3735
 
        subtle problem that Bazaar can work around.
 
3738
        subtle problem that Breezy can work around.
3736
3739
 
3737
3740
    unique file texts
3738
3741
        This is the total number of unique file contents
3744
3747
        entries are modified, but the file contents are not.  It does not
3745
3748
        indicate a problem.
3746
3749
 
3747
 
    If no restrictions are specified, all Bazaar data that is found at the given
 
3750
    If no restrictions are specified, all data that is found at the given
3748
3751
    location will be checked.
3749
3752
 
3750
3753
    :Examples:
3786
3789
    __doc__ = """Upgrade a repository, branch or working tree to a newer format.
3787
3790
 
3788
3791
    When the default format has changed after a major new release of
3789
 
    Bazaar, you may be informed during certain operations that you
 
3792
    Bazaar/Breezy, you may be informed during certain operations that you
3790
3793
    should upgrade. Upgrading to a newer format may improve performance
3791
3794
    or make new features available. It may however limit interoperability
3792
 
    with older repositories or with older versions of Bazaar.
 
3795
    with older repositories or with older versions of Bazaar or Breezy.
3793
3796
 
3794
3797
    If you wish to upgrade to a particular format rather than the
3795
3798
    current default, that can be specified using the --format option.
3811
3814
    If the conversion of a branch fails, remaining branches are still
3812
3815
    tried.
3813
3816
 
3814
 
    For more information on upgrades, see the Bazaar Upgrade Guide,
 
3817
    For more information on upgrades, see the Breezy Upgrade Guide,
3815
3818
    https://www.breezy-vcs.org/doc/en/upgrade-guide/.
3816
3819
    """
3817
3820
 
4312
4315
    through OTHER, excluding BASE but including OTHER, will be merged.  If this
4313
4316
    causes some revisions to be skipped, i.e. if the destination branch does
4314
4317
    not already contain revision BASE, such a merge is commonly referred to as
4315
 
    a "cherrypick". Unlike a normal merge, Bazaar does not currently track
 
4318
    a "cherrypick". Unlike a normal merge, Breezy does not currently track
4316
4319
    cherrypicks. The changes look like a normal commit, and the history of the
4317
4320
    changes from the other branch is not stored in the commit.
4318
4321
 
5133
5136
 
5134
5137
    --verbose shows the path where each plugin is located.
5135
5138
 
5136
 
    A plugin is an external component for Bazaar that extends the
5137
 
    revision control system, by adding or replacing code in Bazaar.
 
5139
    A plugin is an external component for Breezy that extends the
 
5140
    revision control system, by adding or replacing code in Breezy.
5138
5141
    Plugins can do a variety of things, including overriding commands,
5139
5142
    adding new commands, providing additional network transports and
5140
5143
    customizing log output.
5420
5423
        else:
5421
5424
            self.add_cleanup(b.lock_write().unlock)
5422
5425
        return self._run(b, tree, dry_run, verbose, revision, force,
5423
 
                         local, keep_tags)
 
5426
                         local, keep_tags, location)
5424
5427
 
5425
5428
    def _run(self, b, tree, dry_run, verbose, revision, force, local,
5426
 
             keep_tags):
 
5429
             keep_tags, location):
5427
5430
        from .log import log_formatter, show_log
5428
5431
        from .uncommit import uncommit
5429
5432
 
5477
5480
               last_rev_id, rev_id)
5478
5481
        uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,
5479
5482
                 revno=revno, local=local, keep_tags=keep_tags)
5480
 
        self.outf.write(
5481
 
            gettext('You can restore the old tip by running:\n'
5482
 
                    '  brz pull . -r revid:%s\n')
5483
 
            % last_rev_id.decode('utf-8'))
 
5483
        if location != '.':
 
5484
            self.outf.write(
 
5485
                gettext('You can restore the old tip by running:\n'
 
5486
                        '  brz pull -d %s %s -r revid:%s\n')
 
5487
                % (location, location, last_rev_id.decode('utf-8')))
 
5488
        else:
 
5489
            self.outf.write(
 
5490
                gettext('You can restore the old tip by running:\n'
 
5491
                        '  brz pull . -r revid:%s\n')
 
5492
                % last_rev_id.decode('utf-8'))
5484
5493
 
5485
5494
 
5486
5495
class cmd_break_lock(Command):
5498
5507
    :Examples:
5499
5508
        brz break-lock
5500
5509
        brz break-lock brz+ssh://example.com/brz/foo
5501
 
        brz break-lock --conf ~/.bazaar
 
5510
        brz break-lock --conf ~/.config/breezy
5502
5511
    """
5503
5512
 
5504
5513
    takes_args = ['location?']
5789
5798
    branch containing submit_branch in its ancestory without needing access to
5790
5799
    the source branch.
5791
5800
 
5792
 
    If --no-bundle is specified, then Bazaar doesn't send the contents of the
 
5801
    If --no-bundle is specified, then Breezy doesn't send the contents of the
5793
5802
    revisions, but only a structured request to merge from the
5794
5803
    public_location.  In that case the public_branch is needed and it must be
5795
5804
    up-to-date and accessible to the recipient.  The public_branch is always