Changeset 1508
- Timestamp:
- Aug 31, 2012, 1:22:43 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/CacheCopyer.cc
r1449 r1508 32 32 #include <string> 33 33 34 #include <iostream> 35 34 36 namespace theplu { 35 37 namespace svndigest { … … 40 42 41 43 42 bool CacheCopyer::enter(Directory& dir) 44 void 45 CacheCopyer::copy(const std::string& src, const std::string& trg_dir) const 46 { 47 if (!node_exist(src)) 48 return; 49 if (access_rights(src, "r")) 50 throw yat::utility::errno_error("'" + src + "': "); 51 std::string target_file = 52 concatenate_path(trg_dir, file_name(src)); 53 54 if (verbose_) 55 std::cout << src << " -> " << target_file << "\n"; 56 copy_file(src, target_file); 57 } 58 59 60 bool CacheCopyer::enter(Directory& dir) 43 61 { 44 62 if (dir.svndigest_ignore() && dir.svncopyright_ignore()) … … 52 70 return true; 53 71 } 54 55 72 56 void CacheCopyer::leave(Directory& dir) 73 74 void CacheCopyer::leave(Directory& dir) 57 75 { 58 76 } 59 77 60 78 61 79 void CacheCopyer::visit(File& file) … … 64 82 return; 65 83 std::string src_file = file.cache_name(); 66 if (!node_exist(src_file)) 67 return; 68 if (access_rights(src_file, "r")) 69 throw yat::utility::errno_error(src_file + ": "); 70 std::string target_file = 71 concatenate_path(target_, directory_name(file.local_path())); 72 target_file = concatenate_path(target_file, 73 ".svndigest/"+file_name(src_file)); 74 if (verbose_) 75 std::cout << src_file << " -> " << target_file << "\n"; 76 copy_file(src_file, target_file); 84 85 std::string target_dir = 86 concatenate_path(target_, 87 directory_name(file.local_path())+"/.svndigest"); 88 89 if (!file.svndigest_ignore()) 90 copy(src_file, target_dir); 91 92 replace(src_file, "svndigest-cache", "svncopyright-cache"); 93 if (!file.svncopyright_ignore()) 94 copy(src_file, target_dir); 95 77 96 } 78 97 -
trunk/lib/CacheCopyer.h
r1293 r1508 52 52 53 53 /** 54 Updating copyright in \a file 54 Updating copyright in \a file 55 55 */ 56 56 void visit(File& file); 57 57 58 58 private: 59 void copy(const std::string& src, const std::string& trg_dir) const; 60 59 61 std::string target_; 60 62 bool verbose_; -
trunk/test/Makefile.am
r1506 r1508 64 64 65 65 # tests not yet passing are listed here 66 XFAIL_TESTS = svndigest_copy_cache_test2.sh66 XFAIL_TESTS = 67 67 68 68 noinst_HEADERS = Suite.h
Note: See TracChangeset
for help on using the changeset viewer.