~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-06-11 01:52:47 UTC
  • Revision ID: mbp@sourcefrog.net-20050611015247-bb9c42191cfb743b
- check command now also checks new inventory_sha1 and 
 precursor_sha1 
- check has --update option to fix these if they're missing
  patch from John A Meinel

Show diffs side-by-side

added added

removed removed

Lines of Context:
1097
1097
 
1098
1098
    This command checks various invariants about the branch storage to
1099
1099
    detect data corruption or bzr bugs.
 
1100
 
 
1101
    If given the --update flag, it will update some optional fields
 
1102
    to help ensure data consistency.
1100
1103
    """
1101
1104
    takes_args = ['dir?']
1102
 
    def run(self, dir='.'):
 
1105
    takes_options = ['update']
 
1106
 
 
1107
    def run(self, dir='.', update=False):
1103
1108
        import bzrlib.check
1104
 
        bzrlib.check.check(Branch(dir))
 
1109
        bzrlib.check.check(Branch(dir), update=update)
1105
1110
 
1106
1111
 
1107
1112
 
1278
1283
    'verbose':                None,
1279
1284
    'version':                None,
1280
1285
    'email':                  None,
 
1286
    'update':                 None,
1281
1287
    }
1282
1288
 
1283
1289
SHORT_OPTIONS = {