Changeset 691 for trunk/bin


Ignore:
Timestamp:
Sep 7, 2008, 7:44:00 PM (13 years ago)
Author:
Peter Johansson
Message:

fixes #350 - also changed test_repo.sh to catch this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/svndigest.cc

    r687 r691  
    106106
    107107  // check if target already exists and behave appropriately
    108   if (option->verbose())
    109     std::cout << "Checking target directory" << std::endl;
     108  bool need_to_erase_target=false;
    110109  std::string target_path=option->targetdir() + '/' + file_name(option->root());
    111   bool need_to_erase_target = node_exist(target_path);
    112   if (need_to_erase_target && !option->force()) {
    113     std::cerr << "svndigest: directory `"
    114               << target_path << "' already exists\n";
    115     exit(-1);
     110  if (option->report()) {
     111    if (option->verbose())
     112      std::cout << "Checking target directory" << std::endl;
     113    need_to_erase_target = node_exist(target_path);
     114    if (need_to_erase_target && !option->force()) {
     115      std::cerr << "svndigest: directory `"
     116                << target_path << "' already exists\n";
     117      exit(-1);
     118    }
    116119  }
    117120
Note: See TracChangeset for help on using the changeset viewer.