~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

MergeĀ fromĀ jam-integration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
792
792
        if revision is not None:
793
793
            if b2 is not None:
794
794
                raise BzrCommandError("Can't specify -r with two branches")
795
 
            if len(revision) == 1:
 
795
            if (len(revision) == 1) or (revision[1].spec is None):
796
796
                return show_diff(tree.branch, revision[0], specific_files=file_list,
797
797
                                 external_diff_options=diff_options)
798
798
            elif len(revision) == 2:
1971
1971
    
1972
1972
    In the future, uncommit will create a changeset, which can then
1973
1973
    be re-applied.
 
1974
 
 
1975
    TODO: jam 20060108 Add an option to allow uncommit to remove unreferenced
 
1976
              information in 'branch-as-repostory' branches.
 
1977
    TODO: jam 20060108 Add the ability for uncommit to remove unreferenced
 
1978
              information in shared branches as well.
1974
1979
    """
1975
 
    takes_options = ['all', 'verbose', 'revision',
 
1980
    takes_options = ['verbose', 'revision',
1976
1981
                    Option('dry-run', help='Don\'t actually make changes'),
1977
1982
                    Option('force', help='Say yes to all questions.')]
1978
1983
    takes_args = ['location?']
1979
1984
    aliases = []
1980
1985
 
1981
 
    def run(self, location=None, all=False,
 
1986
    def run(self, location=None, 
1982
1987
            dry_run=False, verbose=False,
1983
1988
            revision=None, force=False):
1984
1989
        from bzrlib.branch import Branch
2015
2020
                    print 'Canceled'
2016
2021
                    return 0
2017
2022
 
2018
 
        uncommit(b, remove_files=all,
2019
 
                dry_run=dry_run, verbose=verbose,
 
2023
        uncommit(b, dry_run=dry_run, verbose=verbose,
2020
2024
                revno=revno)
2021
2025
 
2022
2026