You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Arild Fines <ar...@broadpark.no> on 2004/09/10 01:11:26 UTC

Doc string for svn_wc_status misleading?

The doc string for svn_wc_status states the following:

[[
Here are some things to note about the returned structure. A quick
examination of the status->text_status after a successful return of this
function can reveal the following things:

svn_wc_status_none : path is not versioned, and is either not present on
disk, or is ignored by svn's default ignore regular expressions or the
svn:ignore property setting for path's parent directory.

svn_wc_status_missing : path is versioned, but is missing from the working
copy.

svn_wc_status_unversioned : path is not versioned, but is present on disk
and not being ignored (see above).
]]

Looking at the code, there does not seem to be any way for text_status to be
set to svn_wc_status_none for an ignored file. This means it is impossible
to detect an ignored file using svn_wc_status alone.

--
Arild

AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
IRC: irc://irc.freenode.net/ankhsvn

"Weaseling out of things is good. It's what separates us from the other
animals....except weasels." -- Homer Simpson


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

Re: Doc string for svn_wc_status misleading?

Posted by Julian Foad <ju...@btopenworld.com>.
Arild Fines wrote:
> cmpilato@localhost.localdomain wrote:
> 
>>"Arild Fines" <ar...@broadpark.no> writes:
>>
>>>Looking at the code, there does not seem to be any way for
>>>text_status to be set to svn_wc_status_none for an ignored
>>>file. This means it is impossible to detect an ignored file using
>>>svn_wc_status alone.
>>
>>The docstring is just out of date, I think.  Here's a code comment
>>that seems to explain the state of the real world:
>>
>>      /* If this path has no entry, but IS present on disk, it's
>>         unversioned.  If this file is being explicitly ignored (due
>>         to matching an ignore-pattern), the text_status is set to
>>         svn_wc_status_ignored.  Otherwise the text_status is set to
>>         svn_wc_status_unversioned. */
> 
> Yes, I saw that commment in assemble_status. However, the following block
> performs a check for the is_ignored parameter, which is always passed from
> svn_wc_status as FALSE:

So, is the doc string or that code comment (or both) actually wrong?  If so, we should first fix the comment (perhaps with a note that the behaviour is not what we would really like).  Then discuss fixing the API.

- Julian


>   SVN_ERR (assemble_status (status, path, adm_access, entry, parent_entry,
>                             svn_node_unknown, TRUE, FALSE, pool));
> 
> The last FALSE is is_ignored. That brings us back to my original point: It
> is impossible to get information about ignore status out of svn_wc_status.

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

RE: Doc string for svn_wc_status misleading?

Posted by Arild Fines <ar...@broadpark.no>.
cmpilato@localhost.localdomain wrote:
> "Arild Fines" <ar...@broadpark.no> writes:
>
>> Looking at the code, there does not seem to be any way for
>> text_status to be set to svn_wc_status_none for an ignored
>> file. This means it is impossible to detect an ignored file using
>> svn_wc_status alone.
>
> The docstring is just out of date, I think.  Here's a code comment
> that seems to explain the state of the real world:
>
>       /* If this path has no entry, but IS present on disk, it's
>          unversioned.  If this file is being explicitly ignored (due
>          to matching an ignore-pattern), the text_status is set to
>          svn_wc_status_ignored.  Otherwise the text_status is set to
>          svn_wc_status_unversioned. */

Yes, I saw that commment in assemble_status. However, the following block
performs a check for the is_ignored parameter, which is always passed from
svn_wc_status as FALSE:

  SVN_ERR (assemble_status (status, path, adm_access, entry, parent_entry,
                            svn_node_unknown, TRUE, FALSE, pool));

The last FALSE is is_ignored. That brings us back to my original point: It
is impossible to get information about ignore status out of svn_wc_status.

--
Arild

AnkhSVN: http://ankhsvn.tigris.org
Blog: http://ankhsvn.com/blog
IRC: irc://irc.freenode.net/ankhsvn

"Weaseling out of things is good. It's what separates us from the other
animals....except weasels." -- Homer Simpson


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

Re: Doc string for svn_wc_status misleading?

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Arild Fines" <ar...@broadpark.no> writes:

> Looking at the code, there does not seem to be any way for
> text_status to be set to svn_wc_status_none for an ignored
> file. This means it is impossible to detect an ignored file using
> svn_wc_status alone.

The docstring is just out of date, I think.  Here's a code comment
that seems to explain the state of the real world:

      /* If this path has no entry, but IS present on disk, it's
         unversioned.  If this file is being explicitly ignored (due
         to matching an ignore-pattern), the text_status is set to
         svn_wc_status_ignored.  Otherwise the text_status is set to
         svn_wc_status_unversioned. */

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