"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
bisync: clarify file operation directions in dry-run logs - fixes #7029
Kyle Reynoldsdcdbad35543b
diff --git a/cmd/bisync/log.go b/cmd/bisync/log.goindex 9d2e5b046..cd39079a6 100644--- a/cmd/bisync/log.go+++ b/cmd/bisync/log.go@@ -29,6 +29,10 @@ func (b *bisyncRun) indent(tag, file, msg string) {logf = fs.Logf}+ if b.opt.DryRun {+ logf = fs.Logf+ }+if tag == "Path1" {tag = Color(terminal.CyanFg, "Path1")} else {diff --git a/cmd/bisync/testdata/test_dry_run/golden/test.log b/cmd/bisync/testdata/test_dry_run/golden/test.logindex 0eca08d1c..d51c7daa3 100644--- a/cmd/bisync/testdata/test_dry_run/golden/test.log+++ b/cmd/bisync/testdata/test_dry_run/golden/test.log@@ -67,11 +67,11 @@ INFO : Bisyncing with Comparison Settings:}INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"INFO : Copying Path2 files to Path1-INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m+NOTICE: - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0mNOTICE: file10.txt: Skipped copy as --dry-run is set (size 19)NOTICE: file4.txt: Skipped copy as --dry-run is set (size 0)NOTICE: file6.txt: Skipped copy as --dry-run is set (size 19)-INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m+NOTICE: - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0mNOTICE: file1.txt: Skipped copy as --dry-run is set (size 0)NOTICE: file11.txt: Skipped copy as --dry-run is set (size 19)NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13)@@ -97,21 +97,21 @@ INFO : Bisyncing with Comparison Settings:INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"INFO : Building Path1 and Path2 listingsINFO : Path1 checking for diffs-INFO : - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile2.txt[0m-INFO : - [36mPath1[0m [35m[31mFile was deleted[0m[0m - [36mfile4.txt[0m-INFO : - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile5.txt[0m-INFO : - [36mPath1[0m [35m[31mFile was deleted[0m[0m - [36mfile6.txt[0m-INFO : - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile7.txt[0m-INFO : - [36mPath1[0m [35m[32mFile is new[0m[0m - [36mfile11.txt[0m+NOTICE: - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile2.txt[0m+NOTICE: - [36mPath1[0m [35m[31mFile was deleted[0m[0m - [36mfile4.txt[0m+NOTICE: - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile5.txt[0m+NOTICE: - [36mPath1[0m [35m[31mFile was deleted[0m[0m - [36mfile6.txt[0m+NOTICE: - [36mPath1[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile7.txt[0m+NOTICE: - [36mPath1[0m [35m[32mFile is new[0m[0m - [36mfile11.txt[0mINFO : Path1: 6 changes: [32m 1 new[0m, [33m 3 modified[0m, [31m 2 deleted[0mINFO : ([33mModified[0m: [36m 3 newer[0m, [34m 0 older[0m, [36m 3 larger[0m, [34m 0 smaller[0m)INFO : Path2 checking for diffs-INFO : - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile1.txt[0m-INFO : - [34mPath2[0m [35m[31mFile was deleted[0m[0m - [36mfile3.txt[0m-INFO : - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile5.txt[0m-INFO : - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile6.txt[0m-INFO : - [34mPath2[0m [35m[31mFile was deleted[0m[0m - [36mfile7.txt[0m-INFO : - [34mPath2[0m [35m[32mFile is new[0m[0m - [36mfile10.txt[0m+NOTICE: - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile1.txt[0m+NOTICE: - [34mPath2[0m [35m[31mFile was deleted[0m[0m - [36mfile3.txt[0m+NOTICE: - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile5.txt[0m+NOTICE: - [34mPath2[0m [35m[33mFile changed: [35msize (larger)[0m, [35mtime (newer)[0m[0m[0m - [36mfile6.txt[0m+NOTICE: - [34mPath2[0m [35m[31mFile was deleted[0m[0m - [36mfile7.txt[0m+NOTICE: - [34mPath2[0m [35m[32mFile is new[0m[0m - [36mfile10.txt[0mINFO : Path2: 6 changes: [32m 1 new[0m, [33m 3 modified[0m, [31m 2 deleted[0mINFO : ([33mModified[0m: [36m 3 newer[0m, [34m 0 older[0m, [36m 3 larger[0m, [34m 0 smaller[0m)INFO : Applying changes@@ -120,25 +120,25 @@ ERROR : file5.txt: md5 differNOTICE: {path2String}: 1 differences foundNOTICE: {path2String}: 1 errors while checkingINFO : Finished checking the potential conflicts. 1 differences found-INFO : - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file11.txt[0m-INFO : - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file2.txt[0m-INFO : - [34mPath2[0m [35m[31mQueue delete[0m[0m - [36m{path2/}file4.txt[0m+NOTICE: - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file11.txt[0m+NOTICE: - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file2.txt[0m+NOTICE: - [34mPath2[0m [35m[31mQueue delete[0m[0m - [36m{path2/}file4.txt[0mNOTICE: - [34mWARNING[0m [35mNew or changed in both paths[0m - [36mfile5.txt[0mNOTICE: file5.txt: Skipped rename as --dry-run is setNOTICE: - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file5.txt.conflict1[0mNOTICE: file5.txt: Skipped rename as --dry-run is setNOTICE: - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file5.txt.conflict2[0m-INFO : - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file6.txt[0m-INFO : - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file7.txt[0m-INFO : - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file1.txt[0m-INFO : - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file10.txt[0m-INFO : - [36mPath1[0m [35m[31mQueue delete[0m[0m - [36m{path1/}file3.txt[0m-INFO : - [34mPath2[0m [35mDo queued copies to[0m - [36mPath1[0m+NOTICE: - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file6.txt[0m+NOTICE: - [36mPath1[0m [35m[32mQueue copy to[0m Path2[0m - [36m{path2/}file7.txt[0m+NOTICE: - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file1.txt[0m+NOTICE: - [34mPath2[0m [35m[32mQueue copy to[0m Path1[0m - [36m{path1/}file10.txt[0m+NOTICE: - [36mPath1[0m [35m[31mQueue delete[0m[0m - [36m{path1/}file3.txt[0m+NOTICE: - [34mPath2[0m [35mDo queued copies to[0m - [36mPath1[0mNOTICE: file1.txt: Skipped copy as --dry-run is set (size 19)NOTICE: file10.txt: Skipped copy as --dry-run is set (size 19)NOTICE: file3.txt: Skipped delete as --dry-run is set (size 0)NOTICE: file6.txt: Skipped copy as --dry-run is set (size 19)-INFO : - [36mPath1[0m [35mDo queued copies to[0m - [36mPath2[0m+NOTICE: - [36mPath1[0m [35mDo queued copies to[0m - [36mPath2[0mNOTICE: file11.txt: Skipped copy as --dry-run is set (size 19)NOTICE: file2.txt: Skipped copy as --dry-run is set (size 13)NOTICE: file4.txt: Skipped delete as --dry-run is set (size 0)diff --git a/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log b/cmd/bisync/testdata/test_filtersfile_checks/golden/test.logindex 28f4cfa89..6a2583402 100644--- a/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log+++ b/cmd/bisync/testdata/test_filtersfile_checks/golden/test.log@@ -153,11 +153,11 @@ INFO : Synching Path1 "{path1/}" with Path2 "{path2/}"INFO : Using filters file {workdir/}filtersfile.txtINFO : Skipped storing filters file hash to {workdir/}filtersfile.txt.md5 as --dry-run is setINFO : Copying Path2 files to Path1-INFO : - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m-NOTICE: subdir: Skipped set directory modification time as --dry-run is set (size 4Ki)+NOTICE: - [34mPath2[0m [35mResync is copying files to[0m - [36mPath1[0m+NOTICE: subdir: Skipped set directory modification time as --dry-run is setNOTICE: {path1String}: Skipped set directory modification time as --dry-run is set-INFO : - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m-NOTICE: subdir: Skipped set directory modification time as --dry-run is set (size 4Ki)+NOTICE: - [36mPath1[0m [35mResync is copying files to[0m - [36mPath2[0m+NOTICE: subdir: Skipped set directory modification time as --dry-run is setNOTICE: {path2String}: Skipped set directory modification time as --dry-run is setINFO : Resync updating listingsINFO : [32mBisync successful[0m