You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Matthew Baker <mb...@itrsgroup.com> on 2005/06/22 12:17:32 UTC

bug: svn info [great [great [great]] grand] parent directory paths

I've had a search and I can't find an issue dealing with this.  If it's
been mentioned already then I'm sorry...

svn info doesn't seem to behave properly when multiple ../ are used.  It
also behaves differently on windows and unix (Solaris)

Examples follow:

I have omitted everything but the path svn info reports to save space.
If you need any more info or can't reproduce it then let me know.

Cheers,

Matt.


------------------------------
Windows 2000 svn, version 1.2.0 (r14790) using installer
------------------------------

C:\Geneos\Development\Source\EMF2\netprobe>svn info .
Path: .

C:\Geneos\Development\Source\EMF2\netprobe>svn info ../..
Path: ..\..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ../../..
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\
Path: ..\..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\..
Path: ..\..

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\..\..
Path: ..

C:\Geneos\Development\Source\EMF2\netprobe>svn info
..\..\..\..\..\..\..\..
Path: ..\..

C:\Geneos\Development\Source\EMF2\netprobe>svn --version
svn, version 1.2.0 (r14790)
   compiled May 22 2005, 22:40:26


------------------------------
Solaris 2.6 svn, version 1.2.0 (r14790) built from 1.2.0 tarball
------------------------------

itrsultra10% svn info .
Path: .

itrsultra10% svn info ..
Path: ..

itrsultra10% svn info ../..
Path: ../..

itrsultra10% svn info ../../../
svn: Path '../../..' ends in '..', which is unsupported for this
operation
itrsultra10% svn info ../../..
svn: Path '../../..' ends in '..', which is unsupported for this
operation
itrsultra10% svn info ../../../../
svn: Path '../../../..' ends in '..', which is unsupported for this
operation
itrsultra10% svn info ../../../../../
svn: Path '../../../../..' ends in '..', which is unsupported for this
operation
itrsultra10% svn --version
svn, version 1.2.0 (r14790)
   compiled May 26 2005, 15:57:04




Matt Baker

ITRS Group PLC
231 Shoreditch High Street 
London
E1 6PJ 
United Kingdom 

Phone: +44 (0) 20 7377 5156 
Fax: +44 (0) 20 7375 1096 
Web: http://www.itrsgroup.com/

Internet communications are not secure and therefore the ITRS Group does
not accept legal responsibility for the contents of this message. Any
views or opinions presented are solely those of the author and do not
necessarily represent those of the ITRS Group unless otherwise
specifically stated.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


RE: bug: svn info [great [great [great]] grand] parent directory paths

Posted by Matthew Baker <mb...@itrsgroup.com>.
> > svn info doesn't seem to behave properly when multiple ../ are used.  
> > It also behaves differently on windows and unix (Solaris)
>
> I don't have a Windows box to test those suspicious-looking Windows
problems
> on.  As for Unix, the problem seems to be just a very poor (outright
> inaccurate) error message:

Sorry, yes - the different behavior seems to be that on Unix the error
message is wrong (see short example below) but that on Windows the behavior
seems to be incorrect - the parent directory paths seem to operate where if
it's an even number of ../ then it evaluates to ../.. and if it's an odd
number then it evaluates to .. (see example 2 below)

The two examples here show the effects better than my last examples.

> The Unix problems could get filed as an error-message issue; would you
like
> to do that?  Just point to this thread if you do.

Where would I do that?  I would like to do it myself because I'd like to
become more involved in Subversion as I think it's an excellent program (I
had to evaluate it for work and after a few hours playing went home and
replaced my CVS installation with it for my own projects).  I'm a
c/c++/java/php programmer.

Hopefully the windows people will indicate whether they have seen this
behavior before

Cheers,

Matt.


------------------------------
Solaris 2.6 svn, version 1.2.0 (r14790) built from 1.2.0 tarball
------------------------------

Example of:
svn info ../../../../.. gives an cryptic message, but cd to that dir and do
svninfo . and you get a sensible message.

------

itrsultra10% pwd
/export/share/mbaker/geneos/EMF2/webslinger/build/solaris
itrsultra10% svn info ../../../../..
svn: Path '../../../../..' ends in '..', which is unsupported for this
operation
itrsultra10% cd ../../../../..
itrsultra10% svn info .
svn: '.' is not a working copy


------------------------------
Windows 2000 svn, version 1.2.0 (r14790) using installer
------------------------------

