You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "C.A.T.Magic" <c....@gmx.at> on 2004/03/04 17:17:49 UTC

Re: Why do commands fail when a file is unknown to svn?

Hi,

maybe you could use
  svn ls -R
and search for Makefiles in its output.


but i wonder why "svn ls -R" on a
local repository is so incredibly slow --
does anybody know a good reasons for that?
or any flags to improve its speed?

====
c.a.t.


----- Original Message ----- 
From: "Nicolás Lichtmaier" <jn...@synapsis-sa.com.ar>
To: <de...@subversion.tigris.org>
Sent: Thursday, March 04, 2004 17:48
Subject: Why do commands fail when a file is unknown to svn?


>
> In CVS, if I want to do a modified Makefiles only commit, I can always
> do: cvs commit $( find . -name Makefile ) (The same works with diff and
> other commands). CVS will ignore any file which is not under revision
> control. I can't do this in SVN, so I can't find an easy way to continue
> working the same way.
>
> Is this intended for any reason? Could this be changed? Do I file a bug
> report? =)
>
> Thanks!
>
> -- 
> Nicolás Lichtmaier.-
> Synapsis Argentina
> +54(11)4314-3000 (int. 231)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 2:39 PM, C.A.T.Magic wrote:

>
> why not provide an extra flag like
>    svn --ignore-unknown-files

Adding more switches is not the answer.  The problem here is explicitly 
(via shell expansion) asking svn to operate on a file not under svn 
control.  If you do

$ svn st -v .

instead of

$ svn st *

you won't have the problem mentioned here.

> btw, is there something like a
>  ".svnrc" file like it is with the
>  ".cvsrc" where you can put configurations
> like zip compression rate etc. ?

Please read the book.  http://svnbook.red-bean.com/

-Fitz


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
----- Original Message ----- 
From: "John Szakmeister" <jo...@szakmeister.net>
To: <us...@subversion.tigris.org>
Sent: Friday, March 05, 2004 02:29
Subject: Re: Why do commands fail when a file is unknown to svn?


> Actually, 'svn ls' always goes to the server.  It converts a local wc path
> into a URL and then goes to the server for the directory listing.  I
believe
> Issue 1361 is about fixing this sort of problem.

good to hear this :-)
( although I can't see immediate similarities with 1361 )

:-)
c.a.t.


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

Re: Why do commands fail when a file is unknown to svn?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Thursday 04 March 2004 19:20, Ben Reser wrote:
> [snip]
> > this kind of ls would work without access to the remote repository
> > and also allow easier use in some scrips and shell commands.
>
> It already does work this way.  Why didn't you try it before you sent
> the message?

Actually, 'svn ls' always goes to the server.  It converts a local wc path 
into a URL and then goes to the server for the directory listing.  I believe 
Issue 1361 is about fixing this sort of problem.

-John

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

