[osmium-tool] 76/97: Bugfix: Don't show that a file has multiple object versions if it is unordered.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 20:15:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.

commit 3597ff29133eb9235ff567602ad22756af9167d9
Author: Jochen Topf <jochen at topf.org>
Date:   Fri Jan 30 08:57:22 2015 +0100

    Bugfix: Don't show that a file has multiple object versions if it is unordered.
    
    When objects in file are unordered we can't figure out with a simple algorithm
    whether we have seen an id already, so we just say it is "unknown".
---
 src/command_fileinfo.cpp | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/command_fileinfo.cpp b/src/command_fileinfo.cpp
index d8f6e85..2666777 100644
--- a/src/command_fileinfo.cpp
+++ b/src/command_fileinfo.cpp
@@ -211,9 +211,14 @@ bool CommandFileinfo::run() {
 
             std::cout << "  Objects ordered (by type and id): " << (info_handler.ordered ? "yes\n" : "no\n");
 
-            std::cout << "  Multiple versions of same object: " << (info_handler.multiple_versions ? "yes\n" : "no\n");
-            if (info_handler.multiple_versions != header.has_multiple_object_versions()) {
-                std::cout << "    WARNING! This is different from the setting in the header.\n";
+            std::cout << "  Multiple versions of same object: ";
+            if (info_handler.ordered) {
+                std::cout << (info_handler.multiple_versions ? "yes\n" : "no\n");
+                if (info_handler.multiple_versions != header.has_multiple_object_versions()) {
+                    std::cout << "    WARNING! This is different from the setting in the header.\n";
+                }
+            } else {
+                std::cout << "unknown (because objects in file are unordered)";
             }
 
 #ifdef OSMIUM_WITH_CRYPTOPP

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git



More information about the Pkg-grass-devel mailing list