[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Was: Enhancement needed in svn status -u

From: Paul Burba <PaulB_at_softlanding.com>
Date: 2005-08-23 18:09:14 CEST

Mark Phippard <MarkP@softlanding.com> wrote on 08/23/2005 10:37:31 AM:

> In summary, I would propose that at a minimum we ditch the new URL and
> kind fields from this structure and instead update the existing fields
in
> the cases that we currently do not (new files in repos). I also think
it
> is worthy of consideration that we do the same for the other three
fields
> (revision, date, and author). However, since changing those fields
would
> visibly change the output of status, I can see where some people would
be
> against that. To me, it seems like a better way to change this.
>
> Thanks
>
> Mark

Mark Phippard <MarkP@softlanding.com> wrote on 08/23/2005 10:37:31 AM:

> In summary, I would propose that at a minimum we ditch the new URL and
> kind fields from this structure and instead update the existing fields
in
> the cases that we currently do not (new files in repos). I also think
it
> is worthy of consideration that we do the same for the other three
fields
> (revision, date, and author). However, since changing those fields
would
> visibly change the output of status, I can see where some people would
be
> against that. To me, it seems like a better way to change this.
>
> Thanks
>
> Mark

I just wanted to add my own summary of what Mark is proposing. This is
not intended as a comprehensive examination of all possible use cases, but
covers the essential points:

Here are the svn_wc_status2_t structs svn status -u currently generates in
three typical scenarios:

  UP TO DATE Item: WC item exists and is the same as the most recent
version in the repos:

    svn_wc_status2_t
     |
     |__svn_wc_entry_t *entry
     | |
     | |_svn_revnum_t cmt_rev = Last committed rev
     | |_apr_time_t cmt_date = Last committed date
     | |_const char *cmt_author = Last committed author
     | |_const char *url
     | |_svn_node_kind_t kind
     |
     |__svn_wc_status_kind repos_text_status = svn_wc_status_normal

  MODIFIED Item: WC item exists but a more recent version exists in the
repos:

    svn_wc_status2_t
     |
     |__svn_wc_entry_t *entry
     | |
     | |_svn_revnum_t cmt_rev = Last committed rev
     | |_apr_time_t cmt_date = Last committed date
     | |_const char *cmt_author = Last committed author
     | |_const char *url
     | |_svn_node_kind_t kind
     |
     |__svn_wc_status_kind repos_text_status = svn_wc_status_modified

  ADDED Item: "New" item on the server, WC item doesn't exist:

    svn_wc_status2_t
     |
     |__svn_wc_entry_t *entry = NULL
     |
     |__svn_wc_status_kind repos_text_status = svn_wc_status_added

With Mark's proposal the semantics of the entry struct change, depending
on the value of entry->repos_text_status:

  UP TO DATE Item: Nothing changes here.

  MODIFIED Item: Seeing repos_text_status == svn_wc_status_modified
                  means some entry fields are interpreted differently.

    svn_wc_status2_t
     |
     |__svn_wc_entry_t *entry
     | |
     | |_svn_revnum_t cmt_rev = Latest rev on repos
     | |_apr_time_t cmt_date = Latest date committed on repos
     | |_const char *cmt_author = Latest committer on repos
     | |_const char *url = Unchanged from above.
     | |_svn_node_kind_t kind = Unchanged from above.
     |
     |__svn_wc_status_kind repos_text_status = svn_wc_status_modified

  ADDED Item: This is a bit trickier since an entry is created that
              doesn't actually represent an WC item, but since
              repos_text_status == svn_wc_status_added we know this
              entry is the "ghost of WC future".

    svn_wc_status2_t
     |
     |__svn_wc_entry_t *entry (No longer NULL)
     | |
     | |_svn_revnum_t cmt_rev = Latest rev on repos
     | |_apr_time_t cmt_date = Latest date committed on repos
     | |_const char *cmt_author = Latest committer on repos
     | |_const char *url = url on repos
     | |_svn_node_kind_t kind = kind on repos
     |
     |__svn_wc_status_kind repos_text_status = svn_wc_status_added

Hopefully that clarifies things a bit.

Paul B.

_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Aug 23 18:10:47 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.