From 67c8c3f3942088f58b319ecae84f0d0821e7dce0 Mon Sep 17 00:00:00 2001 From: Markus Unterwaditzer Date: Sun, 26 Jul 2015 14:39:38 +0200 Subject: [PATCH] Improve UI of repair command --- vdirsyncer/cli/__init__.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/vdirsyncer/cli/__init__.py b/vdirsyncer/cli/__init__.py index fd0c6b3..7a03927 100644 --- a/vdirsyncer/cli/__init__.py +++ b/vdirsyncer/cli/__init__.py @@ -202,14 +202,21 @@ def repair(collection): ''' Repair a given collection. - Downloads all items and repairs some properties if necessary. Currently - this only fixes absent or duplicate UIDs. + Runs a few checks on the collection and applies some fixes to individual + items that may improve general stability, also with other CalDAV/CardDAV + clients. In particular, if you encounter URL-encoding-related issues with + other clients, this command might help. Example: `vdirsyncer repair calendars_local/foo` repairs the `foo` collection of the `calendars_local` storage. ''' from .tasks import repair_collection general, all_pairs, all_storages = ctx.obj['config'] + + cli_logger.warning('This operation will take a very long time.') + cli_logger.warning('It\'s recommended to turn off other client\'s ' + 'synchronization features.') + click.confirm('Do you want to continue?', abort=True) repair_collection(general, all_pairs, all_storages, collection) # Not sure if useful. I originally wanted it because: