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

Re: Bug? svn list doesn't show files added since last update

From: Ryan Schmidt <subversion-2006d_at_ryandesign.com>
Date: 2006-11-30 22:27:07 CET

Not a bug. Explanation below.

On Nov 30, 2006, at 12:08, Mike Martin wrote:

> I don't know if this is a bug that has been fixed already or not,
> but hopefully someone can tell me. When you add a file to a
> working copy and commit it, svn list does not show the file as
> existing until an svn update is performed. Apparently svn add and/
> or svn commit are not updating the necesary metadata in the working
> copy.

First: "svn list" shows files in the repository, not in the working
copy. I think you know that, I'm just making sure, because I did not
know that until recently. :-) From "svn help list":

"list (ls): List directory entries in the repository."

> I would think that the file would show up at step (1), or at least
> at step (2), but it doesn't until step (3) after the svn update.

> To reproduce:
> Check out a path
> svn co http://repos/trunk/calc calc
> output:
> A calc/main.c
> A calc/other.h
> Checked out revision 8152.
> Move into the calc directory
> Add a file
> touch new_file.c
> svn add new_file.c
> (1) List the files
> svn list
> output:
> main.c
> other.h

new_file.c is not in the repository yet; it's merely in the working
copy scheduled for addition to the repository. So it makes sense that
"svn list" doesn't show it here. Perhaps what you're looking for
instead is "svn status".

> Commit the change
> svn commit -m "Added a new file"
> (2) List the files
> svn list
> output:
> main.c
> other.h

"svn list" is listing the files in the repository *as of the revision
of this directory* which is still 8152.

> Update the working copy
> svn update
> output:
> At revision 8153.
> (3) List the files
> svn list
> output:
> main.c
> new_file.c
> other.h

Now you've updated the directory to revision 8153, and so "svn list"
shows the files in that repository revision.

To reply to the mailing list, use your mailer's Reply To All function
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Nov 30 22:28:44 2006

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