Changeset 1357 for trunk


Ignore:
Timestamp:
May 18, 2011, 2:13:45 AM (10 years ago)
Author:
Peter Johansson
Message:

avoid merging (copying) map from svn and map from config together but instead extract data directly from them.

Location:
trunk/lib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/SVNproperty.cc

    r1356 r1357  
    4040    str_map property;
    4141    SVN::instance()->client_proplist(path, property);
     42    add(property.begin(), property.end());
     43    const Configuration& config = Configuration::instance();
     44    const str_map& props = config.svn_properties(file_name(path));
     45    add(props.begin(), props.end());
     46  }
    4247
    43     const Configuration& config = Configuration::instance();
    44     typedef std::map<std::string, std::string> str_map;
    45     const str_map& props = config.svn_properties(file_name(path));
    46     std::map<std::string, std::string>::const_iterator i = props.begin();
    47     std::map<std::string, std::string>::const_iterator e = props.end();
    48     // we can not use map::insert because we want config to have precedence
    49     for ( ; i!=e; ++i)
    50       property[i->first] = i->second;
    51    
    52     i = property.begin();
    53     e = property.end();
    54     for ( ; i!=e ; ++i)
     48
     49  void
     50  SVNproperty::add(std::map<std::string, std::string>::const_iterator i,
     51                   std::map<std::string, std::string>::const_iterator last)
     52  {
     53    for ( ; i!=last ; ++i)
    5554      if (i->first == "svndigest:ignore")
    5655        svndigest_ignore_=true;
  • trunk/lib/SVNproperty.h

    r1356 r1357  
    8787    SVNproperty(const SVNproperty&);
    8888
     89    void add(std::map<std::string, std::string>::const_iterator first,
     90             std::map<std::string, std::string>::const_iterator last);
     91
    8992    bool binary_;
    9093    bool svncopyright_ignore_;
Note: See TracChangeset for help on using the changeset viewer.