You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Jay Freeman (saurik)" <sa...@saurik.com> on 2002/02/10 20:24:30 UTC
svn_wc_status() unversioned semantics for non-wc files
Is there a way to figure out if a file just has absolutely nothing to do
with a working copy? I could have sworn those files used to return NULL
(with no error condition) from svn_wc_status(), but now they are
spitting out a status object where everything is set to unversioned.
The annoyance with this is that that is the same thing that is returned
for some random file that just so happens to be in a working copy but is
neither ignored nor added. (Well, worse, I've been getting that back
for files that _are_ in working copies and _are_ versioned and should be
returning "normal", but that seems like a different problem.) The
reason I'm playing with this is for a shell extension on Windows. If
you right click an unversioned file that is in a working copy, I'd like
to allow you to right click the file and do an "add" on it, but if the
file isn't in a working copy I want to not do anything. I figure the
current behavior is good enough for me to continue with the property
sheet, though, as you are unlikely to have much need for a property
sheet on unversioned files no matter where they are.
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
Re: svn_wc_status() unversioned semantics for non-wc files
Posted by Branko Čibej <br...@xbc.nu>.
Jay Freeman (saurik) wrote:
>I'm currently working with 1235. I'll do an update. Note that the
>problem I'm getting is specifically when I'm passing in absolute paths.
>I haven't tried it with non-absolute paths (the command line client
>seems like it was working, and I would assume it requires this
>functionality to be operational, so I can only assume relative paths
>work). I get the paths from the shell through various means
>(IShellExtInit mainly).
>
Possibly absolute paths are the culprit. If so, we need to fix that.
>
>
>Sincerely,
>Jay Freeman (saurik)
>saurik@saurik.com
>
>-----Original Message-----
>From: Branko Cibej [mailto:brane@xbc.nu]
>Sent: Monday, February 11, 2002 2:46 PM
>To: Jay Freeman (saurik)
>Cc: dev@subversion.tigris.org
>Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>
>Jay Freeman (saurik) wrote:
>
>>Seeing as all files, even versioned files, are showing up as
>>"unversioned" to me due to weird Win32 issues, I'm not going to be able
>>to do a patch for this currently :). (I believe it is the / vs. \
>>issue, Subversion insists on letting /'s get down through the APR
>>
>layer,
>
>>but even changing all of the /'s results in a filename that doesn't
>>exist, so maybe not.) I need to look more into that first.
>>
>Strange. I'm not seeing this problem. Certainly APR is supposed to
>handle /->\ conversion for us. I don't think that's really what's
>happening.
>
>BTW, when was the last time you updated svn? I did some hacks around
>rev. 1235 to make the trunk work on Win32.
>
>>Sincerely,
>>Jay Freeman (saurik)
>>saurik@saurik.com
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn_wc_status() unversioned semantics for non-wc files
Posted by "Jay Freeman (saurik)" <sa...@saurik.com>.
I'm currently working with 1235. I'll do an update. Note that the
problem I'm getting is specifically when I'm passing in absolute paths.
I haven't tried it with non-absolute paths (the command line client
seems like it was working, and I would assume it requires this
functionality to be operational, so I can only assume relative paths
work). I get the paths from the shell through various means
(IShellExtInit mainly).
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
-----Original Message-----
From: Branko Cibej [mailto:brane@xbc.nu]
Sent: Monday, February 11, 2002 2:46 PM
To: Jay Freeman (saurik)
Cc: dev@subversion.tigris.org
Subject: Re: svn_wc_status() unversioned semantics for non-wc files
Jay Freeman (saurik) wrote:
>Seeing as all files, even versioned files, are showing up as
>"unversioned" to me due to weird Win32 issues, I'm not going to be able
>to do a patch for this currently :). (I believe it is the / vs. \
>issue, Subversion insists on letting /'s get down through the APR
layer,
>but even changing all of the /'s results in a filename that doesn't
>exist, so maybe not.) I need to look more into that first.
>
Strange. I'm not seeing this problem. Certainly APR is supposed to
handle /->\ conversion for us. I don't think that's really what's
happening.
BTW, when was the last time you updated svn? I did some hacks around
rev. 1235 to make the trunk work on Win32.
>Sincerely,
>Jay Freeman (saurik)
>saurik@saurik.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn_wc_status() unversioned semantics for non-wc files
Posted by Branko Čibej <br...@xbc.nu>.
Jay Freeman (saurik) wrote:
>Branko:
>
>OK, I might have misinterpreted your previous comment that APR deals
>with this, but the fix was to call svn_path_internal_style() from my
>code before passing the path to Subversion.
>
Well, that rocks!
>I've left the remainder of this e-mail just for kicks:
>
>========== OLD ===========
>
>OK, you know what... the specific errors I was looking at were supposed
>to be errors :). The calls are still incorrect, however.
>
>If you want to skip to the corrected analysis, skip down to the
><HERE!!!>.
>
>Here is what I'm seeing.
>
>I get a failure in apr_file_open() when it calls CreateFile().
>The error is ERROR_PATH_NOT_FOUND.
>
>apr_file_open() is being passed:
>"D:\Code\ninetjer\external\subversion\.svn/.svn/README"
>
>open_adm_file() is being passed:
>"D:\Code\ninetjer\external\subversion\.svn" and "README"
>and using v_extend_with_adm_name() to add "/.svn/README"
>
>Back through svn_wc__open_adm_file() to svn_wc_check_wc().
>
>When svn_wc_check_wc() gets this error, it assumes the entire deal isn't
>a working copy.
>
>Here is where I made my mistake. I'm looking at a call that
>legitimately isn't a working copy. However, CreateFile() shouldn't have
>been passed '/' even regardless.
>
><HERE!!!>
>
>When you pass in a legitimate file (directories work), Subversion goes
>through this process and tries to open:
>
>"./.svn/README"
>
>OK, here open_adm_file() is being passed ".". So is svn_wc_check_wc().
>
>Here is where it gets interesting: svn_wc_entry() is being passed:
>
>"D:\Code\ninetjer\external\subversion\BUGS"
>
>It calls svn_path_split() to get:
>
>Basename: "D:\Code\ninetjer\external\subversion\BUGS"
>Dir: ""
>
>Which obviously isn't going to work. Likely it's assuming the usage of
>the internal path separator on that.
>
>========== END OLD ===========
>
>Sincerely,
>Jay Freeman (saurik)
>saurik@saurik.com
>
>-----Original Message-----
>From: Branko Cibej [mailto:brane@xbc.nu]
>Sent: Monday, February 11, 2002 2:46 PM
>To: Jay Freeman (saurik)
>Cc: dev@subversion.tigris.org
>Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>
>Jay Freeman (saurik) wrote:
>
>>Seeing as all files, even versioned files, are showing up as
>>"unversioned" to me due to weird Win32 issues, I'm not going to be able
>>to do a patch for this currently :). (I believe it is the / vs. \
>>issue, Subversion insists on letting /'s get down through the APR
>>
>layer,
>
>>but even changing all of the /'s results in a filename that doesn't
>>exist, so maybe not.) I need to look more into that first.
>>
>Strange. I'm not seeing this problem. Certainly APR is supposed to
>handle /->\ conversion for us. I don't think that's really what's
>happening.
>
>BTW, when was the last time you updated svn? I did some hacks around
>rev. 1235 to make the trunk work on Win32.
>
>>Sincerely,
>>Jay Freeman (saurik)
>>saurik@saurik.com
>>
>
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn_wc_status() unversioned semantics for non-wc files
Posted by "Jay Freeman (saurik)" <sa...@saurik.com>.
Branko:
OK, I might have misinterpreted your previous comment that APR deals
with this, but the fix was to call svn_path_internal_style() from my
code before passing the path to Subversion.
I've left the remainder of this e-mail just for kicks:
========== OLD ===========
OK, you know what... the specific errors I was looking at were supposed
to be errors :). The calls are still incorrect, however.
If you want to skip to the corrected analysis, skip down to the
<HERE!!!>.
Here is what I'm seeing.
I get a failure in apr_file_open() when it calls CreateFile().
The error is ERROR_PATH_NOT_FOUND.
apr_file_open() is being passed:
"D:\Code\ninetjer\external\subversion\.svn/.svn/README"
open_adm_file() is being passed:
"D:\Code\ninetjer\external\subversion\.svn" and "README"
and using v_extend_with_adm_name() to add "/.svn/README"
Back through svn_wc__open_adm_file() to svn_wc_check_wc().
When svn_wc_check_wc() gets this error, it assumes the entire deal isn't
a working copy.
Here is where I made my mistake. I'm looking at a call that
legitimately isn't a working copy. However, CreateFile() shouldn't have
been passed '/' even regardless.
<HERE!!!>
When you pass in a legitimate file (directories work), Subversion goes
through this process and tries to open:
"./.svn/README"
OK, here open_adm_file() is being passed ".". So is svn_wc_check_wc().
Here is where it gets interesting: svn_wc_entry() is being passed:
"D:\Code\ninetjer\external\subversion\BUGS"
It calls svn_path_split() to get:
Basename: "D:\Code\ninetjer\external\subversion\BUGS"
Dir: ""
Which obviously isn't going to work. Likely it's assuming the usage of
the internal path separator on that.
========== END OLD ===========
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
-----Original Message-----
From: Branko Cibej [mailto:brane@xbc.nu]
Sent: Monday, February 11, 2002 2:46 PM
To: Jay Freeman (saurik)
Cc: dev@subversion.tigris.org
Subject: Re: svn_wc_status() unversioned semantics for non-wc files
Jay Freeman (saurik) wrote:
>Seeing as all files, even versioned files, are showing up as
>"unversioned" to me due to weird Win32 issues, I'm not going to be able
>to do a patch for this currently :). (I believe it is the / vs. \
>issue, Subversion insists on letting /'s get down through the APR
layer,
>but even changing all of the /'s results in a filename that doesn't
>exist, so maybe not.) I need to look more into that first.
>
Strange. I'm not seeing this problem. Certainly APR is supposed to
handle /->\ conversion for us. I don't think that's really what's
happening.
BTW, when was the last time you updated svn? I did some hacks around
rev. 1235 to make the trunk work on Win32.
>Sincerely,
>Jay Freeman (saurik)
>saurik@saurik.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn_wc_status() unversioned semantics for non-wc files
Posted by Branko Čibej <br...@xbc.nu>.
Jay Freeman (saurik) wrote:
>Seeing as all files, even versioned files, are showing up as
>"unversioned" to me due to weird Win32 issues, I'm not going to be able
>to do a patch for this currently :). (I believe it is the / vs. \
>issue, Subversion insists on letting /'s get down through the APR layer,
>but even changing all of the /'s results in a filename that doesn't
>exist, so maybe not.) I need to look more into that first.
>
Strange. I'm not seeing this problem. Certainly APR is supposed to
handle /->\ conversion for us. I don't think that's really what's happening.
BTW, when was the last time you updated svn? I did some hacks around
rev. 1235 to make the trunk work on Win32.
>Sincerely,
>Jay Freeman (saurik)
>saurik@saurik.com
>
>-----Original Message-----
>From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
>Sent: Monday, February 11, 2002 2:13 PM
>To: Jay Freeman (saurik)
>Cc: dev@subversion.tigris.org
>Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>
>"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
>
>>I'd say we are saying promises that aren't useful :). The same thing
>>
>is
>
>>returned for new files that have never been seen before in working
>>copies as is for paths that aren't even in working copies. There
>>doesn't seem to be an obvious way to differentiate /etc/passwd from
>>/home/saurik/code/subversion/fileIDidntAddYet.
>>
>
>Ah. You want a code for "unversioned, but inside a versioned dir" or
>something like that, is that right?
>
>That seems reasonable, yeah. I mean, technically the caller could do
>a separate status check on the parent of the original path, but since
>the first status check has all the information needed to answer the
>question completely, it might as well do so.
>
>Got time to make a patch?
>
>-K
>
>>Sincerely,
>>Jay Freeman (saurik)
>>saurik@saurik.com
>>
>>-----Original Message-----
>>From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
>>Sent: Monday, February 11, 2002 12:03 PM
>>To: Jay Freeman (saurik)
>>Cc: dev@subversion.tigris.org
>>Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>>
>>"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
>>
>>>Is there a way to figure out if a file just has absolutely nothing
>>>
>to
>
>>do
>>
>>>with a working copy? I could have sworn those files used to return
>>>
>>NULL
>>
>>>(with no error condition) from svn_wc_status(), but now they are
>>>spitting out a status object where everything is set to unversioned.
>>>
>>Doc string for svn_wc_status() says this:
>>
>> svn_wc_status_none : PATH is not versioned, and is either not
>> present on disk, or is ignored by the
>> svn:ignore property setting for PATH's
>> parent directory.
>>
>> svn_wc_status_absent : 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).
>>
>>Are we seeing behavior that breaks these promises, or are we seeing
>>callers that aren't checking for these values correctly?
>>
>>-K
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>>For additional commands, e-mail: dev-help@subversion.tigris.org
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
>For additional commands, e-mail: dev-help@subversion.tigris.org
>
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn_wc_status() unversioned semantics for non-wc files
Posted by "Jay Freeman (saurik)" <sa...@saurik.com>.
Seeing as all files, even versioned files, are showing up as
"unversioned" to me due to weird Win32 issues, I'm not going to be able
to do a patch for this currently :). (I believe it is the / vs. \
issue, Subversion insists on letting /'s get down through the APR layer,
but even changing all of the /'s results in a filename that doesn't
exist, so maybe not.) I need to look more into that first.
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
-----Original Message-----
From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
Sent: Monday, February 11, 2002 2:13 PM
To: Jay Freeman (saurik)
Cc: dev@subversion.tigris.org
Subject: Re: svn_wc_status() unversioned semantics for non-wc files
"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> I'd say we are saying promises that aren't useful :). The same thing
is
> returned for new files that have never been seen before in working
> copies as is for paths that aren't even in working copies. There
> doesn't seem to be an obvious way to differentiate /etc/passwd from
> /home/saurik/code/subversion/fileIDidntAddYet.
Ah. You want a code for "unversioned, but inside a versioned dir" or
something like that, is that right?
That seems reasonable, yeah. I mean, technically the caller could do
a separate status check on the parent of the original path, but since
the first status check has all the information needed to answer the
question completely, it might as well do so.
Got time to make a patch?
-K
> Sincerely,
> Jay Freeman (saurik)
> saurik@saurik.com
>
> -----Original Message-----
> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
> Sent: Monday, February 11, 2002 12:03 PM
> To: Jay Freeman (saurik)
> Cc: dev@subversion.tigris.org
> Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>
> "Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> > Is there a way to figure out if a file just has absolutely nothing
to
> do
> > with a working copy? I could have sworn those files used to return
> NULL
> > (with no error condition) from svn_wc_status(), but now they are
> > spitting out a status object where everything is set to unversioned.
>
> Doc string for svn_wc_status() says this:
>
> svn_wc_status_none : PATH is not versioned, and is either not
> present on disk, or is ignored by the
> svn:ignore property setting for PATH's
> parent directory.
>
> svn_wc_status_absent : 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).
>
> Are we seeing behavior that breaks these promises, or are we seeing
> callers that aren't checking for these values correctly?
>
> -K
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn_wc_status() unversioned semantics for non-wc files
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> I'd say we are saying promises that aren't useful :). The same thing is
> returned for new files that have never been seen before in working
> copies as is for paths that aren't even in working copies. There
> doesn't seem to be an obvious way to differentiate /etc/passwd from
> /home/saurik/code/subversion/fileIDidntAddYet.
Ah. You want a code for "unversioned, but inside a versioned dir" or
something like that, is that right?
That seems reasonable, yeah. I mean, technically the caller could do
a separate status check on the parent of the original path, but since
the first status check has all the information needed to answer the
question completely, it might as well do so.
Got time to make a patch?
-K
> Sincerely,
> Jay Freeman (saurik)
> saurik@saurik.com
>
> -----Original Message-----
> From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
> Sent: Monday, February 11, 2002 12:03 PM
> To: Jay Freeman (saurik)
> Cc: dev@subversion.tigris.org
> Subject: Re: svn_wc_status() unversioned semantics for non-wc files
>
> "Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> > Is there a way to figure out if a file just has absolutely nothing to
> do
> > with a working copy? I could have sworn those files used to return
> NULL
> > (with no error condition) from svn_wc_status(), but now they are
> > spitting out a status object where everything is set to unversioned.
>
> Doc string for svn_wc_status() says this:
>
> svn_wc_status_none : PATH is not versioned, and is either not
> present on disk, or is ignored by the
> svn:ignore property setting for PATH's
> parent directory.
>
> svn_wc_status_absent : 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).
>
> Are we seeing behavior that breaks these promises, or are we seeing
> callers that aren't checking for these values correctly?
>
> -K
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
RE: svn_wc_status() unversioned semantics for non-wc files
Posted by "Jay Freeman (saurik)" <sa...@saurik.com>.
Karl:
I'd say we are saying promises that aren't useful :). The same thing is
returned for new files that have never been seen before in working
copies as is for paths that aren't even in working copies. There
doesn't seem to be an obvious way to differentiate /etc/passwd from
/home/saurik/code/subversion/fileIDidntAddYet.
Sincerely,
Jay Freeman (saurik)
saurik@saurik.com
-----Original Message-----
From: Karl Fogel [mailto:kfogel@newton.ch.collab.net]
Sent: Monday, February 11, 2002 12:03 PM
To: Jay Freeman (saurik)
Cc: dev@subversion.tigris.org
Subject: Re: svn_wc_status() unversioned semantics for non-wc files
"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> Is there a way to figure out if a file just has absolutely nothing to
do
> with a working copy? I could have sworn those files used to return
NULL
> (with no error condition) from svn_wc_status(), but now they are
> spitting out a status object where everything is set to unversioned.
Doc string for svn_wc_status() says this:
svn_wc_status_none : PATH is not versioned, and is either not
present on disk, or is ignored by the
svn:ignore property setting for PATH's
parent directory.
svn_wc_status_absent : 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).
Are we seeing behavior that breaks these promises, or are we seeing
callers that aren't checking for these values correctly?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: svn_wc_status() unversioned semantics for non-wc files
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
"Jay Freeman \(saurik\)" <sa...@saurik.com> writes:
> Is there a way to figure out if a file just has absolutely nothing to do
> with a working copy? I could have sworn those files used to return NULL
> (with no error condition) from svn_wc_status(), but now they are
> spitting out a status object where everything is set to unversioned.
Doc string for svn_wc_status() says this:
svn_wc_status_none : PATH is not versioned, and is either not
present on disk, or is ignored by the
svn:ignore property setting for PATH's
parent directory.
svn_wc_status_absent : 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).
Are we seeing behavior that breaks these promises, or are we seeing
callers that aren't checking for these values correctly?
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org