From 7504cee21a5b004dfd7a615664e7e70cf787b232 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Thu, 9 Apr 2020 11:56:14 -0700 Subject: [PATCH] Improve resolution warning for wit-manifest from commit instead of disk --- lib/wit/workspace.py | 4 ++-- t/warn_manifest_changes.t | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/wit/workspace.py b/lib/wit/workspace.py index cbf318d..0f0e02f 100644 --- a/lib/wit/workspace.py +++ b/lib/wit/workspace.py @@ -168,8 +168,8 @@ def resolve(self, download=False): used_commit = pkg.revision fs_commit = pkg.repo.get_commit('HEAD') if used_commit != fs_commit: - log.warn("using '{}' manifest instead of checked-out version of '{}'".format( - pkg.id(), pkg.name)) + log.warn("using '{}' manifest instead of currently checked-out version in '{}'" + .format(pkg.id(), pkg.name)) continue if pkg.repo.modified_manifest(): diff --git a/t/warn_manifest_changes.t b/t/warn_manifest_changes.t index ade73e6..a8ecb00 100755 --- a/t/warn_manifest_changes.t +++ b/t/warn_manifest_changes.t @@ -33,14 +33,14 @@ wit add-pkg $foo_dir output=$(wit update) echo $output | grep "disregarding uncommitted changes" check "initial wit update should not log uncommitted manifest warnings" [ $? -ne 0 ] -echo $output | grep "manifest instead of checked-out version" +echo $output | grep "manifest instead of currently checked-out version" check "initial wit update should not log different manifest warnings" [ $? -ne 0 ] rm foo/wit-manifest.json output=$(wit update) echo $output | grep "disregarding uncommitted changes" check "initial wit update should log uncommitted manifest warnings" [ $? -eq 0 ] -echo $output | grep "manifest instead of checked-out version" +echo $output | grep "manifest instead of currently checked-out version" check "initial wit update should not log different manifest warnings" [ $? -ne 0 ] git -C foo add -A @@ -48,7 +48,7 @@ git -C foo commit -m "remove manifest" output=$(wit update) echo $output | grep "disregarding uncommitted changes" check "initial wit update should not log uncommitted manifest warnings" [ $? -ne 0 ] -echo $output | grep "manifest instead of checked-out version" +echo $output | grep "manifest instead of currently checked-out version" check "initial wit update should log different manifest warnings" [ $? -eq 0 ] set +x