Bug#384042: svn list file:///repo/no-longer-existing-dir does not work

2006-08-21 Thread Richard Atterer
Package: subversion
Version: 1.3.2-5
Severity: minor

Hello,

If I have a repository at /tmp/repo, then listing its complete contents at 
any point in time is possible via svn list -R file:///repo.

However, if I only want to list the contents of /dir inside the repository 
with svn list file:///repo/dir, I run into trouble if /dir no longer 
exists ***in the most recent revision***. Specifying an earlier revision 
using the -r switch does not change this. Here is a complete example (Output 
of uninteresting commands not included):


$ svnadmin create /tmp/repo
$ svn co file:///tmp/repo/ /tmp/checkout
$ cd /tmp/checkout
$ mkdir a
$ date a/x
$ svn add a
$ svn ci -m  a
Adding a
Adding a/x
Transmitting file data .
Committed revision 1.
$ svn mv a b
$ svn ci -m 
Deleting   a
Adding b

Committed revision 2.
$ svn list -r 1 -R file:///tmp/repo/
a/
a/x
$ svn list -r 1 -R file:///tmp/repo/a
svn: File not found: revision 2, path '/a'


IMHO the last command should work, it should output a single line saying x. 
The error message File not found: revision 2, path '/a' is weird, as I'm 
explicitly telling it to look at revision 1, not 2.

For the current revision, everything works as expected:
$ svn list -r 2 -R file:///tmp/repo/b
x

FWIW, svnlook tree -r1 /tmp/repo /a works just fine.

Cheers,

  Richard


-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.20
Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages subversion depends on:
ii  libapr0   2.0.55-4   the Apache Portable Runtime
ii  libc6 2.3.6-15   GNU C Library: Shared libraries
ii  libsvn0   1.3.2-5Shared libraries used by Subversio

subversion recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#384042: svn list file:///repo/no-longer-existing-dir does not work

2006-08-21 Thread Peter Samuelson

[Richard Atterer]
 However, if I only want to list the contents of /dir inside the
 repository with svn list file:///repo/dir, I run into trouble if
 /dir no longer exists ***in the most recent revision***. Specifying
 an earlier revision using the -r switch does not change this. Here is
 a complete example (Output of uninteresting commands not included):

This is correct behavior.  The -rNNN flag means take the target at the
HEAD revision, and trace its history back to revision NNN, which may be
a different name and location.  In your case, of course, this fails
because the target does not exist at the HEAD revision.

What you want instead is the @ notation, called a peg revision.  This
replaces HEAD in the semantics described above with a revision of
your choice:

  svn list file:///repo/[EMAIL PROTECTED]

List the path in revision NNN which was called /dir at that time.
Note that it can also be combined with -r if you wish:

  svn list -rNNN file:///repo/[EMAIL PROTECTED]

List the path which was known as /dir in revision MMM, but show what
it looked like in revision NNN.

 FWIW, svnlook tree -r1 /tmp/repo /a works just fine.

I'll check with upstream to see if that's intentional.  Other than
that, can I close this bug?  I understand that the behavior is not
obvious, but it _is_ intentional.

Thanks,
Peter


signature.asc
Description: Digital signature


Bug#384042: svn list file:///repo/no-longer-existing-dir does not work

2006-08-21 Thread Richard Atterer
On Mon, Aug 21, 2006 at 01:58:24PM -0500, Peter Samuelson wrote:
 I'll check with upstream to see if that's intentional.  Other than that, 
 can I close this bug?  I understand that the behavior is not obvious, but 
 it _is_ intentional.

Yes, please close the bug, and many thanks for the explanation!
Despite having read most of the svnbook, I hadn't heard of peg revisions.

Cheers,

  Richard

-- 
  __   _
  |_) /|  Richard Atterer
  | \/¯|  http://atterer.net
  ¯ '` ¯