Re: [ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by Ben Reser <be...@reser.org>.
On Fri, Mar 05, 2004 at 02:54:04AM +0100, C.A.T.Magic wrote:
> > No you've got it wrong.  svn ls /path/to/wc will give you the files in
> > the working copy that are or are scheduled to be added to the repo.

Okay I got it wrong.  I could have sworn it worked like how I explained
above.  I was working on a script and thought I'd tested this and this
is how it behaved.  

> not really (!?)
> for example try renaming a folder or deleting a file,
> then use svn ls -
> it will present you everything that was there "at checkout time",
> instead of the actual state - [ intended? ].
> this gave me the impression that it was using the last
> server data (but ofcourse its just using the cached data from .svn).
> OK. I'll stick to using svn status and filter on the first character
> meantime
> - and use svn ls only for the server repository.

Yup it does.

> svn ls is not ducumented in
> http://svnbook.red-bean.com/book.html
> and svn ls --help isn't too verbose about what it really does.

Actually look at the help for it, it seems pretty clear that this is how
it behaves:

  List each TARGET file and the contents of each TARGET directory as
  they exist in the repository.  If TARGET is a working copy path, the
  corresponding repository URL will be used.

> I also had the feeling it is using the server because svn ls -R
> takes -a fortune- to complete on my working dir
> ( with only about 1.000 files, on my 3.2Ghz/1GB box ).
> it seems that svn ls is summing up all the strings in an
> internal buffer and printing the whole buffer when completed,
> while consuming 250Megbytes(!) of memory.
> at least the huge memory consumption will be an issue on
> slightly larger wc. why not print everything out immediate?

Yup it's hitting the repository.

> i meant the names as an explanation, not as a suggestion.
> but try --help on almost any *nix command and you will see
> much longer option names. also compare the amount
> of available 'switches' available to most *nix commands
> ( e.g. *nix> ls --help )

Just becuase other apps have choosen bad options doesn't mean we should.

The better way to do this is to specify the revision.  E.G. a -r WORKING
or -r WORK to get the working copies list.  But svn_client_ls doesn't
even support this yet.  So this might be something we could do in 1.1.0.

You can get the info from stat (for now) by doing:
svn stat -v | cut -b 41-

> why didn't -you- try it before you answered? ;-)

I thought I had earlier this week.  My mistake.

> I'm not questioning the defaults (which are ok),
> I asked why using the opposite flag results in an error.

I belive that was part of the complaint in the thread I linked to and
was discussed.

> > And would you all stop CC'ing the dev@subversion.tigris.org list with
> > this chatter about how to use the software.
> sorry. seems to have happened -once-.

Uhh no.  There were a number of messages on this thread that ended up on
the dev list.  10 messages to be exact:
http://marc.theaimsgroup.com/?t=107841914500007&r=1&w=2

> I know, reading 'dumb users' complaints, issues and bugreports
> all day long is annoying -- have to do that myself once a day.

I don't mind the initial discussion.  But the discussion strayed far
from the purpose of the dev list.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: [ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.

> >> *sigh* Again, have you *read* the book?  svn ls (an alias for 'svn
> >> list') is documented on that very page that you just pasted!
> >
> > then at least the documentation is incomplete :-)
> 
> It *is* complete in this regard.
> 
> > really, there is no need to *sigh* if people ask questions :-|
> > especially when the rest of the mail/thread points out up to three 
> > issues
> > and limitations of svn ls and svn status.
> 
> 2 of which were completely incorrect.

i'm not sure which one you mean exactly -
there were a few misunderstandings,
but the overall outcome of the discussion was, that
neither svn ls nor svn status are able to provide the required output
when dealing with long usernames and files/names with spaces.


> 'ls' is listed in the book as a shortcut for 'svn list'.  It is also 
> listed in 'svn help ls' as well as 'svn help list'.  Where else do you 
> suggest I document it?

you are right, its there! :-)
actually there really IS a bug in the OPERA 'find' function that makes it
impossible to find a word when it is preceded with a <p> tag. :-)

====
c.a.t.


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

