You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "罗勇刚 (Yonggang Luo)" <lu...@gmail.com> on 2011/10/19 19:33:58 UTC
How to use get_log along with path kind {file,directory}?
rt.
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Re: How to use get_log along with path kind {file,directory}?
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 01:09:41PM +0200, Stefan Sperling wrote:
> On Thu, Oct 20, 2011 at 06:57:47PM +0800, 罗勇刚(Yonggang Luo) wrote:
> > If the server restricted me to get the kind, what's the fastest way to fetch
> > it in other way?
>
> No. The whole point of authorization is to prevent unauthorized
> clients from getting this information. If you can work around it
> you have found a security hole.
To put it another way: The fastest way of getting the node
kind of an authz-restricted path is to ask the server administrator
or some other user who has access to the path :)
Re: How to use get_log along with path kind {file,directory}?
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 06:57:47PM +0800, 罗勇刚(Yonggang Luo) wrote:
> 在 2011年10月20日星期四,Stefan Sperling 写道:
> > Only 1.6 and better support svn_log_changed_path2_t.
> > Older servers will return svn_log_changed_path_t, which doesn't
> > have the node kind:
> >
> > http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path__t.html
>
> So that's totally depending on the server, on more question, is that means
> properties modified and text modified only support by server newer than or
> just be subversion server 1.7?
Yes.
With older servers, you can try to list the node to get its kind.
See these links:
http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__dirent__t.html
http://people.apache.org/~hwright/svn/doc/api/trunk/group__List.html#ga3ac4238fdc4d135798fdcce31bff829a
http://people.apache.org/~hwright/svn/doc/api/trunk/group__List.html#gad34331c2f22f8b5ee906c4abff0866d0
> If the server restricted me to get the kind, what's the fastest way to fetch
> it in other way?
No. The whole point of authorization is to prevent unauthorized
clients from getting this information. If you can work around it
you have found a security hole.
How to use get_log along with path kind {file,directory}?
Posted by "罗勇刚 (Yonggang Luo)" <lu...@gmail.com>.
在 2011年10月20日星期四,Stefan Sperling 写道:
> On Thu, Oct 20, 2011 at 06:28:07PM +0800, 罗勇刚(Yonggang Luo) wrote:
> > Thanks, that's impressive,
> > The type of the node, may be svn_node_unknown.: When this happened, is
> that
> > depending on the server or other condition?
>
> Maybe you are not allowed to see the path because of access
> restrictions.
>
> > *Are properties modified, may be svn_tristate_unknown.
>
> Again, 'unknown' means the server is not allowed to tell you
> because the administrator configured restrictive access rights
> for the path.
>
> > *Did old servers support for this?
>
> Only 1.6 and better support svn_log_changed_path2_t.
> Older servers will return svn_log_changed_path_t, which doesn't
> have the node kind:
>
> http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path__t.html
So that's totally depending on the server, on more question, is that means
properties modified and text modified only support by server newer than or
just be subversion server 1.7?
If the server restricted me to get the kind, what's the fastest way to fetch
it in other way?
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Re: How to use get_log along with path kind {file,directory}?
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 06:28:07PM +0800, 罗勇刚(Yonggang Luo) wrote:
> Thanks, that's impressive,
> The type of the node, may be svn_node_unknown.: When this happened, is that
> depending on the server or other condition?
Maybe you are not allowed to see the path because of access
restrictions.
> *Are properties modified, may be svn_tristate_unknown.
Again, 'unknown' means the server is not allowed to tell you
because the administrator configured restrictive access rights
for the path.
> *Did old servers support for this?
Only 1.6 and better support svn_log_changed_path2_t.
Older servers will return svn_log_changed_path_t, which doesn't
have the node kind:
http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path__t.html
Re: How to use get_log along with path kind {file,directory}?
Posted by "罗勇刚 (Yonggang Luo)" <lu...@gmail.com>.
Thanks, that's impressive,
The type of the node, may be svn_node_unknown.: When this happened, is that
depending on the server or other condition?
*Are properties modified, may be svn_tristate_unknown. *Did old servers
support for this?
also with text_modified<http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path2__t.html#afc14fcfc8e3a3b754dbf8803c4731dd5>
>
> On Thu, Oct 20, 2011 at 09:01:52AM +0800, 罗勇刚(Yonggang Luo) wrote:
> > I didn't received the reply, so I repost it, because I am just
> > subscribe to this list. Btw, can you be more specified, I didn't found
> > the place how get_log along with path kind.
>
> I assume your quesiton is about the API, rather than the command
> line client, correct?
>
> See the definition of svn_log_changed_path2_t:
>
> http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path2__t.html
> That data structure has the node kind.
>
> You can get it via svn_ra_get_log2():
>
> http://people.apache.org/~hwright/svn/doc/api/trunk/svn__ra_8h.html#a366d8ab12ae02fcade47bcbda7078f0a
> from the changed_paths2 member of the svn_log_entry_t argument
>
> http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__entry__t.html
> which is passed to the log receiver you have to implement to use
> svn_ra_get_log2():
> http://people.apache.org/~hwright/svn/doc/api/trunk/svn__types_8h.html#afb30054d6301afbcd8b00d8dc11d7ddb
>
> Hope this helps.
>
--
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Re: How to use get_log along with path kind {file,directory}?
Posted by Stefan Sperling <st...@elego.de>.
On Thu, Oct 20, 2011 at 09:01:52AM +0800, 罗勇刚(Yonggang Luo) wrote:
> I didn't received the reply, so I repost it, because I am just
> subscribe to this list. Btw, can you be more specified, I didn't found
> the place how get_log along with path kind.
I assume your quesiton is about the API, rather than the command
line client, correct?
See the definition of svn_log_changed_path2_t:
http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__changed__path2__t.html
That data structure has the node kind.
You can get it via svn_ra_get_log2():
http://people.apache.org/~hwright/svn/doc/api/trunk/svn__ra_8h.html#a366d8ab12ae02fcade47bcbda7078f0a
from the changed_paths2 member of the svn_log_entry_t argument
http://people.apache.org/~hwright/svn/doc/api/trunk/structsvn__log__entry__t.html
which is passed to the log receiver you have to implement to use
svn_ra_get_log2(): http://people.apache.org/~hwright/svn/doc/api/trunk/svn__types_8h.html#afb30054d6301afbcd8b00d8dc11d7ddb
Hope this helps.
Re: How to use get_log along with path kind {file,directory}?
Posted by "罗勇刚 (Yonggang Luo)" <lu...@gmail.com>.
I didn't received the reply, so I repost it, because I am just
subscribe to this list. Btw, can you be more specified, I didn't found
the place how get_log along with path kind.
2011/10/20, Daniel Shahaf <d....@daniel.shahaf.name>:
> Please don't keep re-posting the same question on a daily basis.
>
> The answer is in the manual.
>
> Someone replied to your post with another answer.
>
> 罗勇刚(Yonggang Luo) wrote on Thu, Oct 20, 2011 at 01:33:58 +0800:
>> rt.
>>
>> --
>> 此致
>> 礼
>> 罗勇刚
>> Yours
>> sincerely,
>> Yonggang Luo
>
--
从我的移动设备发送
此致
礼
罗勇刚
Yours
sincerely,
Yonggang Luo
Re: How to use get_log along with path kind {file,directory}?
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Please don't keep re-posting the same question on a daily basis.
The answer is in the manual.
Someone replied to your post with another answer.
罗勇刚(Yonggang Luo) wrote on Thu, Oct 20, 2011 at 01:33:58 +0800:
> rt.
>
> --
> 此致
> 礼
> 罗勇刚
> Yours
> sincerely,
> Yonggang Luo