You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Files <fi...@poetryunlimited.com> on 2003/11/07 05:44:02 UTC

OMG svn info https://?????

Can someone please tell me why when we do not have the ability to specify what
information we want about a file being included in the ls command, we have no
equivalent stat command?

Imagine this. You're creating a repository browser.

Something that can walk a repository.

And the file dates and times that are reported are reported inconstently - the
file time is dropped whenever the date is a year ago - no problem.

But you want to be able to at least provide users with the ability to view the
actual information so that file times can be viewed. Or additional
information. Etc.

Imagine my surprise when I realized that the one command that I thought even
came close, the info command, is hobbled, and does not allow http or https or
even svn as an access method.

Can someone please explain the rationale behind this omission?

Even the unix command line has a stat command.

Or better yet, how do I work around it without having to download the
repository, just to browse it using a working copy?

Thanks in advance for any guidance or advice.

P.S. Did anyone notice that proplist on the other hand works just fine w/
https and http and svn protocols? Too bad the stat data isn't a property.
-- 
Shamim Islam
BA BS


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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
Files said:
> Can someone please explain the rationale behind this omission?

Apologies to all that took offense to this statement.

I wasn't questioning the validity of the design decision, but rather
attempting to understand why it was made that way, so that I didn't break
anything by attempting to do something that was just out and out wrong to do.

Avoiding mistakes that wiser heads had already considered and side-stepped as
it were.

The enthusisiasm of my reaction was a total shock/surprised state of mind.
There was no outrage involved. I was just used to subversion having all the
things I could have wanted lurking around *somewhere*.

Sorry if anyone took it that way.

I'll try to be a little more careful in the future.
-- 
Shamim Islam
BA BS

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

Re: OMG svn info https://?????

Posted by Brian Denny <br...@briandenny.net>.
On Fri, Nov 07, 2003 at 01:31:21PM -0600, Ben Collins-Sussman wrote:
> On Fri, 2003-11-07 at 13:25, Files wrote:
> 
> > Is there a layer of the library that extracts the equivalent of the info
> > command for repositories other than the local working copy?
> 
> Yes.  'svn info' just prints out the contents of .svn/entries.  The
> 'entries' in an entries-file are represented by svn_wc_entry_t
> structures in libsvn_wc.
> 
> So, you need to read svn_wc.h, and use that library.

I think the poster wants to retrieve info for files/directories in the
*repository*, not the WC.

-brian


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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
Oh!

Ok. I'll look into it.
-- 
Shamim Islam
BA BS

Ben Collins-Sussman said:
> You want 'info' about objects in the repository.  The answer is: call
> svn_client_ls() in libsvn_client.  It returns a list of dirent
> structures.


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

Re: OMG svn info https://?????

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2003-11-07 at 13:31, Ben Collins-Sussman wrote:
> On Fri, 2003-11-07 at 13:25, Files wrote:
> 
> > Is there a layer of the library that extracts the equivalent of the info
> > command for repositories other than the local working copy?
> 
> Yes.  'svn info' just prints out the contents of .svn/entries.  The
> 'entries' in an entries-file are represented by svn_wc_entry_t
> structures in libsvn_wc.
> 
> So, you need to read svn_wc.h, and use that library.

Oops, I misread your mail... sorry!

You want 'info' about objects in the repository.  The answer is: call
svn_client_ls() in libsvn_client.  It returns a list of dirent
structures.



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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
But Ben, I want to do it for a remote repository. Not for the working copy.

E.g. Browsing http://svn.collab.net/repos/svn from http://mysite.com.

Thanks.
-- 
Shamim Islam
BA BS

Ben Collins-Sussman said:
> On Fri, 2003-11-07 at 13:25, Files wrote:
>
>> Is there a layer of the library that extracts the equivalent of the info
>> command for repositories other than the local working copy?
>
> Yes.  'svn info' just prints out the contents of .svn/entries.  The
> 'entries' in an entries-file are represented by svn_wc_entry_t
> structures in libsvn_wc.
>
> So, you need to read svn_wc.h, and use that library.
>
>
>


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

Re: OMG svn info https://?????

Posted by Ben Collins-Sussman <su...@collab.net>.
On Fri, 2003-11-07 at 13:25, Files wrote:

> Is there a layer of the library that extracts the equivalent of the info
> command for repositories other than the local working copy?