Re: [ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 5, 2004, at 5:26 PM, C.A.T.Magic wrote:

>
>> *sigh* Again, have you *read* the book?  svn ls (an alias for 'svn
>> list') is documented on that very page that you just pasted!
>
> then at least the documentation is incomplete :-)

It *is* complete in this regard.

> rally, there is no need to *sigh* if people ask questions :-|
> especially when the rest of the mail/thread points out up to three 
> issues
> and limitations of svn ls and svn status.

2 of which were completely incorrect.

> please add more information to the documentation and
> mention the shortcuts of each command --
> then i'd have found it when searching for 'ls' easily.

'ls' is listed in the book as a shortcut for 'svn list'.  It is also 
listed in 'svn help ls' as well as 'svn help list'.  Where else do you 
suggest I document it?

I am sighing because you are asking questions about facts that are 
*clearly* documented in Subversion's book, help facility, and in some 
cases, the FAQ.  You may be reading the book, but I don't get the 
feeling that you are *comprehending* it based on your posts to this 
mailing list.

-Fitz


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

Re: [ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
> *sigh* Again, have you *read* the book?  svn ls (an alias for 'svn
> list') is documented on that very page that you just pasted!

then at least the documentation is incomplete :-)

rally, there is no need to *sigh* if people ask questions :-|
especially when the rest of the mail/thread points out up to three issues
and limitations of svn ls and svn status.

please add more information to the documentation and
mention the shortcuts of each command --
then i'd have found it when searching for 'ls' easily.


and please stop cc'in this kind of stuff to dev@ ( as someone
from the dev team mentioned before ;-)
====
c.a.t.


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

Re: [ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 7:54 PM, C.A.T.Magic wrote:
> svn ls is not ducumented in
> http://svnbook.red-bean.com/book.html
> and svn ls --help isn't too verbose about what it really does.

*sigh* Again, have you *read* the book?  svn ls (an alias for 'svn 
list') is documented on that very page that you just pasted!

http://svnbook.red-bean.com/book.html#id2555462

-Fitz


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

[ls-issues?] Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
----- Original Message ----- 
From: "Ben Reser" <be...@reser.org>
To: "C.A.T.Magic" <c....@gmx.at>

[...]


> > if I now get it right,
> > >  svn ls
> > will access -the server- and list all files under revision control there
> > and not all files 'that exist in the working dir AND are under version
> > control'
>
> No you've got it wrong.  svn ls /path/to/wc will give you the files in
> the working copy that are or are scheduled to be added to the repo.

not really (!?)
for example try renaming a folder or deleting a file,
then use svn ls -
it will present you everything that was there "at checkout time",
instead of the actual state - [ intended? ].
this gave me the impression that it was using the last
server data (but ofcourse its just using the cached data from .svn).
OK. I'll stick to using svn status and filter on the first character
meantime
- and use svn ls only for the server repository.

--

svn ls is not ducumented in
http://svnbook.red-bean.com/book.html
and svn ls --help isn't too verbose about what it really does.

--

I also had the feeling it is using the server because svn ls -R
takes -a fortune- to complete on my working dir
( with only about 1.000 files, on my 3.2Ghz/1GB box ).
it seems that svn ls is summing up all the strings in an
internal buffer and printing the whole buffer when completed,
while consuming 250Megbytes(!) of memory.
at least the huge memory consumption will be an issue on
slightly larger wc. why not print everything out immediate?

--

> > how about some extra flags for
> >   " list --version-controlled-files-in-working-dir "
> > this would then probably be somewhat similar to
> >   " status --without-the-single-characters-in-front "
> >  (ofcourse something shorter would be nice:)
>
> Totally unnecessary and ridiculously long option names.

i meant the names as an explanation, not as a suggestion.
but try --help on almost any *nix command and you will see
much longer option names. also compare the amount
of available 'switches' available to most *nix commands
( e.g. *nix> ls --help )


> It already does work this way.  Why didn't you try it before you sent
> the message?
because it also prints files that are -NOT really- in the working dir.
(for example manually deleted or not-yet checked-out files, renamed files,
renamed folders etc -- rename or delete something or try ctrl-c during
checkout -- makes everything slightly inconsistent )

why didn't -you- try it before you answered? ;-)


> > And while I may have the ear of an svn developer --
> >    svn ls -N   <--- unsupported/error (nonrecursive is default)
> >    svn ls -R
> >    svn add -N
> >    svn add -R   <--- unsupported/error (recursive is default)
[...]
> This has been explained over and over and over again.  The defaults
> exist the way they are because they are the most common use case.  Most
> people don't want a recursive list but do what a recursive add.
>
> See this thread for past discussion:
> http://marc.theaimsgroup.com/?l=subversion-dev&m=107453293614903&w=2

I'm not questioning the defaults (which are ok),
I asked why using the opposite flag results in an error.


> And would you all stop CC'ing the dev@subversion.tigris.org list with
> this chatter about how to use the software.
sorry. seems to have happened -once-.



I know, reading 'dumb users' complaints, issues and bugreports
all day long is annoying -- have to do that myself once a day.

happy coding,
:-)
======
c.a.t.


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

Re: Why do commands fail when a file is unknown to svn?

Posted by Ben Reser <be...@reser.org>.
On Fri, Mar 05, 2004 at 12:24:40AM +0100, C.A.T.Magic wrote:

> if I now get it right,
> >  svn ls
> will access -the server- and list all files under revision control there
> and not all files 'that exist in the working dir AND are under version
> control'

No you've got it wrong.  svn ls /path/to/wc will give you the files in
the working copy that are or are scheduled to be added to the repo.

> so...
> how about some extra flags for
>   " list --version-controlled-files-in-working-dir "
> this would then probably be somewhat similar to
>   " status --without-the-single-characters-in-front "
>  (ofcourse something shorter would be nice:)

Totally unnecessary and ridiculously long option names.

> this kind of ls would work without access to the remote repository
> and also allow easier use in some scrips and shell commands.

It already does work this way.  Why didn't you try it before you sent
the message?

> And while I may have the ear of an svn developer --
>    svn ls -N   <--- unsupported/error (nonrecursive is default)
>    svn ls -R
>    svn add -N
>    svn add -R   <--- unsupported/error (recursive is default)
> why are the some functions that default to "-R"ecursive and
> some other that default to "-N"onrecursive,
> but either one complains when used when the default -R and -N
> is explicitly specified -- this is sometimes annoying
> because you have to remember whether a command requires an
> -R,  -N or nothing all the time.
> ( is this filed as an issue or as a nono-decision already?
>   I couldn't find anything on the topic yet )

This has been explained over and over and over again.  The defaults
exist the way they are because they are the most common use case.  Most
people don't want a recursive list but do what a recursive add.  

See this thread for past discussion:
http://marc.theaimsgroup.com/?l=subversion-dev&m=107453293614903&w=2

And would you all stop CC'ing the dev@subversion.tigris.org list with
this chatter about how to use the software.  It doesn't belong on that
list.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

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

Re: Why do commands fail when a file is unknown to svn?

Posted by John Szakmeister <jo...@szakmeister.net>.
On Thursday 04 March 2004 18:55, C.A.T.Magic wrote:
> ----- Original Message -----
> From: "Lawrence Kesteloot" <lk...@teamten.com>
> To: <us...@subversion.tigris.org>
> Cc: <de...@subversion.tigris.org>
> Sent: Friday, March 05, 2004 00:31
> Subject: Re: Why do commands fail when a file is unknown to svn?
>
> > >   " status --without-the-single-characters-in-front "
> > >  (ofcourse something shorter would be nice:)
> >
> > How about:
> >
> >      % svn status | egrep '^M' | cut -c8-
> >
> > like:
> >
> >      % svn commit -m Msg `svn status | egrep '^M.*Makefile' | cut -c8-`
> >
> > (untested)
> >
> > Lawrence
>
> nevertheless:
>  - status does not print all files (only modified or missing ones)
>  - status requires server access ( to detect merge/conflicts )

This second bullet is incorrect.  'svn status' doesn't require server access.  
By default, it computes the status using information stored in the .svn/ 
directories.  If you want it to compare against the server, you have 
explicitly make that happen by using the -u or --show-updates switch.  Either 
way, status won't show you file that will conflict.  It only shows files that 
are in a conflicted state after a merge or update.

-John

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

Re: Why do commands fail when a file is unknown to svn?

Posted by Lawrence Kesteloot <lk...@teamten.com>.
>>     % svn status | egrep '^M' | cut -c8-
>>
>>like:
>>
>>     % svn commit -m Msg `svn status | egrep '^M.*Makefile' | cut -c8-`
 >
> nevertheless:
>  - status does not print all files (only modified or missing ones)

Oh, sorry, I thought the whole point was to show only modified files (so 
that Makefiles not in the repository didn't result in "commit" errors). 
  Maybe that was a different thread.  You could try "status -v".

>  - status requires server access ( to detect merge/conflicts )

Nope, it's all local as long as you don't use the -v flag.

>  - not all windows-users have cygwin, egrep or similar tools installed
>    (i know, its their own fault, I have it on my box:-)

True.  If it's important enough a feature for you, though, you could 
whip up a C program for it pretty easily.  A program like Subversion 
can't add a command-line flag for each specialized use or need, at least 
when a wrapper script can fix the problem.  You'd end up with dozens of 
flags that are almost never used, and when your needs changed, even a 
little, you'd be hosed again.

Lawrence


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 5:55 PM, C.A.T.Magic wrote:
>
> nevertheless:
>  - status does not print all files (only modified or missing ones)

Not if you pass the -v switch.

>  - status requires server access ( to detect merge/conflicts )

Only if you pass the -u switch.  By default, svn switch does not use 
the network.


C.A.T., have you read the book?  Have you run svn help <command>?  From 
all your posts here, I don't get the impression that you have.

There are over 1,000 people subscribed to the users list, and anytime 
you post here asking questions documented in the book, or stating false 
information, you're wasting the time of hundreds of people.  We're glad 
to help you out if you have real problems, but I ask that you think *at 
least* twice before posting to the list.  Please be considerate of 
others' time.

-Fitz


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
----- Original Message ----- 
From: "Lawrence Kesteloot" <lk...@teamten.com>
To: <us...@subversion.tigris.org>
Cc: <de...@subversion.tigris.org>
Sent: Friday, March 05, 2004 00:31
Subject: Re: Why do commands fail when a file is unknown to svn?


> 
> >   " status --without-the-single-characters-in-front "
> >  (ofcourse something shorter would be nice:)
> 
> How about:
> 
>      % svn status | egrep '^M' | cut -c8-
> 
> like:
> 
>      % svn commit -m Msg `svn status | egrep '^M.*Makefile' | cut -c8-`
> 
> (untested)
> 
> Lawrence


nevertheless:
 - status does not print all files (only modified or missing ones)
 - status requires server access ( to detect merge/conflicts )
 - not all windows-users have cygwin, egrep or similar tools installed
   (i know, its their own fault, I have it on my box:-)


:-)
c.a.t

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

Re: Why do commands fail when a file is unknown to svn?

Posted by Lawrence Kesteloot <lk...@teamten.com>.
>   " status --without-the-single-characters-in-front "
>  (ofcourse something shorter would be nice:)

How about:

     % svn status | egrep '^M' | cut -c8-

like:

     % svn commit -m Msg `svn status | egrep '^M.*Makefile' | cut -c8-`

(untested)

Lawrence

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

Re: [svn status issues] was: Re: Why do commands fail when a file is unknown to svn?

Posted by kf...@collab.net.
"C.A.T.Magic" <c....@gmx.at> writes:
> i think its simply impossible with the current output format to distinguish
> spaces in usernames from spaces in filenames :-(

That sounds correct.
 
> so,.. should I file an issue on that case?

I don't think its worth an issue.  (Or rather, I doubt the issue would
get resolved in a finite amount of time.)

-Karl

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

[svn status issues] was: Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.

> "svn status" is the command for getting this information. 
> You can remove the status characters in front if you don't
> care whether a file is sheduled for addition, deletion or
> something else; but I suspect that actually in many cases you would care.
> 
> - Julian


we already found out (see previous mailings) that 'svn ls' isn't the
right command to use at all, because it doesn't even use
the stuff from the WC.
so grep/cut/filter on the output of 
  "svn status -v"
is the only solution here ( since without -v it doesn't list all files ).

but I didn't yet find the a -correct- method to split up the
parts of the output from svn status -v !!!

look at the following:

>>
Work>svn status -v
                0       ?   ?           .
                1        1 Firstname Lastname fileB.txt
                1        1 Firstname Lastname dirC
                1        1 Firstname Lastname dirC\fileD.txt
                1        1 Firstname Lastname dirC\fileE.txt
                1        1 Firstname Lastname fileA.txt
                2        2 cat          foo hallo.txt
                1        1 cat          fileX.txt
<<

i think its simply impossible with the current output format to distinguish
spaces in usernames from spaces in filenames :-(
if scripts rely on the output format of svn status -v they will fail.


so,.. should I file an issue on that case?


( svn takes the name from the current windows-user-login
and so there are probably some accounts with long names
-and- spaces in it already )


====
c.a.t.


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

Re: Why do commands fail when a file is unknown to svn?

Posted by Julian Foad <ju...@btopenworld.com>.
C.A.T.Magic wrote:
> 
> if I now get it right,
> 
>> svn ls
> 
> will access -the server- and list all files under revision control there
> and not all files 'that exist in the working dir AND are under version
> control'
> 
> so...
> how about some extra flags for

The addition of flags to modify a program's behaviour is not something to be taken lightly.  I expect you are thinking that there is a simple definition of "file that exists in the working dir AND is under version control".  You could certainly come up with a definition, but it would not be useful for all purposes.  For example, to decide which files to commit, you wouldn't want just those files, you would also want to include files that do not exist in the working directory because they are scheduled for deletion from version control.

>   " list --version-controlled-files-in-working-dir "
> this would then probably be somewhat similar to
>   " status --without-the-single-characters-in-front "
>  (ofcourse something shorter would be nice:)
> 
> this kind of ls would work without access to the remote repository
> and also allow easier use in some scrips and shell commands.

"svn status" is the command for getting this information.  You can remove the status characters in front if you don't care whether a file is sheduled for addition, deletion or something else; but I suspect that actually in many cases you would care.

- Julian

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

Re: Why do commands fail when a file is unknown to svn?

Posted by Julian Foad <ju...@btopenworld.com>.
C.A.T.Magic wrote:
> 
> if I now get it right,
> 
>> svn ls
> 
> will access -the server- and list all files under revision control there
> and not all files 'that exist in the working dir AND are under version
> control'
> 
> so...
> how about some extra flags for

The addition of flags to modify a program's behaviour is not something to be taken lightly.  I expect you are thinking that there is a simple definition of "file that exists in the working dir AND is under version control".  You could certainly come up with a definition, but it would not be useful for all purposes.  For example, to decide which files to commit, you wouldn't want just those files, you would also want to include files that do not exist in the working directory because they are scheduled for deletion from version control.

>   " list --version-controlled-files-in-working-dir "
> this would then probably be somewhat similar to
>   " status --without-the-single-characters-in-front "
>  (ofcourse something shorter would be nice:)
> 
> this kind of ls would work without access to the remote repository
> and also allow easier use in some scrips and shell commands.

"svn status" is the command for getting this information.  You can remove the status characters in front if you don't care whether a file is sheduled for addition, deletion or something else; but I suspect that actually in many cases you would care.

- Julian

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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.

>> why not provide an extra flag like
>>   svn --ignore-unknown-files
>> ?

> I will veto this.  We don't need another configuration switch to
> accomodate what is essentially a misuse of Subversion (See my previous
> email for more info).


Maybe I misunderstood the use case in the original post --
your veto is ofcourse correct.


if I now get it right,
>  svn ls
will access -the server- and list all files under revision control there
and not all files 'that exist in the working dir AND are under version
control'

so...
how about some extra flags for
  " list --version-controlled-files-in-working-dir "
this would then probably be somewhat similar to
  " status --without-the-single-characters-in-front "
 (ofcourse something shorter would be nice:)

this kind of ls would work without access to the remote repository
and also allow easier use in some scrips and shell commands.

---

And while I may have the ear of an svn developer --
   svn ls -N   <--- unsupported/error (nonrecursive is default)
   svn ls -R
   svn add -N
   svn add -R   <--- unsupported/error (recursive is default)
why are the some functions that default to "-R"ecursive and
some other that default to "-N"onrecursive,
but either one complains when used when the default -R and -N
is explicitly specified -- this is sometimes annoying
because you have to remember whether a command requires an
-R,  -N or nothing all the time.
( is this filed as an issue or as a nono-decision already?
  I couldn't find anything on the topic yet )



thanks to the svn developers for this great product :-)
=====
c.a.t.


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.

>> why not provide an extra flag like
>>   svn --ignore-unknown-files
>> ?

> I will veto this.  We don't need another configuration switch to
> accomodate what is essentially a misuse of Subversion (See my previous
> email for more info).


Maybe I misunderstood the use case in the original post --
your veto is ofcourse correct.


if I now get it right,
>  svn ls
will access -the server- and list all files under revision control there
and not all files 'that exist in the working dir AND are under version
control'

so...
how about some extra flags for
  " list --version-controlled-files-in-working-dir "
this would then probably be somewhat similar to
  " status --without-the-single-characters-in-front "
 (ofcourse something shorter would be nice:)

this kind of ls would work without access to the remote repository
and also allow easier use in some scrips and shell commands.

---

And while I may have the ear of an svn developer --
   svn ls -N   <--- unsupported/error (nonrecursive is default)
   svn ls -R
   svn add -N
   svn add -R   <--- unsupported/error (recursive is default)
why are the some functions that default to "-R"ecursive and
some other that default to "-N"onrecursive,
but either one complains when used when the default -R and -N
is explicitly specified -- this is sometimes annoying
because you have to remember whether a command requires an
-R,  -N or nothing all the time.
( is this filed as an issue or as a nono-decision already?
  I couldn't find anything on the topic yet )



thanks to the svn developers for this great product :-)
=====
c.a.t.


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 3:51 PM, Nicolás Lichtmaier wrote:

>
>> why not provide an extra flag like
>>   svn --ignore-unknown-files
>> ?
>>
>>
>
> I second this! (it could also be a client configuration setting)

I will veto this.  We don't need another configuration switch to 
accomodate what is essentially a misuse of Subversion (See my previous 
email for more info).

>> btw, is there something like a
>> ".svnrc" file like it is with the
>> ".cvsrc" where you can put configurations
>> like zip compression rate etc. ?
>>
>
> ...and this! =)

It already exists.  It's called your ~/.subversion/ directory (tho it's 
slightly different in Windows).

To witness this feature described in detail, please see Chapter 7 of 
the Subversion book:

http://svnbook.red-bean.com/html-chunk/ch07.html#svn-ch-7-sect-1

-Fitz


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


Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 3:51 PM, Nicolás Lichtmaier wrote:

>
>> why not provide an extra flag like
>>   svn --ignore-unknown-files
>> ?
>>
>>
>
> I second this! (it could also be a client configuration setting)

I will veto this.  We don't need another configuration switch to 
accomodate what is essentially a misuse of Subversion (See my previous 
email for more info).

>> btw, is there something like a
>> ".svnrc" file like it is with the
>> ".cvsrc" where you can put configurations
>> like zip compression rate etc. ?
>>
>
> ...and this! =)

It already exists.  It's called your ~/.subversion/ directory (tho it's 
slightly different in Windows).

To witness this feature described in detail, please see Chapter 7 of 
the Subversion book:

http://svnbook.red-bean.com/html-chunk/ch07.html#svn-ch-7-sect-1

-Fitz


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


Re: Why do commands fail when a file is unknown to svn?

Posted by Nicolás Lichtmaier <jn...@synapsis-sa.com.ar>.
>why not provide an extra flag like
>   svn --ignore-unknown-files
>?
>
>  
>

I second this! (it could also be a client configuration setting)

>btw, is there something like a
> ".svnrc" file like it is with the
> ".cvsrc" where you can put configurations
>like zip compression rate etc. ?
>  
>

...and this! =)

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "Brian W. Fitzpatrick" <fi...@red-bean.com>.
On Mar 4, 2004, at 2:39 PM, C.A.T.Magic wrote:

