/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2017-06-04 21:47:02 UTC
  • mfrom: (6651.3.3 fetch-ghosts)
  • Revision ID: breezy.the.bot@gmail.com-20170604214702-cnj4p7zkng8l952g
Import the 'fetch-ghosts' command from bzrtools.

Merged from https://code.launchpad.net/~jelmer/brz/fetch-ghosts/+merge/325031

Show diffs side-by-side

added added

removed removed

Lines of Context:
6711
6711
        do_import(source, tree)
6712
6712
 
6713
6713
 
 
6714
class cmd_fetch_ghosts(Command):
 
6715
    __doc__ = """Attempt to retrieve ghosts from another branch.
 
6716
 
 
6717
    If the other branch is not supplied, the last-pulled branch is used.
 
6718
    """
 
6719
 
 
6720
    hidden = True
 
6721
    aliases = ['fetch-missing']
 
6722
    takes_args = ['branch?']
 
6723
    takes_options = [Option('no-fix', help="Skip additional synchonization.")]
 
6724
 
 
6725
    def run(self, branch=None, no_fix=False):
 
6726
        from .fetch_ghosts import GhostFetcher
 
6727
        installed, failed = GhostFetcher.from_cmdline(branch).run()
 
6728
        if len(installed) > 0:
 
6729
            self.outf.write("Installed:\n")
 
6730
            for rev in installed:
 
6731
                self.outf.write(rev + "\n")
 
6732
        if len(failed) > 0:
 
6733
            self.outf.write("Still missing:\n")
 
6734
            for rev in failed:
 
6735
                self.outf.write(rev + "\n")
 
6736
        if not no_fix and len(installed) > 0:
 
6737
            cmd_reconcile().run(".")
 
6738
 
 
6739
 
6714
6740
def _register_lazy_builtins():
6715
6741
    # register lazy builtins from other modules; called at startup and should
6716
6742
    # be only called once.