[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: svn list no working for some working directories

From: John Mcgrath <john.mcgrath_at_xilinx.com>
Date: Mon, 8 Sep 2008 12:07:50 +0100

Hi Karl,
Thanks for your response on this - it is greatly appreciated.
I modified your script to reproduce the error (well done, it is a very
nice, neat way of describing a problem, I must say!)

------------------------------------------------------------------------

---
#!/bin/sh
# The next line is the only line you should need to adjust.
SVNDIR=/home/jmcgrath/bin/linux/subversion/subversion-1.5.2/bin
SVN=${SVNDIR}/svn
SVNSERVE=${SVNDIR}/svnserve
SVNADMIN=${SVNDIR}/svnadmin
URL=file:///`pwd`/repos
rm -rf repos wc* import-me
${SVNADMIN} create repos
echo "### Making a Greek Tree for import..."
mkdir import-me
mkdir import-me/trunk
mkdir import-me/tags
mkdir import-me/branches
mkdir import-me/trunk/A
mkdir import-me/trunk/A/B/
mkdir import-me/trunk/A/C/
mkdir import-me/trunk/A/D/
mkdir import-me/trunk/A/B/E/
mkdir import-me/trunk/A/B/F/
mkdir import-me/trunk/A/D/G/
mkdir import-me/trunk/A/D/H/
echo "This is the file 'iota'."        > import-me/trunk/iota
echo "This is the file 'A/mu'."        > import-me/trunk/A/mu
echo "This is the file 'A/B/lambda'."  > import-me/trunk/A/B/lambda echo
"This is the file 'A/B/E/alpha'." > import-me/trunk/A/B/E/alpha echo
"This is the file 'A/B/E/beta'."  > import-me/trunk/A/B/E/beta
echo "This is the file 'A/D/gamma'."   > import-me/trunk/A/D/gamma
echo "This is the file 'A/D/G/pi'."    > import-me/trunk/A/D/G/pi
echo "This is the file 'A/D/G/rho'."   > import-me/trunk/A/D/G/rho
echo "This is the file 'A/D/G/tau'."   > import-me/trunk/A/D/G/tau
echo "This is the file 'A/D/H/chi'."   > import-me/trunk/A/D/H/chi
echo "This is the file 'A/D/H/omega'." > import-me/trunk/A/D/H/omega
echo "This is the file 'A/D/H/psi'."   > import-me/trunk/A/D/H/psi
echo "### Done."
echo ""
echo "### Importing it..."
(cd import-me; ${SVN} import -q -m "Initial import." ${URL}); echo "###
Done."
echo ""
${SVN} co -q -N ${URL}/trunk wc
${SVN} co -q -N ${URL}/trunk wc1
cd wc
mkdir ls_should_see
${SVN} add ls_should_see -q
${SVN} ci  ls_should_see -q -m "initial import"
cd ..
echo "### Should see the directory 'ls_should_see' below..."
# this is because svn ls should be looking @ the repository
# but we do not see it
cd wc1
${SVN} ls
cd ..
------------------------------------------------------------------------
---
Cheers,
John
-----Original Message-----
From: Karl Fogel [mailto:kfogel_at_red-bean.com] 
Sent: Friday, September 05, 2008 9:45 PM
To: John Mcgrath
Cc: users_at_subversion.tigris.org; dev_at_subversion.tigris.org
Subject: Re: svn list no working for some working directories
John McGrath <john.mcgrath_at_xilinx.com> writes:
> My understanding is that 'svn list' will show the contents of the
> repository for the same path as the current directory in the
> workspace.
>
> For example, if my workspace has
> dir1/
> dir2/
> file1
>
> but the repository has a new directory recently added, called dir3,
> svn ls would report
> dir1/
> dir2/
> dir3/
> file1
>
> i.e. it shows me the contents of the repository.
>
> However, if the local workspace was originally checked out with the -N
> (non-recursive) command,
> running svn ls would only show me the directories I have, it would not
> show me dir3!
I cannot reproduce this.  Could you give a complete reproduction recipe
please (that is, a script)?  My transcript is below.
> This appears to be a bug - becuase if not, what advantage is svn ls
> over plain ls, in this case?
> I have tested this will the latest svn 1.5.2, and it still operates in
> this way.
>
> The same thing goes for svn update, if the local working direcotory
> was originally checked out with -N, running svn update will only get
> the contents of directories that are in the workspace.
> It would be great if there was a switch to force recursion, like -R or
> something, or even -R n, where n would be a number of levels.
-N is deprecated; we use --depth=foo now.  And the --set-depth option
does what you want.
> At the very least, I think this is a bug in the terms of svn ls,
> changing svn update to work as described is a bonus!
The reported 'svn ls' behavior would be a bug, I think; but I cannot
reproduce it with latest trunk Subversion (which is similar to 1.5.2,
though not exactly the same).
The 'update' behavior is as-designed, and you should use --set-depth to
expand ("unfold") the directories.
Here's my repro script:
------------------------------------------------------------------------
---
#!/bin/sh
# The next line is the only line you should need to adjust.
SVNDIR=/home/kfogel/src/subversion
SVN=${SVNDIR}/subversion/svn/svn
SVNSERVE=${SVNDIR}/subversion/svnserve/svnserve
SVNADMIN=${SVNDIR}/subversion/svnadmin/svnadmin
URL=file:///`pwd`/repos
rm -rf repos wc import-me
${SVNADMIN} create repos
echo "### Making a Greek Tree for import..."
mkdir import-me
mkdir import-me/trunk
mkdir import-me/tags
mkdir import-me/branches
mkdir import-me/trunk/A
mkdir import-me/trunk/A/B/
mkdir import-me/trunk/A/C/
mkdir import-me/trunk/A/D/
mkdir import-me/trunk/A/B/E/
mkdir import-me/trunk/A/B/F/
mkdir import-me/trunk/A/D/G/
mkdir import-me/trunk/A/D/H/
echo "This is the file 'iota'."        > import-me/trunk/iota
echo "This is the file 'A/mu'."        > import-me/trunk/A/mu
echo "This is the file 'A/B/lambda'."  > import-me/trunk/A/B/lambda
echo "This is the file 'A/B/E/alpha'." > import-me/trunk/A/B/E/alpha
echo "This is the file 'A/B/E/beta'."  > import-me/trunk/A/B/E/beta
echo "This is the file 'A/D/gamma'."   > import-me/trunk/A/D/gamma
echo "This is the file 'A/D/G/pi'."    > import-me/trunk/A/D/G/pi
echo "This is the file 'A/D/G/rho'."   > import-me/trunk/A/D/G/rho
echo "This is the file 'A/D/G/tau'."   > import-me/trunk/A/D/G/tau
echo "This is the file 'A/D/H/chi'."   > import-me/trunk/A/D/H/chi
echo "This is the file 'A/D/H/omega'." > import-me/trunk/A/D/H/omega
echo "This is the file 'A/D/H/psi'."   > import-me/trunk/A/D/H/psi
echo "### Done."
echo ""
echo "### Importing it..."
(cd import-me; ${SVN} import -q -m "Initial import." ${URL})
echo "### Done."
echo ""
${SVN} co -q -N ${URL}/trunk wc
cd wc
${SVN} ls
cd ..
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-09-08 17:42:47 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.