Changeset 579


Ignore:
Timestamp:
Mar 18, 2008, 3:11:51 PM (13 years ago)
Author:
Peter Johansson
Message:

Merged patch release 0.6.5 to the trunk. Delta 0.6.5 - 0.6.4

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r519 r579  
    44Copyright (C) 2005, 2006 Jari Häkkinen
    55Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6Copyright (C) 2008 Peter Johansson
    67
    78This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    3031  - http://trac.thep.lu.se/svndigest/log/trunk?rev=HEAD&stop_rev=418
    3132  - http://trac.thep.lu.se/svndigest/query?milestone=0.7&order=id
     33
     34version 0.6.5:
     35  - http://trac.thep.lu.se/trac/svndigest/log/branches/0.6-stable?rev=575&stop_rev=491
     36  - http://trac.thep.lu.se/trac/svndigest/query?milestone=0.6.5&order=id
    3237
    3338version 0.6.4:
  • trunk/NEWS

    r547 r579  
    33See the end of this file for copyrights and conditions.
    44
     5<<<<<<< .working
    56Version 0.7 (released DATE)
    67  - configure option --enable-wctests is removed (ticket:295)
     
    1011  http://trac.thep.lu.se/svndigest/query?status=closed&milestone=0.7
    1112
     13=======
     14version 0.6.5 (released 18 March 2008)
     15  - Fixed color bug in blame output (ticket:278)
     16  - Improved error handling when --root parameter is incorrect.
     17
     18  A complete list of closed tickets can be found here [[br]]
     19  http://trac.thep.lu.se/trac/svndigest/query?status=closed&milestone=0.6.5
     20
     21>>>>>>> .merge-right.r578
    1222version 0.6.4 (released 14 October 2007)
    1323  - fixed bug stats were double counted when root was a file (ticket:272)
  • trunk/bin/Parameter.cc

    r544 r579  
    33/*
    44  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    146147    string workdir(pwd()); // remember current working directory (cwd).
    147148
     149    bool root_ok = node_exist(root_) && !access_rights(root_, "r");
     150   
     151    if (root_ok) {
     152      // Check that root_ is a directory
     153      struct stat nodestat;
     154      stat(root_.c_str(), &nodestat);
     155      if (!S_ISDIR(nodestat.st_mode))
     156        throw runtime_error(string("svndigest: accessing `") + root_ +
     157                            "': Not a directory.");
     158    }
     159
    148160    // Checking that root_ exists and retrieve the absolute path to root_
    149     if (chdir(root_.c_str()))
     161    if (!root_ok || chdir(root_.c_str()))
    150162      throw runtime_error(string("svndigest: Root directory (") + root_ +
    151163                          ") access failed.");
    152164    root_ = pwd();
     165
     166     
    153167
    154168    // need to get back to cwd if relative paths are used.
  • trunk/bin/svndigest.cc

    r556 r579  
    33/*
    44  Copyright (C) 2006, 2007 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2008 Peter Johansson
    56
    67  This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    100101  }
    101102  catch (SVNException e) {
    102     std::cerr << "\nsvndigest: " << e.what()
    103               << "\nsvndigest: failed to initilize subversion access for "
    104               << option->root() << std::endl;
     103    std::cerr << "svndigest: " << e.what() << "\n";
    105104    exit(-1);
    106105  }
  • trunk/configure.ac

    r569 r579  
    1313# Copyright (C) 2006 Jari Häkkinen
    1414# Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     15# Copyright (C) 2008 Peter Johansson
    1516#
    1617# This file is part of svndigest, http://trac.thep.lu.se/svndigest
  • trunk/lib/File.cc

    r552 r579  
    3434#include "SVNlog.h"
    3535
     36#include <algorithm>
    3637#include <cassert>
    3738#include <cstdio>
     
    229230    else {
    230231      last = Date(GnuplotFE::instance()->dates().back()).seconds();
    231       first = Date(GnuplotFE::instance()->dates()[0]).seconds();
     232      // earliest date corresponds either to revision 0 or revision 1
     233      first = std::min(Date(GnuplotFE::instance()->dates()[0]).seconds(),
     234                       Date(GnuplotFE::instance()->dates()[1]).seconds());
    232235    }
    233236    // color is calculated linearly on time, c = kt + m
  • trunk/lib/SVN.cc

    r519 r579  
    44  Copyright (C) 2006 Jari Häkkinen
    55  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     6  Copyright (C) 2008 Peter Johansson
    67
    78  This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    9899    // setup, maybe this is unnecessary?
    99100    const char* canonical_path=svn_path_internal_style(path.c_str(), pool_);
    100     if (svn_error_t *err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path,
    101                                           false, -1, context_->cancel_func,
    102                                           context_->cancel_baton, pool_))
     101    if ((err=svn_wc_adm_open3(&adm_access_, NULL, canonical_path,
     102                              false, -1, context_->cancel_func,
     103                              context_->cancel_baton, pool_))){
     104      if (err->apr_err == SVN_ERR_WC_NOT_DIRECTORY)
     105        cleanup_failed_init(err, std::string(err->message), true);
    103106      cleanup_failed_init(err, "SVN: svn_wc_adm_open3 failed");
     107    }
    104108
    105109    // get a session to the repository
    106110    struct root_url_receiver_baton rurb;
    107111    client_info(path, root_url_receiver, static_cast<void*>(&rurb));
    108     if (svn_error_t *err=svn_client_open_ra_session(&ra_session_,
    109                                                     rurb.path.c_str(),
    110                                                     context_, pool_))
     112    if ((err=svn_client_open_ra_session(&ra_session_,
     113                                        rurb.path.c_str(),
     114                                        context_, pool_)))
    111115      cleanup_failed_init(err, "SVN: svn_client_open_ra_session failed");
    112116  }
     
    118122      svn_error_clear(svn_wc_adm_close(adm_access_));
    119123    svn_pool_destroy(pool_);
    120     apr_allocator_destroy(allocator_);
     124    pool_=NULL;
    121125    // other apr resources acquired in svn_cmdline_init are destroyed
    122126    // at program exit, ok since SVN is a singleton
     
    125129
    126130  void SVN::cleanup(svn_error_t *err,apr_pool_t *pool,
    127                     const std::string& message)
    128   {
    129     svn_handle_error2(err,stderr,false,"svndigest: ");
     131                    std::string message, bool mute)
     132  {
     133    if (!mute)
     134      svn_handle_error2(err,stderr,false,"svndigest: ");
    130135    svn_error_clear(err);
    131     if (pool)
     136    if (pool){
    132137      svn_pool_destroy(pool);
     138      pool=NULL;
     139    }
    133140    if (message.length()>0)
    134141      throw SVNException(message);
     
    136143
    137144
    138   void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message)
    139   {
    140     cleanup(err,pool_);
    141     apr_allocator_destroy(allocator_);
     145  void SVN::cleanup_failed_init(svn_error_t *err, const std::string& message,
     146                                bool mute)
     147  {
     148    cleanup(err,pool_, "", true);
    142149    throw SVNException(message);
    143150  }
  • trunk/lib/SVN.h

    r519 r579  
    77  Copyright (C) 2006 Jari Häkkinen
    88  Copyright (C) 2007 Jari Häkkinen, Peter Johansson
     9  Copyright (C) 2008 Peter Johansson
    910
    1011  This file is part of svndigest, http://trac.thep.lu.se/svndigest
     
    211212    ///
    212213    SVN(const SVN&);
     214    SVN& operator=(const SVN&);
    213215
    214216    ///
     
    222224       This function will write an error message to stdout, free \a
    223225       err and \a pool resources. If \a err or \a pool are a NULL
    224        pointers the function will do nothing with these resources.
     226       pointers the function will do nothing with these resources. If
     227       \a mute is true, no error message is written.
    225228
    226229       cleanup will throw a SVNException if \a message has
     
    231234    */
    232235    void cleanup(svn_error_t *err, apr_pool_t *pool,
    233                  const std::string& message=std::string());
     236                 std::string message=std::string(), bool mute=false);
    234237
    235238    /**
     
    243246       @see SVNException
    244247    */
    245     void cleanup_failed_init(svn_error_t *err, const std::string& message);
     248    void cleanup_failed_init(svn_error_t *err, const std::string& message,
     249                             bool mute=false);
    246250
    247251    static SVN* instance_;
Note: See TracChangeset for help on using the changeset viewer.