Changeset 1464 for branches/0.9-stable


Ignore:
Timestamp:
Mar 11, 2012, 8:20:18 AM (9 years ago)
Author:
Peter Johansson
Message:

closes #512

Location:
branches/0.9-stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/0.9-stable/lib/Directory.cc

    r1266 r1464  
    33/*
    44  Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Jari Häkkinen, Peter Johansson
     5  Copyright (C) 2012 Peter Johansson
    56
    67  This file is part of svndigest, http://dev.thep.lu.se/svndigest
     
    2930#include "NodeVisitor.h"
    3031#include "SVN.h"
     32#include "SVNinfo.h"
    3133#include "SVNlog.h"
    3234#include "TinyStats.h"
     
    7476
    7577    SVN* svn=SVN::instance();
     78    std::string mother_url = SVNinfo(path).url();
     79    assert(mother_url.size());
     80    // ensure trailing trailing '/'
     81    if (mother_url[mother_url.size()-1]!='/')
     82      mother_url.push_back('/');
    7683    for (list<string>::iterator i=entries.begin(); i!=entries.end(); ++i)
    7784      if ((*i)!=string(".") && (*i)!=string("..") && (*i)!=string(".svn")) {
     
    8188          struct stat nodestat;                // C api from sys/stat.h
    8289          lstat(fullpath,&nodestat);   // C api from sys/stat.h
    83           if (S_ISDIR(nodestat.st_mode))       // C api from sys/stat.h
     90          if (S_ISDIR(nodestat.st_mode)) {     // C api from sys/stat.h
     91            // ignore directory if it is not a daughter of 'path' in repo
     92            std::string url = SVNinfo(fullpath).url();
     93            if (mother_url != directory_name(url))
     94              continue;
    8495            daughters_.push_back(new Directory(level_+1,fullpath,local_path()));
     96          }
    8597          else
    8698            daughters_.push_back(new File(level_,fullpath,local_path()));
  • branches/0.9-stable/test/Makefile.am

    r1461 r1464  
    5959
    6060# tests not yet passing are listed here
    61 XFAIL_TESTS = traverse_test.sh
     61XFAIL_TESTS =
    6262
    6363noinst_HEADERS = Suite.h
  • branches/0.9-stable/test/traverse_test.sh

    r1461 r1464  
    4949
    5050$SVN log $rootdir/$daughter
    51 SVNCOPYRIGHT_run 0 -v -r $rootdir/.svndigest
    52 $GREP "^Parsing.*$rootdir" stdout || exit_fail
     51SVNCOPYRIGHT_run 0 -v -r $rootdir
     52$GREP "^Parsing.*$rootdir/.svndigest" stdout || exit_fail
    5353$GREP "^Parsing.*$rootdir/$daughter" stdout && exit_fail
    5454
Note: See TracChangeset for help on using the changeset viewer.