Changeset 50


Ignore:
Timestamp:
Jan 15, 2006, 1:33:37 AM (16 years ago)
Author:
Jari Häkkinen
Message:

force parameter works, target removed if exist.

Location:
trunk/bin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r49 r50  
    7373              << "  -d [--dir] arg : output target directory [svnstat_output]\n"
    7474              << "  -f [--force]   : remove target directory/file if it exists\n"
    75               << "                   [no force]\n"
     75              << "                   [no force]. NOTE recursive delete.\n"
    7676              << "  -h [--help]    : display this help and exit\n"
    7777              << "  -v [--verbose] : explain what is being done\n"
  • trunk/bin/rmdirhier.h

    r49 r50  
    2525  { DirectoryDeleteError(const std::string& s) : DirectoryError(s) {} };
    2626
    27   void rmdirhier(std::string& path);
     27  void rmdirhier(const std::string& path);
    2828
    2929}} // of namespace svnstat and namespace theplu
  • trunk/bin/svnstat.cc

    r49 r50  
    33#include "Parameter.h"
    44#include "Directory.h"
     5#include "rmdirhier.h"
    56
    67#include <stdexcept>
     
    4849{
    4950  struct stat buf;
    50   if (force && !stat(dir.c_str(),&buf)) {
    51     std::cerr << "Remove item '" << dir << "'."
    52               << std::endl;
    53     std::cerr << unlink(dir.c_str()) << std::endl;
    54   }
     51  if (force && !stat(dir.c_str(),&buf))
     52    theplu::svnstat::rmdirhier(dir);
    5553
    5654  return mkdir(dir.c_str(),0777);
Note: See TracChangeset for help on using the changeset viewer.