Changeset 1220
- Timestamp:
- Oct 13, 2010, 6:10:52 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/Parameter.cc
r1119 r1220 97 97 check_existence(root_.value()); 98 98 check_readable(root_.value()); 99 check_is_dir(root_.value()); 99 100 chdir(root_.value()); 100 101 root_.value(pwd()); … … 116 117 if (S_ISDIR(nodestat.st_mode)) { 117 118 std::stringstream ss; 118 ss << cmd_.program_name() << ": `" << config_file_.value()119 ss << cmd_.program_name() << ": '" << config_file_.value() 119 120 << "' is a directory"; 120 121 throw yat::utility::cmd_error(ss.str()); … … 130 131 return; 131 132 std::stringstream ss; 132 ss << cmd_.program_name() << ": cannot stat `" << path << "': "133 ss << cmd_.program_name() << ": cannot stat '" << path << "': " 133 134 << strerror(errno); 134 135 throw yat::utility::cmd_error(ss.str()); … … 136 137 137 138 139 void Parameter::check_is_dir(std::string path) const 140 { 141 if (node_exist(path)) { 142 struct stat buf; 143 stat(path.c_str(), &buf); 144 if (S_ISDIR(buf.st_mode)) 145 return; 146 } 147 std::stringstream ss; 148 ss << cmd_.program_name() << ": '" << path << "': " 149 << strerror(errno); 150 throw yat::utility::cmd_error(ss.str()); 151 } 152 153 138 154 void Parameter::check_readable(std::string path) const 139 155 { … … 141 157 return; 142 158 std::stringstream ss; 143 ss << cmd_.program_name() << ": cannot open `" << path << "': "159 ss << cmd_.program_name() << ": cannot open '" << path << "': " 144 160 << strerror(errno); 145 161 throw yat::utility::cmd_error(ss.str()); -
trunk/bin/svndigestParameter.cc
r1186 r1220 85 85 std::string save_wd = pwd(); 86 86 87 // check root but not if -g option given88 87 if (!generate_config()) { 89 88 // check target (only if we write report) … … 91 90 check_existence(target_.value()); 92 91 check_readable(target_.value()); 92 check_is_dir(target_.value()); 93 93 std::string base_root = file_name(root()); 94 94 std::string path = concatenate_path(target_.value(),base_root); 95 95 if (access_rights(target_.value(), "w")) { 96 96 std::stringstream ss; 97 ss << "svndigest: cannot create directory `" << path97 ss << "svndigest: cannot create directory '" << path 98 98 << "': " << strerror(errno); 99 99 throw yat::utility::cmd_error(ss.str()); … … 101 101 if (node_exist(path) && !force()) { 102 102 std::stringstream ss; 103 ss << "svndigest: cannot create directory `" << path << "' "103 ss << "svndigest: cannot create directory '" << path << "' " 104 104 << strerror(EEXIST); 105 105 throw yat::utility::cmd_error(ss.str()); -
trunk/lib/File.cc
r1197 r1220 205 205 { 206 206 if (verbose) 207 std::cout << "Parsing " << path_<< std::endl;207 std::cout << "Parsing '" << path_ << "'" << std::endl; 208 208 stats_.reset(); 209 209 std::string cache_dir = directory_name(path()) + std::string(".svndigest/"); … … 343 343 return; 344 344 if (verbose) 345 std::cout << "Updating copyright in " << path_<< std::endl;345 std::cout << "Updating copyright in '" << path_ << "'" << std::endl; 346 346 update_copyright(new_block, start_line, end_line); 347 347 } -
trunk/lib/Node.cc
r1186 r1220 203 203 return; 204 204 if (verbose) 205 std::cout << "Printing output for " << path_<< std::endl;205 std::cout << "Printing output for '" << path_ << "'" << std::endl; 206 206 const SVNlog& log = this->log(); 207 207 typedef std::map<std::string, Stats*>::const_iterator iter; -
trunk/test/Makefile.am
r1187 r1220 39 39 distributed_TESTS += config3_test.sh 40 40 distributed_TESTS += copyright2_test.sh 41 distributed_TESTS += error_test.sh 41 42 distributed_TESTS += repo_status_test.sh 42 43 distributed_TESTS += repo_test.sh -
trunk/test/cmd_format_test.sh
r1092 r1220 27 27 SVNDIGEST_run 1 -f --format=banana 28 28 test -s stderr || exit_fail 29 grep'invalid argument.*banana.*format' stderr || exit_fail29 $GREP 'invalid argument.*banana.*format' stderr || exit_fail 30 30 31 31 SVNDIGEST_run 0 -g --format=svg --anchor-format=svg 32 grep'format = svg' stdout || exit_fail33 grep'anchor_format = svg' stdout || exit_fail32 $GREP 'format = svg' stdout || exit_fail 33 $GREP 'anchor_format = svg' stdout || exit_fail 34 34 35 35 exit_success; -
trunk/test/config2_test.sh
r1092 r1220 36 36 37 37 SVNDIGEST_run 1 -g --config-file tmp_config 38 grep'unknown format.* apple' stderr || exit_fail38 $GREP 'unknown format.* apple' stderr || exit_fail 39 39 40 40 exit_success -
trunk/test/config3_test.sh
r1092 r1220 28 28 SVNDIGEST_run 0 -g --config-file /dev/null 29 29 SVNDIGEST_run 1 -g --config-file . 30 grep'is a directory' stderr || exit_fail30 $GREP 'is a directory' stderr || exit_fail 31 31 32 32 exit_success -
trunk/test/init.sh.in
r1153 r1220 54 54 test -z "$srcdir" && srcdir="@srcdir@"; 55 55 test -z "$SVN" && SVN=svn; 56 test -z "$GREP" && GREP=@GREP@; 56 57 57 58 # some helpful derived variables -
trunk/test/svncopyright_test.sh
r1092 r1220 31 31 done 32 32 33 $SVNCOPYRIGHT --version | head -n 1 | grepsvncopyright || exit_fail33 $SVNCOPYRIGHT --version | head -n 1 | $GREP svncopyright || exit_fail 34 34 35 35 exit_success
Note: See TracChangeset
for help on using the changeset viewer.