Changeset 312


Ignore:
Timestamp:
May 17, 2007, 12:58:04 PM (14 years ago)
Author:
Peter Johansson
Message:

added URL to 'General Information' on first page (fixes #196). To do that in a smooth way, I added a new member variable in SVNinfo class.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/svndigest.cc

    r304 r312  
    168168  print_css("svndigest.css");
    169169  SVNlog local_log(option->root());
    170   print_main_page(tree.name(), local_log, stats);
     170  print_main_page(tree.name(), local_log, stats,
     171                  SVNinfo(option->root()).url());
    171172  mkdir("all");
    172173  mkdir("images");
  • trunk/lib/SVNinfo.cc

    r149 r312  
    4848
    4949    info_receiver_baton* irb=static_cast<struct info_receiver_baton*>(baton);
     50    if (info->URL)
     51      irb->url_=info->URL;
    5052    if (info->repos_root_URL)
    5153      irb->repos_root_url_=info->repos_root_URL;
  • trunk/lib/SVNinfo.h

    r165 r312  
    5656
    5757    ///
     58    /// @brief Get the URL.
     59    ///
     60    inline std::string url(void) const
     61    { return info_receiver_baton_.url_; }
     62
     63    ///
    5864    /// @brief Get the author of the latest commit.
    5965    ///
     
    9197    struct info_receiver_baton {
    9298      // more info is available but we only use these
     99      std::string url_;
    93100      std::string repos_root_url_;
    94101      std::string last_changed_author_;
  • trunk/lib/first_page.cc

    r311 r312  
    5151
    5252  void print_main_page(const std::string& dir, const SVNlog& log,
    53                        const Stats& stats)
     53                       const Stats& stats, std::string url)
    5454  {
    5555    std::string filename="index.html";
     
    6969      latest_commit.push_back(log.latest_commit(*i));
    7070
    71     print_general_information(os, log, authors.size());
     71    print_general_information(os, log, authors.size(), url);
    7272    sort(latest_commit.begin(), latest_commit.end(), GreaterRevision());
    7373    print_authors(os, latest_commit, stats);
     
    8080
    8181  void print_general_information(std::ostream& os, const SVNlog& log,
    82                                  size_t nof_authors)
     82                                 size_t nof_authors, std::string url)
    8383  {
    8484    Date begin(log.date()[0]);
     
    9393       << "General Information"
    9494       << "</th></tr></thead>\n"
     95       << "<tr><td>URL:</td><td>"
     96       << url << "</td></tr>\n"
    9597       << "<tr><td>First Revision:</td><td>"
    9698       << begin(timefmt) << "</td></tr>\n"
  • trunk/lib/first_page.h

    r285 r312  
    4343  /// called by print_main_page
    4444  ///
    45   void print_general_information(std::ostream&, const SVNlog&, size_t);
     45  void print_general_information(std::ostream&, const SVNlog&, size_t,
     46                                 std::string url);
    4647
    4748  ///
    4849  /// @brief print main page
    4950  ///
    50   void print_main_page(const std::string&, const SVNlog&, const Stats&);
     51  void print_main_page(const std::string&, const SVNlog&, const Stats&,
     52                       std::string url);
    5153   
    5254  void print_recent_logs(std::ostream&, const SVNlog& log);
Note: See TracChangeset for help on using the changeset viewer.