]> git.ipfire.org Git - thirdparty/snapper.git/commitdiff
- make rollback command print verbose messages
authorArvin Schnell <aschnell@suse.de>
Mon, 30 Jun 2014 13:45:11 +0000 (15:45 +0200)
committerArvin Schnell <aschnell@suse.de>
Mon, 30 Jun 2014 13:45:11 +0000 (15:45 +0200)
client/snapper.cc
package/snapper.changes

index 4ce27a1a1b17f05579d21d4f3ef08e7249ed2860..0f387962d0b1b3693f77bed52d5154a34d01cc11 100644 (file)
@@ -1274,22 +1274,42 @@ command_rollback(DBus::Connection* conn, Snapper* snapper)
 
     if (getopts.numArgs() == 0)
     {
-       command_create_single_xsnapshot_of_default(*conn, config_name, true, description, cleanup,
-                                                  userdata);
-
+       if (!quiet)
+           cout << _("Creating read-only snapshot of default subvolume.") << flush;
+       unsigned int num1 = command_create_single_xsnapshot_of_default(*conn, config_name, true,
+                                                                      description, cleanup,
+                                                                      userdata);
+       if (!quiet)
+           cout << " " << sformat(_("(Snapshot %d.)"), num1) << endl;
+
+       if (!quiet)
+           cout << _("Creating read-write snapshot of current subvolume.") <<flush;
        num2 = command_create_single_xsnapshot_v2(*conn, config_name, 0, false, description,
                                                  cleanup, userdata);
+       if (!quiet)
+           cout << " " << sformat(_("(Snapshot %d.)"), num2) << endl;
     }
     else
     {
        unsigned int tmp = read_num(getopts.popArg());
 
-       command_create_single_xsnapshot(*conn, config_name, description, cleanup, userdata);
+       if (!quiet)
+           cout << _("Creating read-only snapshot of current system.") << flush;
+       unsigned int num1 = command_create_single_xsnapshot(*conn, config_name, description,
+                                                           cleanup, userdata);
+       if (!quiet)
+           cout << " " << sformat(_("(Snapshot %d.)"), num1) << endl;
 
+       if (!quiet)
+           cout << sformat(_("Creating read-write snapshot of %d."), tmp) << flush;
        num2 = command_create_single_xsnapshot_v2(*conn, config_name, tmp, false,
                                                  description, cleanup, userdata);
+       if (!quiet)
+           cout << " " << sformat(_("(Snapshot %d.)"), num2) << endl;
     }
 
+    if (!quiet)
+       cout << sformat(_("Setting default subvolume to snapshot %d."), num2) << endl;
     filesystem->setDefault(num2);
 
     if (print_number)
index e46339b4eb18e78f5d00d6fc1af393d34123a907..50e59403d6627fc2dfe251502e6b40a7cc933a51 100644 (file)
@@ -1,3 +1,8 @@
+-------------------------------------------------------------------
+Mon Jun 30 15:43:56 CEST 2014 - aschnell@suse.de
+
+- make rollback command print verbose messages
+
 -------------------------------------------------------------------
 Mon Jun 30 14:44:25 CEST 2014 - aschnell@suse.de