Repository: kopia/kopia
Pull request #2804 (2023-03-11 06:56:06)

build(deps): manual upgrade to github.com/alecthomas/kingpin/v2
The upstream code was finally tagged so we can pull it using proper tag name.

codecov[bot]: ## [Codecov](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia) Report
Patch coverage has no change and project coverage change: **`-0.02`** :warning:
> Comparison is base [(`84675c1`)](https://codecov.io/gh/kopia/kopia/commit/84675c1185be3a00d0b39d7d8f7608ac97bbebc7?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia) 75.24% compared to head [(`95b890c`)](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia) 75.23%.

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##           master    #2804      +/-   ##
==========================================
- Coverage   75.24%   75.23%   -0.02%     
==========================================
  Files         457      457              
  Lines       35868    35868              
==========================================
- Hits        26990    26986       -4     
- Misses       6981     6986       +5     
+ Partials     1897     1896       -1     
```


| [Impacted Files](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia) | Coverage Δ | |
|---|---|---|
| [cli/app.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2FwcC5nbw==) | `76.69% <ø> (ø)` | |
| [cli/cli\_progress.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NsaV9wcm9ncmVzcy5nbw==) | `96.02% <ø> (ø)` | |
| [cli/command\_content\_range\_flags.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfY29udGVudF9yYW5nZV9mbGFncy5nbw==) | `50.00% <ø> (ø)` | |
| [cli/command\_logs\_session.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfbG9nc19zZXNzaW9uLmdv) | `71.91% <ø> (ø)` | |
| [cli/command\_policy.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5Lmdv) | `72.72% <ø> (ø)` | |
| [cli/command\_policy\_set\_actions.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5X3NldF9hY3Rpb25zLmdv) | `58.22% <ø> (ø)` | |
| [cli/command\_policy\_set\_compression.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5X3NldF9jb21wcmVzc2lvbi5nbw==) | `73.17% <ø> (ø)` | |
| [cli/command\_policy\_set\_error\_handling.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5X3NldF9lcnJvcl9oYW5kbGluZy5nbw==) | `80.00% <ø> (ø)` | |
| [cli/command\_policy\_set\_files.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5X3NldF9maWxlcy5nbw==) | `77.77% <ø> (ø)` | |
| [cli/command\_policy\_set\_logging.go](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia#diff-Y2xpL2NvbW1hbmRfcG9saWN5X3NldF9sb2dnaW5nLmdv) | `100.00% <ø> (ø)` | |
| ... and [33 more](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia) | |

... and [3 files with indirect coverage changes](https://codecov.io/gh/kopia/kopia/pull/2804/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia)

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia)

</details>

[:umbrella: View full report in Codecov by Sentry](https://codecov.io/gh/kopia/kopia/pull/2804?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia).   
:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=kopia).


Patch:
diff --git a/cli/app.go b/cli/app.go
index 497e31d2..371ccd4b 100644
--- a/cli/app.go
+++ b/cli/app.go
@@ -8,7 +8,7 @@
 	"os"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/fatih/color"
 	"github.com/mattn/go-colorable"
 	"github.com/pkg/errors"
diff --git a/cli/cli_progress.go b/cli/cli_progress.go
index 2fff2106..98a04db1 100644
--- a/cli/cli_progress.go
+++ b/cli/cli_progress.go
@@ -7,7 +7,7 @@
 	"sync/atomic"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/fatih/color"
 
 	"github.com/kopia/kopia/internal/timetrack"
diff --git a/cli/command_content_range_flags.go b/cli/command_content_range_flags.go
index b6f09df9..f6ba63b1 100644
--- a/cli/command_content_range_flags.go
+++ b/cli/command_content_range_flags.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/content"
 	"github.com/kopia/kopia/repo/content/index"
diff --git a/cli/command_logs_session.go b/cli/command_logs_session.go
index a656e05b..ce32af2a 100644
--- a/cli/command_logs_session.go
+++ b/cli/command_logs_session.go
@@ -7,7 +7,7 @@
 	"strings"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/clock"
diff --git a/cli/command_policy.go b/cli/command_policy.go
index fe019e31..886b3b81 100644
--- a/cli/command_policy.go
+++ b/cli/command_policy.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo"
diff --git a/cli/command_policy_set_actions.go b/cli/command_policy_set_actions.go
index dfbd6d76..62b84bef 100644
--- a/cli/command_policy_set_actions.go
+++ b/cli/command_policy_set_actions.go
@@ -8,7 +8,7 @@
 	"strings"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/snapshot/policy"
diff --git a/cli/command_policy_set_compression.go b/cli/command_policy_set_compression.go
index b3edf385..fb1b8bf9 100644
--- a/cli/command_policy_set_compression.go
+++ b/cli/command_policy_set_compression.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/compression"
diff --git a/cli/command_policy_set_error_handling.go b/cli/command_policy_set_error_handling.go
index 8aa0fa08..f83be890 100644
--- a/cli/command_policy_set_error_handling.go
+++ b/cli/command_policy_set_error_handling.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/snapshot/policy"
diff --git a/cli/command_policy_set_files.go b/cli/command_policy_set_files.go
index 7349bd63..3cdf7d23 100644
--- a/cli/command_policy_set_files.go
+++ b/cli/command_policy_set_files.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/snapshot/policy"
diff --git a/cli/command_policy_set_logging.go b/cli/command_policy_set_logging.go
index b4ff5d3a..10e370f2 100644
--- a/cli/command_policy_set_logging.go
+++ b/cli/command_policy_set_logging.go
@@ -4,7 +4,7 @@
 	"context"
 	"strconv"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/snapshot/policy"
diff --git a/cli/command_policy_set_retention.go b/cli/command_policy_set_retention.go
index 1ee698fd..601e695b 100644
--- a/cli/command_policy_set_retention.go
+++ b/cli/command_policy_set_retention.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/snapshot/policy"
 )
diff --git a/cli/command_policy_set_scheduling.go b/cli/command_policy_set_scheduling.go
index a0d96234..2f858c92 100644
--- a/cli/command_policy_set_scheduling.go
+++ b/cli/command_policy_set_scheduling.go
@@ -5,7 +5,7 @@
 	"strings"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/snapshot/policy"
diff --git a/cli/command_policy_set_upload.go b/cli/command_policy_set_upload.go
index 9f9c699d..1cba89fc 100644
--- a/cli/command_policy_set_upload.go
+++ b/cli/command_policy_set_upload.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/snapshot/policy"
 )
diff --git a/cli/command_repository_connect.go b/cli/command_repository_connect.go
index 36e4503b..60cd9e3b 100644
--- a/cli/command_repository_connect.go
+++ b/cli/command_repository_connect.go
@@ -4,7 +4,7 @@
 	"context"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/passwordpersist"
diff --git a/cli/command_repository_connect_from_config.go b/cli/command_repository_connect_from_config.go
index b91448e9..89d9c520 100644
--- a/cli/command_repository_connect_from_config.go
+++ b/cli/command_repository_connect_from_config.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo"
diff --git a/cli/command_repository_create.go b/cli/command_repository_create.go
index 29797100..c88543fc 100644
--- a/cli/command_repository_create.go
+++ b/cli/command_repository_create.go
@@ -4,7 +4,7 @@
 	"context"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo"
diff --git a/cli/command_repository_repair.go b/cli/command_repository_repair.go
index 1c30b5b3..e2564f73 100644
--- a/cli/command_repository_repair.go
+++ b/cli/command_repository_repair.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/gather"
diff --git a/cli/command_repository_sync.go b/cli/command_repository_sync.go
index fc58d6cb..2a36f9b2 100644
--- a/cli/command_repository_sync.go
+++ b/cli/command_repository_sync.go
@@ -8,7 +8,7 @@
 	"sync"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 	"golang.org/x/sync/errgroup"
 
diff --git a/cli/command_repository_upgrade.go b/cli/command_repository_upgrade.go
index 0b0b2f63..b2d6bc67 100644
--- a/cli/command_repository_upgrade.go
+++ b/cli/command_repository_upgrade.go
@@ -6,7 +6,7 @@
 	"os"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/epoch"
diff --git a/cli/command_server.go b/cli/command_server.go
index 52c34d7e..8812c618 100644
--- a/cli/command_server.go
+++ b/cli/command_server.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/apiclient"
diff --git a/cli/command_server_source_manager_action.go b/cli/command_server_source_manager_action.go
index 14353240..df7b98b4 100644
--- a/cli/command_server_source_manager_action.go
+++ b/cli/command_server_source_manager_action.go
@@ -5,7 +5,7 @@
 	"net/url"
 	"path/filepath"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/apiclient"
diff --git a/cli/command_snapshot_copy_move_history.go b/cli/command_snapshot_copy_move_history.go
index 101e4306..42e7c45b 100644
--- a/cli/command_snapshot_copy_move_history.go
+++ b/cli/command_snapshot_copy_move_history.go
@@ -4,7 +4,7 @@
 	"context"
 	"strings"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo"
diff --git a/cli/command_snapshot_fix.go b/cli/command_snapshot_fix.go
index ecd6a49b..627e1898 100644
--- a/cli/command_snapshot_fix.go
+++ b/cli/command_snapshot_fix.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/units"
diff --git a/cli/command_user_add_set.go b/cli/command_user_add_set.go
index df8e3bcd..f98b51e3 100644
--- a/cli/command_user_add_set.go
+++ b/cli/command_user_add_set.go
@@ -4,7 +4,7 @@
 	"context"
 	"encoding/base64"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/user"
diff --git a/cli/config.go b/cli/config.go
index 35b9d92e..1278ef2a 100644
--- a/cli/config.go
+++ b/cli/config.go
@@ -9,7 +9,7 @@
 	"path/filepath"
 	"runtime"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/fs"
diff --git a/cli/inproc.go b/cli/inproc.go
index fcdb65ef..f625c47d 100644
--- a/cli/inproc.go
+++ b/cli/inproc.go
@@ -4,7 +4,7 @@
 	"context"
 	"io"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/internal/releasable"
 	"github.com/kopia/kopia/repo/logging"
diff --git a/cli/json_output.go b/cli/json_output.go
index 9da69394..975981df 100644
--- a/cli/json_output.go
+++ b/cli/json_output.go
@@ -5,7 +5,7 @@
 	"fmt"
 	"io"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/content"
 	"github.com/kopia/kopia/snapshot"
diff --git a/cli/observability_flags.go b/cli/observability_flags.go
index 7bd91d6e..5d0d4bb8 100644
--- a/cli/observability_flags.go
+++ b/cli/observability_flags.go
@@ -9,7 +9,7 @@
 	"sync"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/gorilla/mux"
 	"github.com/pkg/errors"
 	"github.com/prometheus/client_golang/prometheus"
diff --git a/cli/password_darwin.go b/cli/password_darwin.go
index 10b8cd92..dfbc55a7 100644
--- a/cli/password_darwin.go
+++ b/cli/password_darwin.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 )
 
 func (c *App) setupOSSpecificKeychainFlags(svc appServices, app *kingpin.Application) {
diff --git a/cli/password_linux.go b/cli/password_linux.go
index d4ee4aa4..adc985bb 100644
--- a/cli/password_linux.go
+++ b/cli/password_linux.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 )
 
 func (c *App) setupOSSpecificKeychainFlags(svc appServices, app *kingpin.Application) {
diff --git a/cli/password_other.go b/cli/password_other.go
index 42d7e579..af8e419d 100644
--- a/cli/password_other.go
+++ b/cli/password_other.go
@@ -4,7 +4,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 )
 
 func (c *App) setupOSSpecificKeychainFlags(svc appServices, app *kingpin.Application) {
diff --git a/cli/password_windows.go b/cli/password_windows.go
index da83747c..27f7bd68 100644
--- a/cli/password_windows.go
+++ b/cli/password_windows.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 )
 
 func (c *App) setupOSSpecificKeychainFlags(svc appServices, app *kingpin.Application) {
diff --git a/cli/profile.go b/cli/profile.go
index 24d997aa..289719c3 100644
--- a/cli/profile.go
+++ b/cli/profile.go
@@ -1,7 +1,7 @@
 package cli
 
 import (
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/profile"
 )
 
diff --git a/cli/storage_azure.go b/cli/storage_azure.go
index 200853aa..857f2c15 100644
--- a/cli/storage_azure.go
+++ b/cli/storage_azure.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/blob"
 	"github.com/kopia/kopia/repo/blob/azure"
diff --git a/cli/storage_b2.go b/cli/storage_b2.go
index af9595bf..c29f0840 100644
--- a/cli/storage_b2.go
+++ b/cli/storage_b2.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/blob"
 	"github.com/kopia/kopia/repo/blob/b2"
diff --git a/cli/storage_filesystem.go b/cli/storage_filesystem.go
index 5dbe51eb..040c2b9f 100644
--- a/cli/storage_filesystem.go
+++ b/cli/storage_filesystem.go
@@ -5,7 +5,7 @@
 	"os"
 	"strconv"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/ospath"
diff --git a/cli/storage_gcs.go b/cli/storage_gcs.go
index 2c5850aa..e7ee4ba0 100644
--- a/cli/storage_gcs.go
+++ b/cli/storage_gcs.go
@@ -5,7 +5,7 @@
 	"encoding/json"
 	"os"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/blob"
diff --git a/cli/storage_gdrive.go b/cli/storage_gdrive.go
index d4ecfad0..04c41038 100644
--- a/cli/storage_gdrive.go
+++ b/cli/storage_gdrive.go
@@ -5,7 +5,7 @@
 	"encoding/json"
 	"os"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/blob"
diff --git a/cli/storage_providers.go b/cli/storage_providers.go
index 023a423c..52a12963 100644
--- a/cli/storage_providers.go
+++ b/cli/storage_providers.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/blob"
 	"github.com/kopia/kopia/repo/blob/throttling"
diff --git a/cli/storage_rclone.go b/cli/storage_rclone.go
index 58f86059..29975004 100644
--- a/cli/storage_rclone.go
+++ b/cli/storage_rclone.go
@@ -4,7 +4,7 @@
 	"context"
 	"os"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/blob"
diff --git a/cli/storage_s3.go b/cli/storage_s3.go
index edadd8fb..444ef3ff 100644
--- a/cli/storage_s3.go
+++ b/cli/storage_s3.go
@@ -4,7 +4,7 @@
 	"context"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/blob"
diff --git a/cli/storage_sftp.go b/cli/storage_sftp.go
index 0c85c74e..d7e8165a 100644
--- a/cli/storage_sftp.go
+++ b/cli/storage_sftp.go
@@ -5,7 +5,7 @@
 	"os"
 	"path/filepath"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/repo/blob"
diff --git a/cli/storage_webdav.go b/cli/storage_webdav.go
index 7b8d88fe..f86dd22e 100644
--- a/cli/storage_webdav.go
+++ b/cli/storage_webdav.go
@@ -4,7 +4,7 @@
 	"context"
 	"os"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/repo/blob"
 	"github.com/kopia/kopia/repo/blob/webdav"
diff --git a/cli/throttle_get.go b/cli/throttle_get.go
index 9212ed89..944a0014 100644
--- a/cli/throttle_get.go
+++ b/cli/throttle_get.go
@@ -3,7 +3,7 @@
 import (
 	"strconv"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/internal/units"
 	"github.com/kopia/kopia/repo/blob/throttling"
diff --git a/cli/throttle_set.go b/cli/throttle_set.go
index 96d4f761..56d7efbe 100644
--- a/cli/throttle_set.go
+++ b/cli/throttle_set.go
@@ -4,7 +4,7 @@
 	"context"
 	"strconv"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/internal/units"
diff --git a/go.mod b/go.mod
index 1c963d1a..970efd69 100644
--- a/go.mod
+++ b/go.mod
@@ -7,8 +7,7 @@ require (
 	github.com/Azure/azure-pipeline-go v0.2.3 // indirect
 	github.com/Azure/azure-storage-blob-go v0.15.0
 	github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 // indirect
-	github.com/alecthomas/kingpin v1.3.8-0.20220615105907-eae6867f4166 // this is pulling master, which is newer than v2
-	github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a
+	github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137
 	github.com/aws/aws-sdk-go v1.44.207
 	github.com/chmduquesne/rollinghash v4.0.0+incompatible
 	github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0
@@ -42,7 +41,7 @@ require (
 	github.com/sanity-io/litter v1.5.5
 	github.com/sirupsen/logrus v1.9.0 // indirect
 	github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
-	github.com/stretchr/testify v1.8.1
+	github.com/stretchr/testify v1.8.2
 	github.com/studio-b12/gowebdav v0.0.0-20211106090535-29e74efa701f
 	github.com/tg123/go-htpasswd v1.2.1
 	github.com/zalando/go-keyring v0.2.2
@@ -71,7 +70,6 @@ require (
 	github.com/Azure/azure-sdk-for-go/sdk/internal v0.8.3 // indirect
 	github.com/Azure/azure-sdk-for-go/sdk/storage/azblob v0.3.0
 	github.com/Azure/go-autorest/autorest/adal v0.9.16 // indirect
-	github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
 	github.com/beorn7/perks v1.0.1 // indirect
 	github.com/cespare/xxhash/v2 v2.2.0 // indirect
 	github.com/danieljoos/wincred v1.1.2 // indirect
@@ -102,11 +100,12 @@ require (
 )
 
 require (
+	github.com/alecthomas/kingpin/v2 v2.3.2
 	github.com/chromedp/cdproto v0.0.0-20230109101555-6b041c6303cc
 	github.com/chromedp/chromedp v0.8.7
 	github.com/edsrzf/mmap-go v1.1.0
 	github.com/hashicorp/golang-lru v0.5.4
-	github.com/klauspost/reedsolomon v1.11.6
+	github.com/klauspost/reedsolomon v1.11.7
 	github.com/prometheus/client_model v0.3.0
 	go.opentelemetry.io/otel v1.13.0
 	go.opentelemetry.io/otel/exporters/jaeger v1.13.0
@@ -131,5 +130,5 @@ require (
 	github.com/googleapis/enterprise-certificate-proxy v0.2.3 // indirect
 	github.com/josharian/intern v1.0.0 // indirect
 	github.com/mailru/easyjson v0.7.7 // indirect
-	github.com/xhit/go-str2duration v1.2.0 // indirect
+	github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
 )
diff --git a/go.sum b/go.sum
index b31ce997..d64f85ab 100644
--- a/go.sum
+++ b/go.sum
@@ -36,14 +36,10 @@ github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03
 github.com/GehirnInc/crypt v0.0.0-20190301055215-6c0105aabd46/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo=
 github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962 h1:KeNholpO2xKjgaaSyd+DyQRrsQjhbSeS7qe4nEw8aQw=
 github.com/GehirnInc/crypt v0.0.0-20200316065508-bb7000b8a962/go.mod h1:kC29dT1vFpj7py2OvG1khBdQpo3kInWP+6QipLbdngo=
-github.com/alecthomas/kingpin v1.3.8-0.20220615105907-eae6867f4166 h1:sdTv2mX7pjU3JyOTktjOYeT/bjlllCzdRqzKFjgLDvs=
-github.com/alecthomas/kingpin v1.3.8-0.20220615105907-eae6867f4166/go.mod h1:OaxaNlTGWmknTg9pwAYYTkaU/cXZYeLGizE8aey/CXU=
-github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM=
-github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
-github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
-github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a h1:E/8AP5dFtMhl5KPJz66Kt9G0n+7Sn41Fy1wv9/jHOrc=
-github.com/alecthomas/units v0.0.0-20210927113745-59d0afb8317a/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
+github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU=
+github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE=
+github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc=
+github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE=
 github.com/alessio/shellescape v1.4.1 h1:V7yhSDDn8LP4lc4jS8pFkt0zCnzVJlG5JXy9BVKJUX0=
 github.com/alessio/shellescape v1.4.1/go.mod h1:PZAiSCk0LJaZkiCSkPv8qIobYglO3FPpyFjDCtHLS30=
 github.com/aws/aws-sdk-go v1.44.207 h1:7O0AMKxTm+/GUx6zw+3dqc+fD3tTzv8xaZPYo+ywRwE=
@@ -186,8 +182,8 @@ github.com/klauspost/cpuid/v2 v2.2.3 h1:sxCkb+qR91z4vsqw4vGGZlDgPz3G7gjaLyK3V8y7
 github.com/klauspost/cpuid/v2 v2.2.3/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
 github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
 github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
-github.com/klauspost/reedsolomon v1.11.6 h1:h0MUpEzmretucmlelC3EefQHKgk6vWpKz/ctB/tmaEs=
-github.com/klauspost/reedsolomon v1.11.6/go.mod h1:cuXqklb3LNaurR5MVjy7WLXAEUqGz4I0Uc+rnQ7POUg=
+github.com/klauspost/reedsolomon v1.11.7 h1:9uaHU0slncktTEEg4+7Vl7q7XUNMBUOK4R9gnKhMjAU=
+github.com/klauspost/reedsolomon v1.11.7/go.mod h1:4bXRN+cVzMdml6ti7qLouuYi32KHJ5MGv0Qd8a47h6A=
 github.com/kopia/htmluibuild v0.0.0-20220928042710-9fdd02afb1e7 h1:WP5VfIQL7AaYkO4zTNSCsVOawTzudbc4tvLojvg0RKc=
 github.com/kopia/htmluibuild v0.0.0-20220928042710-9fdd02afb1e7/go.mod h1:eWer4rx9P8lJo2eKc+Q7AZ1dE1x1hJNdkbDFPzMu1Hw=
 github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
@@ -267,20 +263,20 @@ github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSS
 github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
 github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
-github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
 github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
 github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
-github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
 github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
+github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
+github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
 github.com/studio-b12/gowebdav v0.0.0-20211106090535-29e74efa701f h1:SLJx0nHhb2ZLlYNMAbrYsjwmVwXx4yRT48lNIxOp7ts=
 github.com/studio-b12/gowebdav v0.0.0-20211106090535-29e74efa701f/go.mod h1:gCcfDlA1Y7GqOaeEKw5l9dOGx1VLdc/HuQSlQAaZ30s=
 github.com/tg123/go-htpasswd v1.2.1 h1:i4wfsX1KvvkyoMiHZzjS0VzbAPWfxzI8INcZAKtutoU=
 github.com/tg123/go-htpasswd v1.2.1/go.mod h1:erHp1B86KXdwQf1X5ZrLb7erXZnWueEQezb2dql4q58=
-github.com/xhit/go-str2duration v1.2.0 h1:BcV5u025cITWxEQKGWr1URRzrcXtu7uk8+luz3Yuhwc=
-github.com/xhit/go-str2duration v1.2.0/go.mod h1:3cPSlfZlUHVlneIVfePFWcJZsuwf+P1v2SRTV4cUmp4=
+github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc=
+github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU=
 github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
 github.com/zalando/go-keyring v0.2.2 h1:f0xmpYiSrHtSNAVgwip93Cg8tuF45HJM6rHq/A5RI/4=
 github.com/zalando/go-keyring v0.2.2/go.mod h1:sI3evg9Wvpw3+n4SqplGSJUMwtDeROfD4nsFz4z9PG0=
diff --git a/internal/logfile/logfile.go b/internal/logfile/logfile.go
index 15eb21fb..2589b8f7 100644
--- a/internal/logfile/logfile.go
+++ b/internal/logfile/logfile.go
@@ -12,7 +12,7 @@
 	"sync"
 	"time"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/fatih/color"
 	"github.com/pkg/errors"
 	"go.uber.org/zap"
diff --git a/main.go b/main.go
index db12fcb5..9f10a770 100644
--- a/main.go
+++ b/main.go
@@ -12,7 +12,7 @@
 import (
 	"os"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/cli"
 	"github.com/kopia/kopia/internal/logfile"
diff --git a/site/cli2md/cli2md.go b/site/cli2md/cli2md.go
index e62dbe76..ee4cac34 100644
--- a/site/cli2md/cli2md.go
+++ b/site/cli2md/cli2md.go
@@ -11,7 +11,7 @@
 	"sort"
 	"strings"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 	"github.com/pkg/errors"
 
 	"github.com/kopia/kopia/cli"


Test patch:
diff --git a/tests/testenv/cli_inproc_runner.go b/tests/testenv/cli_inproc_runner.go
index 95ba9fbd..f5afae33 100644
--- a/tests/testenv/cli_inproc_runner.go
+++ b/tests/testenv/cli_inproc_runner.go
@@ -8,7 +8,7 @@
 	"sync/atomic"
 	"testing"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/cli"
 	"github.com/kopia/kopia/internal/testlogging"
diff --git a/tests/testenv/storage_inmemory.go b/tests/testenv/storage_inmemory.go
index 7772de8c..a8aefc5e 100644
--- a/tests/testenv/storage_inmemory.go
+++ b/tests/testenv/storage_inmemory.go
@@ -3,7 +3,7 @@
 import (
 	"context"
 
-	"github.com/alecthomas/kingpin"
+	"github.com/alecthomas/kingpin/v2"
 
 	"github.com/kopia/kopia/cli"
 	"github.com/kopia/kopia/internal/repotesting"