/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: Robert Collins
  • Date: 2008-03-25 04:00:51 UTC
  • mfrom: (3302 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3306.
  • Revision ID: robertc@robertcollins.net-20080325040051-fz86q4klex5dngfi
Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2666
2666
            print '   %s (%s python%s)' % (
2667
2667
                    bzrlib.__path__[0],
2668
2668
                    bzrlib.version_string,
2669
 
                    '.'.join(map(str, sys.version_info)),
 
2669
                    bzrlib._format_version_tuple(sys.version_info),
2670
2670
                    )
2671
2671
        print
2672
2672
        if testspecs_list is not None:
3657
3657
    _see_also = ['commit']
3658
3658
    takes_options = ['verbose', 'revision',
3659
3659
                    Option('dry-run', help='Don\'t actually make changes.'),
3660
 
                    Option('force', help='Say yes to all questions.')]
 
3660
                    Option('force', help='Say yes to all questions.'),
 
3661
                    Option('local',
 
3662
                           help="Only remove the commits from the local branch"
 
3663
                                " when in a checkout."
 
3664
                           ),
 
3665
                    ]
3661
3666
    takes_args = ['location?']
3662
3667
    aliases = []
3663
3668
    encoding_type = 'replace'
3664
3669
 
3665
3670
    def run(self, location=None,
3666
3671
            dry_run=False, verbose=False,
3667
 
            revision=None, force=False):
 
3672
            revision=None, force=False, local=False):
3668
3673
        if location is None:
3669
3674
            location = u'.'
3670
3675
        control, relpath = bzrdir.BzrDir.open_containing(location)
3680
3685
        else:
3681
3686
            b.lock_write()
3682
3687
        try:
3683
 
            return self._run(b, tree, dry_run, verbose, revision, force)
 
3688
            return self._run(b, tree, dry_run, verbose, revision, force,
 
3689
                             local=local)
3684
3690
        finally:
3685
3691
            if tree is not None:
3686
3692
                tree.unlock()
3687
3693
            else:
3688
3694
                b.unlock()
3689
3695
 
3690
 
    def _run(self, b, tree, dry_run, verbose, revision, force):
 
3696
    def _run(self, b, tree, dry_run, verbose, revision, force, local=False):
3691
3697
        from bzrlib.log import log_formatter, show_log
3692
3698
        from bzrlib.uncommit import uncommit
3693
3699
 
3735
3741
                    return 0
3736
3742
 
3737
3743
        uncommit(b, tree=tree, dry_run=dry_run, verbose=verbose,
3738
 
                 revno=revno)
 
3744
                 revno=revno, local=local)
3739
3745
 
3740
3746
 
3741
3747
class cmd_break_lock(Command):