def topic_map_file
      topic_file = TOPIC_MAP_FILENAME
      unless File.exist?(File.join(docs_root_dir,topic_file))
        # The new filename '_topic_map.yml' couldn't be found;
        # switch to the old one and warn the user.
        topic_file = BUILD_FILENAME
        unless File.exist?(File.join(docs_root_dir,topic_file))
          # Critical error - no topic map file at all.
          Trollop::die "Could not find any topic map file ('#{TOPIC_MAP_FILENAME}' or '#{BUILD_FILENAME}') at #{docs_root_dir} in branch '#{git.branch}'"
        end
        log_warn("'#{BUILD_FILENAME}' is a deprecated filename. Rename this to '#{TOPIC_MAP_FILENAME}'.")
      end
      topic_file
    end
def topic_map_file
      topic_file = TOPIC_MAP_FILENAME
      unless File.exist?(File.join(docs_root_dir,topic_file))
        # The new filename '_topic_map.yml' couldn't be found;
        # switch to the old one and warn the user.
        topic_file = BUILD_FILENAME
        unless File.exist?(File.join(docs_root_dir,topic_file))
          # Critical error - no topic map file at all.
          Trollop::die "Could not find any topic map file ('#{TOPIC_MAP_FILENAME}' or '#{BUILD_FILENAME}') at #{docs_root_dir} in branch '#{git.branch}'"
        end
        log_warn("'#{BUILD_FILENAME}' is a deprecated filename. Rename this to '#{TOPIC_MAP_FILENAME}'.")
      end
      topic_file
    end
Protip: Don't cache these! The topic map needs to be reread every time we change branches.