Changeset 1457 for trunk


Ignore:
Timestamp:
Dec 24, 2011, 6:15:56 PM (9 years ago)
Author:
Peter Johansson
Message:

if all copyright worthy revs are set to be ignored, do not touch the file. refs #387

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/CopyrightStats.cc

    r1456 r1457  
    9696    if (line!=config_) {
    9797      std::cout << "cache file is for different configuration.\n"
     98                << "config code in cache file: '" << line << "'\n"
    9899                << "config code: '" << config_ << "'\n"
    99                 << "config code in cache file: '" << line << "'\n"
    100100                << "retrieving statistics from repository.\n";
    101101      return 0;
  • trunk/lib/CopyrightVisitor.cc

    r1456 r1457  
    155155
    156156    CopyrightStats stats(file.path(), ignore_cache_, year2rev_, ignore_revs);
     157    if (stats.map().empty())
     158      return;
    157159    const std::map<int, std::set<std::string> >& year2users = stats.map();
    158160    assert(!year2users.empty());
  • trunk/test/ignore_revs_test.sh

    r1456 r1457  
    6767$GREP "Copyright (C) 2007, 2008 Peter" toy_project/README && exit_fail
    6868
     69run_svncopyright_with_ignore "0-999"
     70$GREP "Copyright (C)" toy_project/README || exit_fail
     71
    6972# test that nonsense argument fails with grace
    7073$SVN revert toy_project -R
Note: See TracChangeset for help on using the changeset viewer.