>
> why not provide an extra flag like
>    svn --ignore-unknown-files

Adding more switches is not the answer.  The problem here is explicitly 
(via shell expansion) asking svn to operate on a file not under svn 
control.  If you do

$ svn st -v .

instead of

$ svn st *

you won't have the problem mentioned here.

> btw, is there something like a
>  ".svnrc" file like it is with the
>  ".cvsrc" where you can put configurations
> like zip compression rate etc. ?

Please read the book.  http://svnbook.red-bean.com/

-Fitz


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

Re: Why do commands fail when a file is unknown to svn?

Posted by Nicolás Lichtmaier <jn...@synapsis-sa.com.ar>.
>why not provide an extra flag like
>   svn --ignore-unknown-files
>?
>
>  
>

I second this! (it could also be a client configuration setting)

>btw, is there something like a
> ".svnrc" file like it is with the
> ".cvsrc" where you can put configurations
>like zip compression rate etc. ?
>  
>

...and this! =)

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
why not provide an extra flag like
   svn --ignore-unknown-files
?

btw, is there something like a
 ".svnrc" file like it is with the
 ".cvsrc" where you can put configurations
like zip compression rate etc. ?



----- Original Message ----- 
From: "John Peacock" <jp...@rowman.com>
To: "Nicolás Lichtmaier" <jn...@synapsis-sa.com.ar>
Cc: <us...@subversion.tigris.org>; <de...@subversion.tigris.org>
Sent: Thursday, March 04, 2004 21:31
Subject: Re: Why do commands fail when a file is unknown to svn?