Yes.  'svn info' just prints out the contents of .svn/entries.  The
'entries' in an entries-file are represented by svn_wc_entry_t
structures in libsvn_wc.

So, you need to read svn_wc.h, and use that library.




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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
Ben,

Is there a layer of the library that extracts the equivalent of the info
command for repositories other than the local working copy?

Do I have to hand cobble that myself?

Thanks in advance.

I've looked in libsvn_ra so far, but I haven't quite got to where I want to be.

If you tell me that's the right place, I'll dig there a bit more.

-- 
Shamim Islam
BA BS



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

Re: OMG svn info https://?????

Posted by Ben Collins-Sussman <su...@collab.net>.
The main point here is that while the svn cmdline client produces
"parseable" output, it is not a fully-featured "programmable" thing. 
That's why we have C libraries with real data structures.   If you want
selective, detailed information about a repository, or a working copy,
or whatever, then the C libraries will hand you the appropriate data
structures.  You can then mine them to your heart's content.




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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
Brian Denny said:

> Now if your language of choice is PHP and there aren't any PHP bindings,
> that may be a problem for you.  Python seems quite easy to learn...  ;)

Awww nuts. Can I hit myself over the head w/ a baseball bat now? Yet another
language's innards to learn. lol

I've muddled around in Python enough to know I don't want to go there unless I
have to.

I had to fix the python extension example to fam.

Anyway. Thanks for the headsup.

-- 
Shamim Islam
BA BS

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

Re: OMG svn info https://?????

Posted by Brian Denny <br...@briandenny.net>.
Shamim,

Both "svn info" and "svn status" give information about the 
*working copy*, not the repository.  So I don't know what use that
information is to you if you're building a repository browser.

But FWIW, if you wanted to be able to display that kind of information
about a working copy, you would use the libsvn_wc API/bindings to
get yourself an "entry" object (struct), and look at the fields of that
object.  The reason, I imagine, that no-one's implemented a library
equivalent of 'svn info' is that that command essentially just
pretty-prints values out of an "entry" object which is already
obtainable through the API.


As far as building a repository browser, you'd probably be looking at
other libraries -- maybe libsvn_ra?   The point is that you should look
at the libraries to see at what layer the information you need is
provided.  It's not necessarily going to be in the client api, because, 
well, the client just isn't the kind of full-featured repository browser
that you're trying to build.


Now if your language of choice is PHP and there aren't any PHP bindings,
that may be a problem for you.  Python seems quite easy to learn...  ;)


-brian


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

Re: OMG svn info https://?????

Posted by Files <fi...@poetryunlimited.com>.
I looked. svn info isn't even in a library. All the other operations are.

svn info is hardcore wired into the working copy and I have no clue why.

Isn't the info call the equivalent of the stat call?

I mean, I know svn status isn't the same as unix stat.

Then again, svn status is hardwired into the working copy too. But that one
makes sense. It's supposed to be the status of the working copy.

But what about svn info? There is no library equivalent. :(

-- 
Shamim Islam
BA BS

Justin Erenkrantz said:
> --On Friday, November 07, 2003 00:44:02 -0500 Files
> <fi...@poetryunlimited.com> wrote:
>
>> Imagine this. You're creating a repository browser.
>>
>> Something that can walk a repository.
>>
>> And the file dates and times that are reported are reported inconstently
>> - the file time is dropped whenever the date is a year ago - no problem.
>
> I'd say that you should be using the bindings or the C API - writing
> parsers of the command-line output is a path destined to failure.  You've
> got to undo all of the nice user-centric tweaks to allow a program to
> interact with it.
>
> *shrug*  -- justin
>
BA BS

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

Re: OMG svn info https://?????

Posted by Justin Erenkrantz <ju...@erenkrantz.com>.
--On Friday, November 07, 2003 00:44:02 -0500 Files 
<fi...@poetryunlimited.com> wrote:

> Imagine this. You're creating a repository browser.
>
> Something that can walk a repository.
>
> And the file dates and times that are reported are reported inconstently
> - the file time is dropped whenever the date is a year ago - no problem.

I'd say that you should be using the bindings or the C API - writing 
parsers of the command-line output is a path destined to failure.  You've 
got to undo all of the nice user-centric tweaks to allow a program to 
interact with it.

*shrug*  -- justin

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