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

Re: What revision should an added not yet commited node have?

From: Neels J Hofmeyr <neels_at_elego.de>
Date: Fri, 19 Mar 2010 02:33:33 +0100

C. Michael Pilato wrote:
> Stefan Sperling wrote:
>> On Tue, Mar 16, 2010 at 09:01:28PM +0100, Daniel Näslund wrote:
>>> Hi!
>>>
>>> When trying to replace entries in the status code I got a couple of test
>>> failures saying that the revision should be 0 for newly added nodes.
>>> Greg pointed out that the entries code set the revision to 0 for those
>>> cases while the revision returned from _read_info() sets it to -1.
>>>
>>> Should we continue to use the 0 value? Is it well established as the
>>> revision number of version controlled, not yet committed files or should
>>> we tell 'svn info' and 'svn status' to not output any rev nr at all for
>>> these nodes?
>> I think -1 (invalid revnum) is more appropriate than 0.

Nice, I hit that same question like two weeks ago, with
svn_client__get_revision_number() upon svn_opt_revision_base for added
nodes. I found the same conclusion: it should have always returned -1.

I am at the point where I would trial to see how callers deal with a -1
revision number ("would" because I need to study for an exam next week, bah).

Ideally, we will change the behaviour of this private function when
switching it to wc-ng. I hope we don't have to mock up current behaviour for
compat, especially because that depends on parent nodes sometimes.

~Neels

Received on 2010-03-19 02:34:31 CET

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.