瀏覽代碼

Remove "--really" option from prune. It's was a bit silly

Jonas Borgström 13 年之前
父節點
當前提交
b755a4f2b9
共有 2 個文件被更改,包括 2 次插入14 次删除
  1. 2 10
      darc/archiver.py
  2. 0 4
      darc/test.py

+ 2 - 10
darc/archiver.py

@@ -284,13 +284,8 @@ class Archiver(object):
         for archive in keep:
             self.print_verbose('Keeping archive "%s"' % archive.name)
         for archive in to_delete:
-            if args.really:
-                self.print_verbose('Purging archive "%s"', archive.name)
-                archive.delete(cache)
-            else:
-                print ('Archive "%s" marked for deletion. '
-                       'Use the "--really" option to actually delete it'
-                       % archive.metadata['name'])
+            self.print_verbose('Purging archive "%s"', archive.name)
+            archive.delete(cache)
         return self.exit_code
 
     def run(self, args=None):
@@ -401,9 +396,6 @@ class Archiver(object):
                                help='Number of yearly archives to keep')
         subparser.add_argument('-p', '--prefix', dest='prefix', type=str,
                                help='Only consider archive names starting with this prefix')
-        subparser.add_argument('-r', '--really', dest='really',
-                               action='store_true', default=False,
-                               help='Actually delete archives')
         subparser.add_argument('store', metavar='STORE',
                                type=location_validator(archive=False),
                                help='Store to prune')

+ 0 - 4
darc/test.py

@@ -129,10 +129,6 @@ class Test(unittest.TestCase):
         self.darc('create', self.store_location + '::test2', src_dir)
         self.darc('prune', self.store_location, '--daily=2')
         output = self.darc('list', self.store_location)
-        assert 'test1' in output
-        assert 'test2' in output
-        self.darc('prune', self.store_location, '--daily=2', '--really')
-        output = self.darc('list', self.store_location)
         assert 'test1' not in output
         assert 'test2' in output