Skip to content

Commit d47f428

Browse files
committed
Suppress unwanted output of list_issues program
1 parent 383f9d2 commit d47f428

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

bin/issues_to_be_moved.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ fi
8080
# Find list of issue numbers for each status
8181
for st in "${statuses[@]}"
8282
do
83-
issues[$st]=$(bin/list_issues "$st" | grep -v "Reading section-tag index" | sort -n)
83+
issues[$st]=$(bin/list_issues "$st" | sort -n)
8484
anchors[$st]=$(echo $st | LANG=C tr 'A-Z ' 'a-z_')
8585
done
8686

src/list_issues.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ int main(int argc, char const* argv[]) {
107107

108108
check_is_directory(path);
109109

110-
auto metadata = lwg::metadata::read_from_path(path);
110+
auto metadata = lwg::metadata::read_from_path(path, /*verbose=*/ false);
111111

112112
filter_issues(path / "xml/", metadata, [status](lwg::issue const & iss) { return status == iss.stat; });
113113
}

src/metadata.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,14 @@ namespace {
3131

3232
}
3333

34-
auto lwg::metadata::read_from_path(std::filesystem::path const& path) -> metadata {
34+
auto lwg::metadata::read_from_path(std::filesystem::path const& path, bool verbose) -> metadata {
3535
auto filename = path / "meta-data" / "section.data";
3636
std::ifstream infile{filename};
3737
if (!infile.is_open()) {
3838
throw std::runtime_error{"Can't open section.data at " + path.string() + "meta-data"};
3939
}
40-
std::cout << "Reading section-tag index from: " << filename << std::endl;
40+
if (verbose)
41+
std::cout << "Reading section-tag index from: " << filename << std::endl;
4142
return {
4243
read_section_db(infile),
4344
read_git_commit_times(path / "meta-data" / "dates"),

src/metadata.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ struct metadata {
1414
std::map<int, std::time_t> git_commit_times;
1515
std::unordered_map<std::string, std::string> paper_titles;
1616

17-
static metadata read_from_path(std::filesystem::path const& path);
17+
static metadata read_from_path(std::filesystem::path const& path, bool verbose = true);
1818
};
1919

2020
}

0 commit comments

Comments
 (0)