From b09643e14f911e0f14a9109560a0177a8eaa7444 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= Date: Tue, 24 Nov 2015 12:11:43 -0500 Subject: [PATCH] change file status test and cleanup last ref to --verbose this ports the changes here to #445 --- borg/testsuite/archiver.py | 4 ++-- docs/usage.rst | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/borg/testsuite/archiver.py b/borg/testsuite/archiver.py index fcabb35d8..8542c338a 100644 --- a/borg/testsuite/archiver.py +++ b/borg/testsuite/archiver.py @@ -713,11 +713,11 @@ class ArchiverTestCase(ArchiverTestCaseBase): os.utime('input/file1', (now - 5, now - 5)) # 5 seconds ago self.create_regular_file('file2', size=1024 * 80) self.cmd('init', self.repository_location) - output = self.cmd('create', '--verbose', self.repository_location + '::test', 'input') + output = self.cmd('create', '--changed', '--unchanged', self.repository_location + '::test', 'input') self.assert_in("A input/file1", output) self.assert_in("A input/file2", output) # should find first file as unmodified - output = self.cmd('create', '--verbose', self.repository_location + '::test1', 'input') + output = self.cmd('create', '--changed', '--unchanged', self.repository_location + '::test1', 'input') self.assert_in("U input/file1", output) # this is expected, although surprising, for why, see: # http://borgbackup.readthedocs.org/en/latest/faq.html#i-am-seeing-a-added-status-for-a-unchanged-file diff --git a/docs/usage.rst b/docs/usage.rst index 57702452a..67e6a039f 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -430,7 +430,8 @@ Item flags ~~~~~~~~~~ `borg create --changed` outputs a verbose list of all files, directories and other -file system items it considered. For each item, it prefixes a single-letter +file system items it considered, with the exception of unchanged files +(for this, also add `--unchanged`). For each item, it prefixes a single-letter flag that indicates type and/or status of the item. A uppercase character represents the status of a regular file relative to the @@ -440,7 +441,7 @@ chunks are stored. For 'U' all data chunks refer to already existing chunks. - 'A' = regular file, added (see also :ref:`a_status_oddity` in the FAQ) - 'M' = regular file, modified -- 'U' = regular file, unchanged +- 'U' = regular file, unchanged (only if `--unchanged` is specified) - 'E' = regular file, an error happened while accessing/reading *this* file A lowercase character means a file type other than a regular file,