+@wvtest
+def test_duplicate_save_dates():
+ with no_lingering_errors():
+ with test_tempdir('bup-tvfs-') as tmpdir:
+ bup_dir = tmpdir + '/bup'
+ environ['GIT_DIR'] = bup_dir
+ environ['BUP_DIR'] = bup_dir
+ environ['TZ'] = 'UTC'
+ git.repodir = bup_dir
+ data_path = tmpdir + '/src'
+ os.mkdir(data_path)
+ with open(data_path + '/file', 'w+') as tmpfile:
+ tmpfile.write(b'canary\n')
+ ex((bup_path, 'init'))
+ ex((bup_path, 'index', '-v', data_path))
+ for i in range(11):
+ ex((bup_path, 'save', '-d', '100000', '-n', 'test', data_path))
+ repo = LocalRepo()
+ res = vfs.resolve(repo, '/test')
+ wvpasseq(2, len(res))
+ name, revlist = res[-1]
+ wvpasseq('test', name)
+ wvpasseq(('.',
+ '1970-01-02-034640-10',
+ '1970-01-02-034640-09',
+ '1970-01-02-034640-08',
+ '1970-01-02-034640-07',
+ '1970-01-02-034640-06',
+ '1970-01-02-034640-05',
+ '1970-01-02-034640-04',
+ '1970-01-02-034640-03',
+ '1970-01-02-034640-02',
+ '1970-01-02-034640-01',
+ '1970-01-02-034640-00',
+ 'latest'),
+ tuple(x[0] for x in vfs.contents(repo, revlist)))
+