Changeset 130
- Timestamp:
- Aug 2, 2006, 8:46:27 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bin/svnstat.cc
r129 r130 86 86 87 87 // check if target already exists and behave appropriately 88 if (option->force()){ 89 std::string root_path(option->targetdir()+'/'+file_name(option->root())); 90 struct stat buf; 91 if (!stat(root_path.c_str(),&buf)){ 88 std::string root_path(option->targetdir()+'/'+file_name(option->root())); 89 struct stat buf; 90 if (!stat(root_path.c_str(),&buf)) 91 // root_path already exists 92 if (option->force()) { 93 // force true -> removal of root_path 92 94 if (option->verbose()) 93 95 std::cout << "rm -rf " << root_path << "\n"; 94 96 rmdirhier(root_path); 95 97 } 96 } 97 else { 98 struct stat buf; 99 std::string root_path(option->targetdir()+'/'+file_name(option->root())); 100 if (!stat(root_path.c_str(),&buf)){ 98 else { 99 // force false -> exit 101 100 std::cerr << "\nsvnstat: " << root_path << ": directory already exists" 102 101 << std::endl; 103 102 exit(-1); 104 103 } 105 }106 104 107 105 if (!option->revisions())
Note: See TracChangeset
for help on using the changeset viewer.