From a721db2c1fbfc1b87065b0b43e32249117e53242 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 7 Nov 2016 16:06:36 -0800 Subject: Refactor: create new Paragraphs.h/cpp --- toolsrc/src/commands_update.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 5d531ef39..b448091f7 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -2,6 +2,7 @@ #include "vcpkg.h" #include "vcpkg_System.h" #include "vcpkg_Files.h" +#include "Paragraphs.h" namespace vcpkg { @@ -21,7 +22,7 @@ namespace vcpkg const auto& path = begin_it->path(); try { - auto pghs = get_paragraphs(path / "CONTROL"); + auto pghs = Paragraphs::get_paragraphs(path / "CONTROL"); if (pghs.empty()) continue; auto srcpgh = SourceParagraph(pghs[0]); -- cgit v1.2.3 From c91d8e41b60653b652b11c641f7a5b3d3eab7f6b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 7 Nov 2016 17:31:41 -0800 Subject: Introduce vcpkg_info.h/cpp --- toolsrc/src/commands_update.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index b448091f7..2d7444392 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -3,6 +3,7 @@ #include "vcpkg_System.h" #include "vcpkg_Files.h" #include "Paragraphs.h" +#include "vcpkg_info.h" namespace vcpkg { @@ -77,7 +78,7 @@ namespace vcpkg auto num1 = sscanf_s(version_contents->c_str(), "\"%d.%d.%d\"", &maj1, &min1, &rev1); int maj2, min2, rev2; - auto num2 = sscanf_s(version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); + auto num2 = sscanf_s(Info::version().c_str(), "%d.%d.%d-", &maj2, &min2, &rev2); if (num1 == 3 && num2 == 3) { -- cgit v1.2.3 From 31b8eee587c4a29894247833198d5e1e15ba9bba Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 15 Nov 2016 17:42:42 -0800 Subject: Use the already loaded status_db --- toolsrc/src/commands_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 2d7444392..82e3b7e52 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -37,7 +37,7 @@ namespace vcpkg std::string packages_list; std::vector packages_output; - for (auto&& pgh : database_load_check(paths)) + for (auto&& pgh : status_db) { if (pgh->state == install_state_t::not_installed && pgh->want == want_t::purge) continue; -- cgit v1.2.3 From aad0cc4c042aad87b2b52eded0e465ed01e799c1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 16 Dec 2016 19:40:58 -0800 Subject: Files::get_contents() -> Files::read_contents() --- toolsrc/src/commands_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 82e3b7e52..a4ab7c6e7 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -71,7 +71,7 @@ namespace vcpkg System::println("\nTo update these packages, run\n vcpkg remove --purge ...\n vcpkg install ..."); } - auto version_file = Files::get_contents(paths.root / "toolsrc" / "VERSION.txt"); + auto version_file = Files::read_contents(paths.root / "toolsrc" / "VERSION.txt"); if (auto version_contents = version_file.get()) { int maj1, min1, rev1; -- cgit v1.2.3 From df2a05e8546281135c6ea12430734d74371bcf46 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Jan 2017 17:35:33 -0800 Subject: Introduce Command namespace. Refactoring --- toolsrc/src/commands_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index a4ab7c6e7..9a480f3f5 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -5,7 +5,7 @@ #include "Paragraphs.h" #include "vcpkg_info.h" -namespace vcpkg +namespace vcpkg::Commands { void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { -- cgit v1.2.3 From cc8851144a871931b93d84bd962364159ad1c424 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 12 Jan 2017 22:03:57 -0800 Subject: Reorganize commands, each in its own namespace Additionally, functions related to a command can now live in the same namespace --- toolsrc/src/commands_update.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 9a480f3f5..12b4dad50 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -5,9 +5,9 @@ #include "Paragraphs.h" #include "vcpkg_info.h" -namespace vcpkg::Commands +namespace vcpkg::Commands::Update { - void update_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) + void perform_and_exit(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths) { args.check_exact_arg_count(0); System::println("Using local portfile versions. To update the local portfiles, use `git pull`."); -- cgit v1.2.3 From 73f4c47d761e51cdc0682df88dead76b407f1058 Mon Sep 17 00:00:00 2001 From: Olaf van der Spek Date: Wed, 25 Jan 2017 19:09:01 +0100 Subject: Update commands_update.cpp --- toolsrc/src/commands_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 12b4dad50..021bfe705 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -84,7 +84,7 @@ namespace vcpkg::Commands::Update { if (maj1 != maj2 || min1 != min2 || rev1 != rev2) { - System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use scripts\\bootstrap.ps1 to update.", + System::println("Different source is available for vcpkg (%d.%d.%d -> %d.%d.%d). Use powershell -exec bypass scripts/bootstrap.ps1 to update.", maj2, min2, rev2, maj1, min1, rev1); } -- cgit v1.2.3 From 59be40a100910d1f833cd54762e624b7123965ed Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Jan 2017 19:32:50 -0800 Subject: Rename vcpkg.h/cpp to vcpkglib.h/cpp --- toolsrc/src/commands_update.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index 021bfe705..d7a554303 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -1,5 +1,5 @@ #include "vcpkg_Commands.h" -#include "vcpkg.h" +#include "vcpkglib.h" #include "vcpkg_System.h" #include "vcpkg_Files.h" #include "Paragraphs.h" -- cgit v1.2.3 From 050e4a0f7a8156bd862f95c06ea298ab6697e147 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 27 Jan 2017 12:49:09 -0800 Subject: Introduce precompiled headers --- toolsrc/src/commands_update.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'toolsrc/src/commands_update.cpp') diff --git a/toolsrc/src/commands_update.cpp b/toolsrc/src/commands_update.cpp index d7a554303..a42ae5341 100644 --- a/toolsrc/src/commands_update.cpp +++ b/toolsrc/src/commands_update.cpp @@ -1,3 +1,4 @@ +#include "pch.h" #include "vcpkg_Commands.h" #include "vcpkglib.h" #include "vcpkg_System.h" -- cgit v1.2.3