You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jon Middleton <jj...@ixtab.org.uk> on 2002/12/08 15:58:23 UTC

svn_wc_status_unversioned and svn_wc_status_none

Hi,

I've been looking at the swig bindings and trying to write a couple of
functions to check if a file is unversioned or is ignored (ie has
status svn_wc_status_none and not svn_wc_status_unversioned).

It would seem that on querying apr_hash_t (from svn.wc.svn_wc_status)
with svn_wc_status_t_text_status_get() it always returns
svn_wc_status_unversioned and never svn.wc.svn_wc_status_none even
when the file should be ignored.

Looking back though the list archives and there's a patch from Jon
Trowbridge (29 Aug 2002 and 17 Oct) that should fix this problem, but
there were issues with it and has been commited.

Is there anyway round this problem without this patch or does it need
to be picked up again ?

-- 
Jon

"First things first -- but not necessarily in that order"
                -- The Doctor, "Doctor Who"		

Re: svn_wc_status_unversioned and svn_wc_status_none

Posted by Jon Middleton <jj...@ixtab.org.uk>.
On Mon, Dec 09, 2002 at 03:08:05PM -0600, Karl Fogel wrote:
> 
> Could you write up a short spec that says how Subversion behaves now,
> versus how it would behave after your patch?  Target audience for the
> spec is someone who has read the svn book, but not this thread.

ok, here goes - 

In svn_wc.h it states the there the following two states for a
unversioned file in the working copy:

  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_unversioned : PATH is not versioned, but is
                              present on disk and not being
                              ignored (see above).

But it turns out that svn status display differs depending on how it's
called, follows some ate some example outputs from svn status

  jjm@ixchel:examples$ svn status check-modified.py~
  ?      check-modified.py~

  jjm@ixchel:examples$ svn status --no-ignore check-modified.py~
  ?      check-modified.py~

  jjm@ixchel:examples$ svn status --no-ignore 
  M      check-modified.py
         check-modified.py~
  ?      foo

  jjm@ixchel:examples$ svn st 
  M      check-modified.py
  ?      foo

I prepose that a extra letter ("I" ?) be added to the status output so
that it is possible distinguish between a unmodifed file under
revision control and an ignored file. The following is how the above
output would after this change.

  jjm@ixchel:examples$ svn status check-modified.py~
  I      check-modified.py~

  jjm@ixchel:examples$ svn status --no-ignore check-modified.py~
  I      check-modified.py~

  jjm@ixchel:examples$ svn status --no-ignore 
  M      check-modified.py
  I      check-modified.py~
  ?      foo

  jjm@ixchel:examples$ svn st 
  M      check-modified.py
  ?      foo

Also the function svn_wc_status will currently only return
svn_wc_status_unversioned for a file which unversioned or ignored, I
propose that this function be modified will set the status of a
ignored file to svn_wc_status_none instead of svn_wc_status_unversioned.

Comments ?

-- 
Jon

"First things first -- but not necessarily in that order"
                -- The Doctor, "Doctor Who"		

Re: svn_wc_status_unversioned and svn_wc_status_none

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Jon Middleton <jj...@ixtab.org.uk> writes:
> I seem to have misread svn_wc_status - after looking it some more, it
> seems that svn_wc_status does not construct (and then use) the ignore
> list so that it set no_ignore to the correct value when calling
> assemble_status.
>
> I should be able to do this next week, but I'm busy for the rest of
> this week. Would such a patch be acceptable ?

At this point, there's so much context here that I'm not sure exactly
what you're proposing :-).

Could you write up a short spec that says how Subversion behaves now,
versus how it would behave after your patch?  Target audience for the
spec is someone who has read the svn book, but not this thread.

-Karl

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

Re: svn_wc_status_unversioned and svn_wc_status_none

Posted by Jon Middleton <jj...@ixtab.org.uk>.
On Mon, Dec 09, 2002 at 06:59:23PM +0000, Jon Middleton wrote:
> 
> I've had a look at the patch (r3746) and at the svn_wc_status
> function.  As svn_wc_status is likely to be called with a filename (as
> I'm doing from the swig bindings) it would be nice if it defaulted to
> no_ignore=True for assemble_status, so that ignored files get the
> right status set, or if this is not possible a no_ignore option is
> added so there a svn_wc_statuses like..

I seem to have misread svn_wc_status - after looking it some more, it
seems that svn_wc_status does not construct (and then use) the ignore
list so that it set no_ignore to the correct value when calling
assemble_status.

I should be able to do this next week, but I'm busy for the rest of
this week. Would such a patch be acceptable ?

-- 
Jon

"First things first -- but not necessarily in that order"
                -- The Doctor, "Doctor Who"		

Re: svn_wc_status_unversioned and svn_wc_status_none

Posted by Jon Middleton <jj...@ixtab.org.uk>.
On Mon, Dec 09, 2002 at 07:53:22AM -0600, Ben Collins-Sussman wrote:
> Jon Middleton <jj...@ixtab.org.uk> writes:
> 
> > Hi,
> > 
> > I've been looking at the swig bindings and trying to write a couple of
> > functions to check if a file is unversioned or is ignored (ie has
> > status svn_wc_status_none and not svn_wc_status_unversioned).
> > 
> > It would seem that on querying apr_hash_t (from svn.wc.svn_wc_status)
> > with svn_wc_status_t_text_status_get() it always returns
> > svn_wc_status_unversioned and never svn.wc.svn_wc_status_none even
> > when the file should be ignored.
> > 
> > Looking back though the list archives and there's a patch from Jon
> > Trowbridge (29 Aug 2002 and 17 Oct) that should fix this problem, but
> > there were issues with it and has been commited.
> 
> Hmmm... I committed Jon's patch already to specifically fix this
> problem.  Are you getting this behavior with your ordinary commandline
> client?  Maybe you're (accidentally) still using old swig bindings for
> libsvn_wc?

I do not get this behavior with the command line client and as I'm
also using self compiled debs (r4054 + a swig patch [1]) I should not be
using an out of date bindings.

I've had a look at the patch (r3746) and at the svn_wc_status
function.  As svn_wc_status is likely to be called with a filename (as
I'm doing from the swig bindings) it would be nice if it defaulted to
no_ignore=True for assemble_status, so that ignored files get the
right status set, or if this is not possible a no_ignore option is
added so there a svn_wc_statuses like..

-- 
Jon

"First things first -- but not necessarily in that order"
                -- The Doctor, "Doctor Who"		

[1] The swig patch that I posted last night is needed to use these
    functions though the swig bindings.

Re: svn_wc_status_unversioned and svn_wc_status_none

Posted by Ben Collins-Sussman <su...@collab.net>.
Jon Middleton <jj...@ixtab.org.uk> writes:

> Hi,
> 
> I've been looking at the swig bindings and trying to write a couple of
> functions to check if a file is unversioned or is ignored (ie has
> status svn_wc_status_none and not svn_wc_status_unversioned).
> 
> It would seem that on querying apr_hash_t (from svn.wc.svn_wc_status)
> with svn_wc_status_t_text_status_get() it always returns
> svn_wc_status_unversioned and never svn.wc.svn_wc_status_none even
> when the file should be ignored.
> 
> Looking back though the list archives and there's a patch from Jon
> Trowbridge (29 Aug 2002 and 17 Oct) that should fix this problem, but
> there were issues with it and has been commited.

Hmmm... I committed Jon's patch already to specifically fix this
problem.  Are you getting this behavior with your ordinary commandline
client?  Maybe you're (accidentally) still using old swig bindings for
libsvn_wc?

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