Ignore:
Timestamp:
May 2, 2007, 11:05:55 AM (14 years ago)
Author:
Peter Johansson
Message:

support for Trac. Fixes #125. Also added a config file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Configuration.cc

    r264 r274  
    3131#include <string>
    3232#include <sstream>
     33#include <utility>
    3334
    3435namespace theplu{
     
    7374        copyright_alias_[key] = name;
    7475      }
     76      else if (section == "trac"){
     77        getline(ss, tmp, '=');
     78        std::string key = trim(tmp);
     79        getline(ss, tmp);
     80        std::string value = trim(tmp);
     81        if (key=="trac-ticket")
     82          trac_ticket_=value;
     83        if (key=="trac-revision")
     84          trac_revision_=value;
     85       
     86      }
    7587    }
    7688  }
     
    88100  {
    89101    copyright_alias_.clear();
     102    trac_ticket_ = "";
     103    trac_revision_ = "";
    90104  }
    91105
     
    106120      os << i->first << " = " << i->second << " \n";
    107121    }
     122
     123    os << "\n"
     124       << "### Section for setting trac environment\n"
     125       << "[trac]\n"
     126       << "# If trac-ticket is set, svndigest will create anchors for\n"
     127       << "# ticket to the Trac page.\n"
     128       << "trac-ticket = " << conf.trac_ticket() << "\n";
     129    os << "# If trac-revision is set, svndigest will create anchors for\n"
     130       << "# revisions to the Trac page.\n"
     131       << "trac-revision = " << conf.trac_revision() << "\n";
     132
    108133    return os;
    109134  }
Note: See TracChangeset for help on using the changeset viewer.