Hello community, here is the log from the commit of package limal checked in at Tue Mar 28 17:02:48 CEST 2006. -------- --- /work/SRC/all/limal/limal.changes 2006-03-02 14:04:00.000000000 +0100 +++ /work/src/done/STABLE/limal/limal.changes 2006-03-28 15:42:51.000000000 +0200 @@ -1,0 +2,10 @@ +Tue Mar 28 15:17:38 CEST 2006 - mc@suse.de + +- version 1.1.6 +- Fixed PathName::PathName( const PathName::List &list ); and + PathName::List toList() const; to implement a consistent behaviour + concerning a drive prefix.[#161329] +- Documentation added. +- Test case and out file adapted. + +------------------------------------------------------------------- Old: ---- limal-1.1.5.tar.bz2 New: ---- limal-1.1.6.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ limal.spec ++++++ --- /var/tmp/diff_new_pack.Euw2Nb/_old 2006-03-28 17:01:20.000000000 +0200 +++ /var/tmp/diff_new_pack.Euw2Nb/_new 2006-03-28 17:01:20.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package limal (Version 1.1.5) +# spec file for package limal (Version 1.1.6) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine @@ -12,12 +12,12 @@ Name: limal URL: http://forge.novell.com/modules/xfmod/project/?limal -Version: 1.1.5 +Version: 1.1.6 Release: 1 License: GPL Group: Development/Languages/C and C++ BuildRoot: %{_tmppath}/%{name}-%{version}-build -Source0: limal-1.1.5.tar.bz2 +Source0: limal-1.1.6.tar.bz2 prefix: /usr %define swiglibdir %(swig -swiglib) #!BuildIgnore: limal limal-devel limal-perl @@ -52,7 +52,7 @@ %prep -%setup -n limal-1.1.5 +%setup -n limal-1.1.6 %build %{prefix}/bin/limaltool limalautoconf @@ -103,6 +103,13 @@ %{perl_vendorarch}/*.pm %changelog -n limal +* Tue Mar 28 2006 - mc@suse.de +- version 1.1.6 +- Fixed PathName::PathName( const PathName::List &list ); and + PathName::List toList() const; to implement a consistent behaviour + concerning a drive prefix.[#161329] +- Documentation added. +- Test case and out file adapted. * Thu Mar 02 2006 - mc@suse.de - version 1.1.5 - move INIParser to limal-ca-mgm (privat) ++++++ limal-1.1.5.tar.bz2 -> limal-1.1.6.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/VERSION new/limal-1.1.6/VERSION --- old/limal-1.1.5/VERSION 2006-03-02 13:02:53.000000000 +0100 +++ new/limal-1.1.6/VERSION 2006-03-28 15:18:02.000000000 +0200 @@ -1 +1 @@ -1.1.5 +1.1.6 diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/configure new/limal-1.1.6/configure --- old/limal-1.1.5/configure 2006-03-02 13:09:33.000000000 +0100 +++ new/limal-1.1.6/configure 2006-03-28 15:19:09.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for limal 1.1.5. +# Generated by GNU Autoconf 2.59 for limal 1.1.6. # # Report bugs to <http://www.suse.de/feedback>. # @@ -423,8 +423,8 @@ # Identity of this package. PACKAGE_NAME='limal' PACKAGE_TARNAME='limal' -PACKAGE_VERSION='1.1.5' -PACKAGE_STRING='limal 1.1.5' +PACKAGE_VERSION='1.1.6' +PACKAGE_STRING='limal 1.1.6' PACKAGE_BUGREPORT='http://www.suse.de/feedback' ac_unique_file="RPMNAME" @@ -971,7 +971,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures limal 1.1.5 to adapt to many kinds of systems. +\`configure' configures limal 1.1.6 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1038,7 +1038,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of limal 1.1.5:";; + short | recursive ) echo "Configuration of limal 1.1.6:";; esac cat <<\_ACEOF @@ -1184,7 +1184,7 @@ test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -limal configure 1.1.5 +limal configure 1.1.6 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1198,7 +1198,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by limal $as_me 1.1.5, which was +It was created by limal $as_me 1.1.6, which was generated by GNU Autoconf 2.59. Invocation command line was $ $0 $@ @@ -1928,7 +1928,7 @@ # Define the identity of the package. PACKAGE='limal' - VERSION='1.1.5' + VERSION='1.1.6' cat >>confdefs.h <<_ACEOF @@ -2139,7 +2139,7 @@ -VERSION="1.1.5" +VERSION="1.1.6" RPMNAME="limal" RPMARCH="" RPMLIB="limal" @@ -21760,7 +21760,7 @@ } >&5 cat >&5 <<_CSEOF -This file was extended by limal $as_me 1.1.5, which was +This file was extended by limal $as_me 1.1.6, which was generated by GNU Autoconf 2.59. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -21823,7 +21823,7 @@ cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -limal config.status 1.1.5 +limal config.status 1.1.6 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/configure.in new/limal-1.1.6/configure.in --- old/limal-1.1.5/configure.in 2006-03-02 13:09:20.000000000 +0100 +++ new/limal-1.1.6/configure.in 2006-03-28 15:18:57.000000000 +0200 @@ -3,7 +3,7 @@ dnl -- This file is generated by limalautoconf - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(limal, 1.1.5, http://www.suse.de/feedback, limal) +AC_INIT(limal, 1.1.6, http://www.suse.de/feedback, limal) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -17,7 +17,7 @@ AM_INIT_AUTOMAKE(tar-ustar) dnl searches for some needed programs dnl Important LiMaL variables -VERSION="1.1.5" +VERSION="1.1.6" RPMNAME="limal" RPMARCH="" RPMLIB="limal" diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/src/PathName.cpp new/limal-1.1.6/src/PathName.cpp --- old/limal-1.1.5/src/PathName.cpp 2006-02-03 13:25:28.000000000 +0100 +++ new/limal-1.1.6/src/PathName.cpp 2006-03-28 15:11:35.000000000 +0200 @@ -340,8 +340,15 @@ "invalid drive letter prefix in pathname list"); } drive = *item; - item++; } + else + if( !item->empty() ) + { + BLOCXX_THROW( limal::ValueException, + "first component has to be empty or contain a drive letter prefix" + ); + } + item++; DirStack stack; try @@ -408,13 +415,18 @@ PathName::List PathName::toList() const { + PathName::List list; if( m_name.empty()) - return PathName::List(); + return list; + list.push_back( prefix() ); + DirStack stack; + stack.split(m_name.c_str() + m_prefix); - - return stack.getPathList(); + PathName::List temp( stack.getPathList() ); + list.insert( list.end(), temp.begin(), temp.end() ); + return list; } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/src/limal/PathName.hpp new/limal-1.1.6/src/limal/PathName.hpp --- old/limal-1.1.5/src/limal/PathName.hpp 2006-03-02 10:42:01.000000000 +0100 +++ new/limal-1.1.6/src/limal/PathName.hpp 2006-03-28 15:11:35.000000000 +0200 @@ -36,7 +36,6 @@ /** * @file PathName.hpp * @brief LiMaL path name manipulation utilities. - * @todo Review and document this file/classes. */ #ifndef LIMAL_PATH_PATHNAME_HPP #define LIMAL_PATH_PATHNAME_HPP @@ -68,6 +67,7 @@ /** * @brief Create an empty PathName object. + * */ PathName(); @@ -80,7 +80,8 @@ /** * @brief Create a new PathName object from a PathName::List. * @param list The PathName::List from which the new PathName - * object shall be created. + * object shall be created. The first element of this List has + * to be a prefix, or if there is no prefix an empty string. * @throws limal::ValueException */ PathName(const PathName::List &list); @@ -105,7 +106,7 @@ */ virtual ~PathName(); - /** + /** * @brief Assigns <b>path</b> to this PathName object and returns a * reference to it. * @@ -113,16 +114,17 @@ * @return A reference to this PathName object. */ PathName & operator= (const PathName &path); - + /** * @brief Appends <b>path</b> to this PathName object and * a reference to it. * * @param path The PathName object that is to be appended. + * * @return A reference to this PathName object. - */ + */ PathName & operator+=(const PathName &path); - + /** * @brief Returns the complete path this PathName object holds. * @@ -131,11 +133,13 @@ blocxx::String toString() const; /** - * @brief Returns the complete path this PathName object holds, as - * a PathName::List + * @brief Returns the path this PathName object holds, as + * a PathName::List. The first element of that list is + * either the prefix, or, if there is no drive prefix it's an + * empty string. * * @return The complete path this PathName object holds, as - * a PathName::List + * a PathName::List. * * @throws limal::ValueException */ @@ -304,7 +308,7 @@ PathName cat(const PathName &add) const; /** - * @brief Create a new PathName object by concatenating to existing + * @brief Create a new PathName object by concatenating two existing * ones. * * Static function for concatenating two PathName objects. @@ -323,8 +327,27 @@ */ static PathName cat(const PathName &path, const PathName &add); - + /** + * @brief Create a new PathName object by extending <b>this</b> PathName + * object by <b>ext</b>. + * + * Use this function to create a new PathName object that consists of + * <b>this</b> PathName object extended by the string <b>ext</b>. Basically it just + * glues the two strings together and calls PathName( const blocxx::String ) + * For Example: + * + * @code + * PathName p1("/foo"); + * blocxx::String strExt(".old"); + * std::cout << p1.extend( strExt ); // == "/foo.old" + * @endcode + * + * @param ext Reference to a blocxx::String containing the extension. + * @return A new PathName object that consists of <b>path</b> extended by + * <b>ext</b>. + */ PathName extend(const blocxx::String &ext) const; + /** * @brief Create a new PathName object by extending <b>path</b> by * <b>ext</b>. @@ -336,8 +359,8 @@ * * @code * PathName p1("/foo"); - * blocxx::String strExt("/bar/some_file"); - * std::cout << PathName::extend(p1, strExt ); // == "/foo/bar/some_file" + * blocxx::String strExt(".old"); + * std::cout << PathName::extend(p1, strExt ); // == "/foo.old" * @endcode * * @param path Reference to a PathName object that is to be extended. diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/testsuite/pathname_test.cc new/limal-1.1.6/testsuite/pathname_test.cc --- old/limal-1.1.5/testsuite/pathname_test.cc 2006-02-07 17:00:29.000000000 +0100 +++ new/limal-1.1.6/testsuite/pathname_test.cc 2006-03-28 15:11:35.000000000 +0200 @@ -115,6 +115,28 @@ cout << tstPath <<" -> /foo/some_file" << endl; } + cout << "Testing for correct prefix handling...\n"; + PathName::List p1List; + p1List.push_back( String( "foo" ) ); + p1List.push_back( String( "bar" ) ); + try{ + PathName pTmp( p1List ); + } + catch( ... ){ + cout << "Ok, caught exception when trying to construct a PathName" + << "from list not starting with prefix\n"; + } + + p1List = PathName( String( "c:/foo/bar" ) ).toList(); + try{ + PathName pTmp( p1List ); + } + catch( ... ){ + cout << "Error caught when trying to construct a PathName " + << "from list _starting_ with prefix\n"; + } + + cout << "=================" << endl; diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/limal-1.1.5/testsuite/single.out/pathname_test.out new/limal-1.1.6/testsuite/single.out/pathname_test.out --- old/limal-1.1.5/testsuite/single.out/pathname_test.out 2006-02-03 13:25:28.000000000 +0100 +++ new/limal-1.1.6/testsuite/single.out/pathname_test.out 2006-03-28 15:11:35.000000000 +0200 @@ -11,5 +11,7 @@ ================= Testing for correct path cleansing...succeeded /./foo/bar/../some_file -> /foo/some_file +Testing for correct prefix handling... +Ok, caught exception when trying to construct a PathNamefrom list not starting with prefix ================= DONE ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...
participants (1)
-
root@suse.de