Example of:
svn info ../(repeated an even number evaluating to ../..
svn info ../(repeated an odd number evaluating to ..
All dirs involved are under source control and the same branch.

------

Proving dirs are working copies:

C:\Geneos\Development\Source\EMF2\netprobe>svn info .
Path: .
URL: svn://repos/Geneos/Dev/version/Development/Source/EMF2/netprobe

C:\Geneos\Development\Source\EMF2\netprobe>cd ..

C:\Geneos\Development\Source\EMF2>svn info .
Path: .
URL: svn://repos/Geneos/Dev/version/Development/Source/EMF2

C:\Geneos\Development\Source\EMF2>cd ..

C:\Geneos\Development\Source>svn info .
Path: .
URL: svn://repos/Geneos/Dev/version/Development/Source

C:\Geneos\Development\Source>cd ..

C:\Geneos\Development>svn info .
Path: .
URL: svn://repos/Geneos/Dev/version/Development

C:\Geneos\Development>cd ..

C:\Geneos>svn info .
Path: .
URL: svn://repos/Geneos/Dev/version

------

Seeing the behavior:

C:\Geneos\Development\Source\EMF2\netprobe>svn info ..
Path: ..
URL: svn://repos/Geneos/Dev/version/Development/Source/EMF2

C:\Geneos\Development\Source\EMF2\netprobe>svn info ../..
Path: ..\..
URL: svn://repos/Geneos/Dev/version/Development/Source

C:\Geneos\Development\Source\EMF2\netprobe>svn info ../../..
Path: ..
URL: svn://repos/Geneos/Dev/version/Development/Source/EMF2

C:\Geneos\Development\Source\EMF2\netprobe>svn info ../../../..
Path: ..\..
URL: svn://repos/Geneos/Dev/version/Development/Source



Matt Baker

ITRS Group PLC
231 Shoreditch High Street 
London
E1 6PJ 
United Kingdom 

Phone: +44 (0) 20 7377 5156 
Fax: +44 (0) 20 7375 1096 
Web: http://www.itrsgroup.com/

Internet communications are not secure and therefore the ITRS Group does not
accept legal responsibility for the contents of this message. Any views or
opinions presented are solely those of the author and do not necessarily
represent those of the ITRS Group unless otherwise specifically stated.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug: svn info [great [great [great]] grand] parent directory paths

Posted by kf...@collab.net.
"Matthew Baker" <mb...@itrsgroup.com> writes:
> I've had a search and I can't find an issue dealing with this.  If it's
> been mentioned already then I'm sorry...
> 
> svn info doesn't seem to behave properly when multiple ../ are used.  It
> also behaves differently on windows and unix (Solaris)
> 
> Examples follow:
> 
> I have omitted everything but the path svn info reports to save space.
> If you need any more info or can't reproduce it then let me know.

I don't have a Windows box to test those suspicious-looking Windows
problems on.  As for Unix, the problem seems to be just a very poor
(outright inaccurate) error message:

   $ echo "Running experiment in:"; pwd; echo "";  \
        for path in                                \
               .                                   \
               ../..                               \
               ..                                  \
               ../../..                            \
               ../../..                            \
               ../../../                           \
               ../../../../                        \
               ../../../../../                     \
               ../../../../../..                   \
               ../../../../../../..                \
               ../../../../../../../..;            \
         do                                        \
           echo "Trying '${path}'";                \
           svn info ${path} | grep "Path: ";       \
           echo "";                                \
         done

...gives this output:

   Running experiment in:
   /home/kfogel/src/subversion/subversion/bindings/swig/perl
   
   Trying '.'
   Path: .
   
   Trying '../..'
   Path: ../..
   
   Trying '..'
   Path: ..
   
   Trying '../../..'
   Path: ../../..
   
   Trying '../../..'
   Path: ../../..
   
   Trying '../../../'
   Path: ../../..
   
   Trying '../../../../'
   Path: ../../../..
   
   Trying '../../../../../'
   subversion/libsvn_wc/lock.c:277: (apr_err=155022)
   svn: Path '../../../../..' ends in '..', \
        which is unsupported for this operation
   
   Trying '../../../../../..'
   Path: ../../../../../..
   
   Trying '../../../../../../..'
   subversion/libsvn_wc/lock.c:277: (apr_err=155022)
   svn: Path '../../../../../../..' ends in '..', \
        which is unsupported for this operation
   
   Trying '../../../../../../../..'
   subversion/libsvn_wc/lock.c:277: (apr_err=155022)
   svn: Path '../../../../../../../..' ends in '..', \
        which is unsupported for this operation

Those errors are all for directories that are not under version
control, or at any rate are disjoint from the current directory.
Notice that there's an intermediate one ("../../../../../..") that
succeeds, even though the ones around it error.  That's because
"/home/kfogel" is indeed under version control :-)

I'm not sure what to do about those Windows problems, except hope that
a Windows person has time/energy to debug.  The Unix problems could
get filed as an error-message issue; would you like to do that?  Just
point to this thread if you do.

Thanks,
-Karl

> ------------------------------
> Windows 2000 svn, version 1.2.0 (r14790) using installer
> ------------------------------
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info .
> Path: .
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ../..
> Path: ..\..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ../../..
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\
> Path: ..\..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\..
> Path: ..\..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info ..\..\..\..\..\..\..
> Path: ..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn info
> ..\..\..\..\..\..\..\..
> Path: ..\..
> 
> C:\Geneos\Development\Source\EMF2\netprobe>svn --version
> svn, version 1.2.0 (r14790)
>    compiled May 22 2005, 22:40:26
> 
> 
> ------------------------------
> Solaris 2.6 svn, version 1.2.0 (r14790) built from 1.2.0 tarball
> ------------------------------
> 
> itrsultra10% svn info .
> Path: .
> 
> itrsultra10% svn info ..
> Path: ..
> 
> itrsultra10% svn info ../..
> Path: ../..
> 
> itrsultra10% svn info ../../../
> svn: Path '../../..' ends in '..', which is unsupported for this
> operation
> itrsultra10% svn info ../../..
> svn: Path '../../..' ends in '..', which is unsupported for this
> operation
> itrsultra10% svn info ../../../../
> svn: Path '../../../..' ends in '..', which is unsupported for this
> operation
> itrsultra10% svn info ../../../../../
> svn: Path '../../../../..' ends in '..', which is unsupported for this
> operation
> itrsultra10% svn --version
> svn, version 1.2.0 (r14790)
>    compiled May 26 2005, 15:57:04
> 
> 
> 
> 
> Matt Baker
> 
> ITRS Group PLC
> 231 Shoreditch High Street 
> London
> E1 6PJ 
> United Kingdom 
> 
> Phone: +44 (0) 20 7377 5156 
> Fax: +44 (0) 20 7375 1096 
> Web: http://www.itrsgroup.com/
> 
> Internet communications are not secure and therefore the ITRS Group does
> not accept legal responsibility for the contents of this message. Any
> views or opinions presented are solely those of the author and do not
> necessarily represent those of the ITRS Group unless otherwise
> specifically stated.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org