- Revision
- 15318
- Author
- vajda
- Date
- 2007-09-11 16:57:42 -0700 (Tue, 11 Sep 2007)
Log Message
- bug 10726 (r=jeffrey) --undo command line arg change
(http://bugzilla.osafoundation.org/show_bug.cgi?id=10726)
(http://bugzilla.osafoundation.org/show_bug.cgi?id=10726)
Modified Paths
Diff
Modified: trunk/chandler/application/Utility.py (15317 => 15318)
--- trunk/chandler/application/Utility.py 2007-09-11 23:54:11 UTC (rev 15317) +++ trunk/chandler/application/Utility.py 2007-09-11 23:57:42 UTC (rev 15318) @@ -253,7 +253,7 @@ 'indexer': ('-i', '--indexer', 's', '90', None, 'Run Lucene indexing in the background every 90s, in the foreground or none'), 'checkpoints': ('', '--checkpoints', 's', '10', None, 'Checkpoint the repository in the background every 10min, or none'), 'uuids': ('-U', '--uuids', 's', None, None, 'use a file containing a bunch of pre-generated UUIDs'), - 'undo': ('', '--undo', 's', None, None, 'undo <n> versions or until <check> or <repair> pass or until <start> succeeds'), + 'undo': ('', '--undo', 's', None, None, 'undo -<n> versions or until version <n> or until <check> or <repair> pass or until <start> succeeds'), 'backup': ('', '--backup', 'b', False, None, 'backup repository before start'), 'backupDir': ('', '--backup-dir', 's', None, None, 'backup repository before start into dir'), 'repair': ('', '--repair', 'b', False, None, 'repair repository before start (currently repairs broken indices)'), @@ -664,8 +664,10 @@ version = repository.store.getVersion() if options.undo == 'start': nVersions = 1 + elif options.undo.startswith('-'): + nVersions = -long(options.undo) else: - nVersions = long(options.undo) + nVersions = version - long(options.undo) if version > nVersions: version -= nVersions repository.undo(version)
_______________________________________________ Commits mailing list [email protected] http://lists.osafoundation.org/mailman/listinfo/commits