> Nicolás Lichtmaier wrote:
>
> > Besides, SVN doesn't complain when trying to commit an up-to-date
> > file... according to you.. shoud that be changed? I think that's a
> > similar case.
>
> Not at all; the up-to-date file is already known, but it doesn't need
anything
> done to it, so this is a guaranteed harmless state.  Trying to commit a
file
> which doesn't already exist in the repository is not always completely
harmless.
>
> Either:
>
> 1) The file _should_ be in the repository, so by erroring out, you can add
it
> and then commit it along with the other files in this changeset;
>
> 2) The file _shouldn't_ be in the repository, in which case your selection
of
> files on the command line was in error.
>
> Just because you _could_ do something in CVS doesn't make that behavior
better;
> I suspect this was probably a conscious choice to raise this to an error
instead
> of a warning (to prevent case #1 above).  There are probably a number of
things
> in CVS which people got used to using due to laziness, rather than it
being a
> good feature.
>
> That being said, you could request an enhancement to warn on unknown files
> (--warn-unknown???) instead of erroring out.  It's also quite easy to
write a
> little script to construct the appropriate commandline.
>
> John
>
> -- 
> John Peacock
> Director of Information Research and Technology
> Rowman & Littlefield Publishing Group
> 4501 Forbes Boulevard
> Suite H
> Lanham, MD  20706
> 301-459-3366 x.5010
> fax 301-429-5748
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>


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

Re: Why do commands fail when a file is unknown to svn?

Posted by "C.A.T.Magic" <c....@gmx.at>.
why not provide an extra flag like
   svn --ignore-unknown-files
?

btw, is there something like a
 ".svnrc" file like it is with the
 ".cvsrc" where you can put configurations
like zip compression rate etc. ?



----- Original Message ----- 
From: "John Peacock" <jp...@rowman.com>
To: "Nicolás Lichtmaier" <jn...@synapsis-sa.com.ar>
Cc: <us...@subversion.tigris.org>; <de...@subversion.tigris.org>
Sent: Thursday, March 04, 2004 21:31
Subject: Re: Why do commands fail when a file is unknown to svn?


> Nicolás Lichtmaier wrote:
>
> > Besides, SVN doesn't complain when trying to commit an up-to-date
> > file... according to you.. shoud that be changed? I think that's a
> > similar case.
>
> Not at all; the up-to-date file is already known, but it doesn't need
anything
> done to it, so this is a guaranteed harmless state.  Trying to commit a
file
> which doesn't already exist in the repository is not always completely
harmless.
>
> Either:
>
> 1) The file _should_ be in the repository, so by erroring out, you can add
it
> and then commit it along with the other files in this changeset;
>
> 2) The file _shouldn't_ be in the repository, in which case your selection
of
> files on the command line was in error.
>
> Just because you _could_ do something in CVS doesn't make that behavior
better;
> I suspect this was probably a conscious choice to raise this to an error
instead
> of a warning (to prevent case #1 above).  There are probably a number of
things
> in CVS which people got used to using due to laziness, rather than it
being a
> good feature.
>
> That being said, you could request an enhancement to warn on unknown files
> (--warn-unknown???) instead of erroring out.  It's also quite easy to
write a
> little script to construct the appropriate commandline.
>
> John
>
> -- 
> John Peacock
> Director of Information Research and Technology
> Rowman & Littlefield Publishing Group
> 4501 Forbes Boulevard
> Suite H
> Lanham, MD  20706
> 301-459-3366 x.5010
> fax 301-429-5748
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>


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

Re: Why do commands fail when a file is unknown to svn?

Posted by John Peacock <jp...@rowman.com>.
Nicolás Lichtmaier wrote:

> Besides, SVN doesn't complain when trying to commit an up-to-date 
> file... according to you.. shoud that be changed? I think that's a 
> similar case.

Not at all; the up-to-date file is already known, but it doesn't need anything 
done to it, so this is a guaranteed harmless state.  Trying to commit a file 
which doesn't already exist in the repository is not always completely harmless.

Either:

1) The file _should_ be in the repository, so by erroring out, you can add it 
and then commit it along with the other files in this changeset;

