~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2005-09-12 01:29:49 UTC
  • mto: (1092.2.12) (974.1.76) (1185.8.2)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050912012949-73a539d3f2542173
- patch from mpe to automatically add parent directories

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
    directory is shown.  Otherwise, only the status of the specified
63
63
    files or directories is reported.  If a directory is given, status
64
64
    is reported for everything inside that directory.
 
65
    """
65
66
 
66
 
    If a revision is specified, the changes since that revision are shown.
67
 
    """
68
67
    takes_args = ['file*']
69
 
    takes_options = ['all', 'show-ids', 'revision']
 
68
    takes_options = ['all', 'show-ids']
70
69
    aliases = ['st', 'stat']
71
70
    
72
71
    def run(self, all=False, show_ids=False, file_list=None):
145
144
    Therefore simply saying 'bzr add' will version all files that
146
145
    are currently unknown.
147
146
 
148
 
    TODO: Perhaps adding a file whose directly is not versioned should
149
 
    recursively add that parent, rather than giving an error?
 
147
    Adding a file whose parent directory is not versioned will
 
148
    implicitly add the parent, and so on up to the root. This means
 
149
    you should never need to explictly add a directory, they'll just
 
150
    get added when you add a file in the directory.
150
151
    """
151
152
    takes_args = ['file*']
152
153
    takes_options = ['verbose', 'no-recurse']
484
485
            print patchid
485
486
 
486
487
 
487
 
class cmd_ancestry(Command):
488
 
    """List all revisions merged into this branch."""
489
 
    hidden = True
490
 
    def run(self):
491
 
        b = find_branch('.')
492
 
        for revision_id in b.get_ancestry(b.last_patch()):
493
 
            print revision_id
494
 
 
495
 
 
496
488
class cmd_directories(Command):
497
489
    """Display list of versioned directories in this branch."""
498
490
    def run(self):
545
537
    examples:
546
538
        bzr diff
547
539
        bzr diff -r1
548
 
        bzr diff -r1:2
 
540
        bzr diff -r1..2
549
541
    """
550
542
    
551
543
    takes_args = ['file*']
955
947
    aliases = ['ci', 'checkin']
956
948
 
957
949
    # TODO: Give better message for -s, --summary, used by tla people
958
 
 
959
 
    # XXX: verbose currently does nothing
960
950
    
961
951
    def run(self, message=None, file=None, verbose=True, selected_list=None,
962
952
            unchanged=False):
986
976
            message = codecs.open(file, 'rt', bzrlib.user_encoding).read()
987
977
 
988
978
        try:
989
 
            b.commit(message,
 
979
            b.commit(message, verbose=verbose,
990
980
                     specific_files=selected_list,
991
981
                     allow_pointless=unchanged)
992
982
        except PointlessCommit: