Changeset 198 for trunk/bin


Ignore:
Timestamp:
Sep 9, 2006, 12:04:27 PM (15 years ago)
Author:
Peter Johansson
Message:

refs #36 optionally a copyright information, based on Stats, can be displayed using --copyright flag. This will flag will be added to usage output when this feature is mature.

Location:
trunk/bin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/bin/Parameter.cc

    r180 r198  
    4242      if (myargv=="-f" || myargv=="--force"){
    4343          force_=true;
     44          ok=true;
     45      }
     46      if (myargv=="--copyright"){
     47          copyright_=true;
    4448          ok=true;
    4549      }
     
    122126  void Parameter::defaults(void)
    123127  {
     128    copyright_=false;
    124129    force_=false;
    125130    revisions_=false;
  • trunk/bin/Parameter.h

    r165 r198  
    3434  public:
    3535    Parameter(const int argc,const char *argv[]);
     36    inline bool copyright(void) const { return copyright_; }
    3637    inline bool force(void) const { return force_; }
    3738    inline bool revisions(void) const { return revisions_; }
     
    4849    void version(void) const;
    4950
     51    bool copyright_;
    5052    bool force_;
    5153    bool revisions_;
  • trunk/bin/svndigest.cc

    r196 r198  
    3030#include "SVN.h"
    3131#include "SVNinfo.h"
     32#include "utility.h"
    3233
    3334#include <iostream>
     
    143144    std::cerr << "svndigest: " << x.what() << std::endl;
    144145  }
     146 
     147  if (option->copyright()){
     148    try {
     149      tree.print_copyright(commit_dates);
     150    }
     151    catch (const std::runtime_error& x) {
     152      std::cerr << "svndigest: " << x.what() << std::endl;
     153    }
     154  }
     155
    145156  if (option->verbose())
    146157    std::cout << "Finalizing" << std::endl;
Note: See TracChangeset for help on using the changeset viewer.