2) The file _shouldn't_ be in the repository, in which case your selection of 
files on the command line was in error.

Just because you _could_ do something in CVS doesn't make that behavior better; 
I suspect this was probably a conscious choice to raise this to an error instead 
of a warning (to prevent case #1 above).  There are probably a number of things 
in CVS which people got used to using due to laziness, rather than it being a 
good feature.

That being said, you could request an enhancement to warn on unknown files 
(--warn-unknown???) instead of erroring out.  It's also quite easy to write a 
little script to construct the appropriate commandline.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

Re: Why do commands fail when a file is unknown to svn?

Posted by John Peacock <jp...@rowman.com>.
Nicolás Lichtmaier wrote:

> Besides, SVN doesn't complain when trying to commit an up-to-date 
> file... according to you.. shoud that be changed? I think that's a 
> similar case.

Not at all; the up-to-date file is already known, but it doesn't need anything 
done to it, so this is a guaranteed harmless state.  Trying to commit a file 
which doesn't already exist in the repository is not always completely harmless.

Either:

1) The file _should_ be in the repository, so by erroring out, you can add it 
and then commit it along with the other files in this changeset;

2) The file _shouldn't_ be in the repository, in which case your selection of 
files on the command line was in error.

Just because you _could_ do something in CVS doesn't make that behavior better; 
I suspect this was probably a conscious choice to raise this to an error instead 
of a warning (to prevent case #1 above).  There are probably a number of things 
in CVS which people got used to using due to laziness, rather than it being a 
good feature.

That being said, you could request an enhancement to warn on unknown files 
(--warn-unknown???) instead of erroring out.  It's also quite easy to write a 
little script to construct the appropriate commandline.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

Re: Why do commands fail when a file is unknown to svn?

Posted by Nicolás Lichtmaier <jn...@synapsis-sa.com.ar>.
>> I know, but why does subversion fail in this case. Is this useful?
>>
> Why doesn't _CVS_ fail in this case?  You are telling it to perform 
> some operation on a file unknown to the repository.  I would rather 
> that the command fail (since I may have forgotten to add that file to 
> the repository), rather than silently ignore the unknown files (for 
> the same reason).
>

CVS recognizes that fact and prints a warning. This behaviour, in 
practice, is much more useful. Suppose you have made lots of tiny 
changes everywhere, included some Makefiles, and that you want to commit 
only the Makefiles. That's trivial in CVS, and hard in Subversion. 
Remember that Subversion tries to be a "better CVS"!

Besides, SVN doesn't complain when trying to commit an up-to-date 
file... according to you.. shoud that be changed? I think that's a 
similar case.

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)


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

