You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Barry Scott <ba...@barrys-emacs.org> on 2008/09/27 09:29:47 UTC

svn revision r0 question

I'm fixing a problem in pysvn Workbench that is a result of  
svn_client_logX returning
revision 0.

Revision 0 is not like the other revisions because it only  the  
svn:date revprop.

The svn log command filters out any entry that has a revision of 0  
and any that
do not have a svn:message. (Filtering out svn:message == NULL seems  
very odd
isn't svn:message mandatory in a repos?).

I can fix my problem in two ways:

1. Inside pysvn log() so that revision 0 is never returned.
2. In Workbench (built on top of pysvn) filter out revision 0 return  
by the log() function.

My question is this: Is it useful to an application to be able to see  
the date on
r0? If it is useful I do fix (2) if its not useful I do fix (1).

Barry


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

Re: svn revision r0 question

Posted by Stefan Küng <to...@gmail.com>.
Blair Zajac wrote:
> Ben Collins-Sussman wrote:
>> On Sat, Sep 27, 2008 at 7:49 AM, Branko Čibej <br...@xbc.nu> wrote:
>>> Barry Scott wrote:
>>>> I'm fixing a problem in pysvn Workbench that is a result of
>>>> svn_client_logX returning
>>>> revision 0.
>>>>
>>>> Revision 0 is not like the other revisions because it only  the
>>>> svn:date
>>>> revprop.
>>>>
>>>> The svn log command filters out any entry that has a revision of 0
>>>> and any
>>>> that
>>>> do not have a svn:message. (Filtering out svn:message == NULL seems
>>>> very
>>>> odd
>>>> isn't svn:message mandatory in a repos?).
>>> What is svn:message?
>>>
>>> And WFIW, no revprops should be mandatory, ever.
>>>
>>
>> No revprops are ever required to exist.  No 3rd-party program should
>> ever assume that 'svn:date', 'svn:author', or 'svn:log' exist;  it's
>> not an error for any of them to not exist.  svn:author only exists if
>> the commit was authenticated;  svn:log only exists if someone typed a
>> message;  and even though svn:date is added by the repository at
>> commit-time, a committer might have used 'svn propchange' to simply
>> remove it.  These are all legitimate situations.
> 
> Why would we ever allow svn:date to be removed?

Maybe removing isn't such a good idea.
But: there are repositories out there which have revisions with no date.
We had problems because of those in TSVN before. From what I found, most
of those repositories have been converted from other SCM repositories,
and as it seems the converter left out the date for some revisions.

So, it is very well possible that a revision does not have a date
assigned to it.

Stefan
-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net


Re: svn revision r0 question

Posted by "C. Michael Pilato" <cm...@collab.net>.
Blair Zajac wrote:
> Ben Collins-Sussman wrote:
>> On Sat, Sep 27, 2008 at 7:49 AM, Branko Čibej <br...@xbc.nu> wrote:
>>> Barry Scott wrote:
>>>> I'm fixing a problem in pysvn Workbench that is a result of
>>>> svn_client_logX returning
>>>> revision 0.
>>>>
>>>> Revision 0 is not like the other revisions because it only  the
>>>> svn:date
>>>> revprop.
>>>>
>>>> The svn log command filters out any entry that has a revision of 0
>>>> and any
>>>> that
>>>> do not have a svn:message. (Filtering out svn:message == NULL seems
>>>> very
>>>> odd
>>>> isn't svn:message mandatory in a repos?).
>>> What is svn:message?
>>>
>>> And WFIW, no revprops should be mandatory, ever.
>>>
>>
>> No revprops are ever required to exist.  No 3rd-party program should
>> ever assume that 'svn:date', 'svn:author', or 'svn:log' exist;  it's
>> not an error for any of them to not exist.  svn:author only exists if
>> the commit was authenticated;  svn:log only exists if someone typed a
>> message;  and even though svn:date is added by the repository at
>> commit-time, a committer might have used 'svn propchange' to simply
>> remove it.  These are all legitimate situations.
> 
> Why would we ever allow svn:date to be removed?

Because it isn't required for proper operation?  Sure, it makes
date->revision conversions somewhat ... impossible.  But Subversion's
primary -- only required -- index for changes is its revision numbers.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: svn revision r0 question

Posted by Blair Zajac <bl...@orcaware.com>.
Ben Collins-Sussman wrote:
> On Sat, Sep 27, 2008 at 7:49 AM, Branko Čibej <br...@xbc.nu> wrote:
>> Barry Scott wrote:
>>> I'm fixing a problem in pysvn Workbench that is a result of
>>> svn_client_logX returning
>>> revision 0.
>>>
>>> Revision 0 is not like the other revisions because it only  the svn:date
>>> revprop.
>>>
>>> The svn log command filters out any entry that has a revision of 0 and any
>>> that
>>> do not have a svn:message. (Filtering out svn:message == NULL seems very
>>> odd
>>> isn't svn:message mandatory in a repos?).
>> What is svn:message?
>>
>> And WFIW, no revprops should be mandatory, ever.
>>
> 
> No revprops are ever required to exist.  No 3rd-party program should
> ever assume that 'svn:date', 'svn:author', or 'svn:log' exist;  it's
> not an error for any of them to not exist.  svn:author only exists if
> the commit was authenticated;  svn:log only exists if someone typed a
> message;  and even though svn:date is added by the repository at
> commit-time, a committer might have used 'svn propchange' to simply
> remove it.  These are all legitimate situations.

Why would we ever allow svn:date to be removed?

Blair


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

Re: svn revision r0 question

Posted by Ben Collins-Sussman <su...@red-bean.com>.
On Sat, Sep 27, 2008 at 7:49 AM, Branko Čibej <br...@xbc.nu> wrote:
> Barry Scott wrote:
>>
>> I'm fixing a problem in pysvn Workbench that is a result of
>> svn_client_logX returning
>> revision 0.
>>
>> Revision 0 is not like the other revisions because it only  the svn:date
>> revprop.
>>
>> The svn log command filters out any entry that has a revision of 0 and any
>> that
>> do not have a svn:message. (Filtering out svn:message == NULL seems very
>> odd
>> isn't svn:message mandatory in a repos?).
>
> What is svn:message?
>
> And WFIW, no revprops should be mandatory, ever.
>

No revprops are ever required to exist.  No 3rd-party program should
ever assume that 'svn:date', 'svn:author', or 'svn:log' exist;  it's
not an error for any of them to not exist.  svn:author only exists if
the commit was authenticated;  svn:log only exists if someone typed a
message;  and even though svn:date is added by the repository at
commit-time, a committer might have used 'svn propchange' to simply
remove it.  These are all legitimate situations.

Re: svn revision r0 question

Posted by Branko Čibej <br...@xbc.nu>.
Barry Scott wrote:
>>
>> And WFIW, no revprops should be mandatory, ever.
>
> Is it a problem that log-cmd.c ignores entries that have revision 0 or 
> a missing svn:log?

Ignoring revision 0 is fine, IMHO; we know exactly what's in that 
revision, to whit, an empty unnamed root directory, nothing else should 
ever be there.

Dunno about ignoring revisions without svn:log. Depends on whether you 
prefer pink stripes or purple spots, I guess.

-- Brane


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

Re: svn revision r0 question

Posted by Barry Scott <ba...@barrys-emacs.org>.
On Sep 27, 2008, at 13:49, Branko Čibej wrote:

> Barry Scott wrote:
>> I'm fixing a problem in pysvn Workbench that is a result of  
>> svn_client_logX returning
>> revision 0.
>>
>> Revision 0 is not like the other revisions because it only  the  
>> svn:date revprop.
>>
>> The svn log command filters out any entry that has a revision of 0  
>> and any that
>> do not have a svn:message. (Filtering out svn:message == NULL  
>> seems very odd
>> isn't svn:message mandatory in a repos?).
>
> What is svn:message?

I meant svn:log (log_entry_receiver() in log-cmd.c has it in the  
message variable).


>
> And WFIW, no revprops should be mandatory, ever.

Is it a problem that log-cmd.c ignores entries that have revision 0  
or a missing svn:log?

Barry


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


Re: svn revision r0 question

Posted by Branko Čibej <br...@xbc.nu>.
Barry Scott wrote:
> I'm fixing a problem in pysvn Workbench that is a result of 
> svn_client_logX returning
> revision 0.
>
> Revision 0 is not like the other revisions because it only  the 
> svn:date revprop.
>
> The svn log command filters out any entry that has a revision of 0 and 
> any that
> do not have a svn:message. (Filtering out svn:message == NULL seems 
> very odd
> isn't svn:message mandatory in a repos?).

What is svn:message?

And WFIW, no revprops should be mandatory, ever.

-- Brane

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