Re: Why do commands fail when a file is unknown to svn?

Posted by Nicolás Lichtmaier <jn...@synapsis-sa.com.ar>.
>> I know, but why does subversion fail in this case. Is this useful?
>>
> Why doesn't _CVS_ fail in this case?  You are telling it to perform 
> some operation on a file unknown to the repository.  I would rather 
> that the command fail (since I may have forgotten to add that file to 
> the repository), rather than silently ignore the unknown files (for 
> the same reason).
>

CVS recognizes that fact and prints a warning. This behaviour, in 
practice, is much more useful. Suppose you have made lots of tiny 
changes everywhere, included some Makefiles, and that you want to commit 
only the Makefiles. That's trivial in CVS, and hard in Subversion. 
Remember that Subversion tries to be a "better CVS"!

Besides, SVN doesn't complain when trying to commit an up-to-date 
file... according to you.. shoud that be changed? I think that's a 
similar case.

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)


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

Re: Why do commands fail when a file is unknown to svn?

Posted by John Peacock <jp...@rowman.com>.
Nicolás Lichtmaier wrote:

> 
> I know, but why does subversion fail in this case. Is this useful?
> 

Why doesn't _CVS_ fail in this case?  You are telling it to perform some 
operation on a file unknown to the repository.  I would rather that the command 
fail (since I may have forgotten to add that file to the repository), rather 
than silently ignore the unknown files (for the same reason).

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

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

Re: Why do commands fail when a file is unknown to svn?

Posted by Nicolás Lichtmaier <jn...@synapsis-sa.com.ar>.
>maybe you could use
>  svn ls -R
>and search for Makefiles in its output.
>  
>

I know, but why does subversion fail in this case. Is this useful?

-- 
Nicolás Lichtmaier.-
Synapsis Argentina
+54(11)4314-3000 (int. 231)


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