Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0AD4D10DE7 for ; Wed, 12 Jun 2013 11:23:22 +0000 (UTC) Received: (qmail 40689 invoked by uid 500); 12 Jun 2013 11:23:21 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 40654 invoked by uid 500); 12 Jun 2013 11:23:21 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 40637 invoked by uid 99); 12 Jun 2013 11:23:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 11:23:21 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE X-Spam-Check-By: apache.org Received-SPF: error (nike.apache.org: local policy) Received: from [212.82.108.235] (HELO nm4.bt.bullet.mail.ird.yahoo.com) (212.82.108.235) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Jun 2013 11:23:13 +0000 Received: from [212.82.108.229] by nm4.bt.bullet.mail.ird.yahoo.com with NNFMP; 12 Jun 2013 11:22:31 -0000 Received: from [212.82.98.39] by tm2.bt.bullet.mail.ird.yahoo.com with NNFMP; 12 Jun 2013 11:22:31 -0000 Received: from [127.0.0.1] by omp1008.bt.mail.ir2.yahoo.com with NNFMP; 12 Jun 2013 11:22:31 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 861960.41312.bm@omp1008.bt.mail.ir2.yahoo.com Received: (qmail 49668 invoked by uid 60001); 12 Jun 2013 11:22:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btopenworld.com; s=s1024; t=1371036151; bh=RY7chJ27SzI5sG84ZNcxEK8yWZ6wVyU2j9BmjJgnRXY=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=YB5gumEY+Lojl3dHt0l6hf8J8LiZr5diQVZ5KxG+qqgXjbLCEBEeETAi1SALmydWXzDJUZyVBAkvdFKVqKszJXxq3egZuiLgEr5yAdFKBaITlNOHGqjdrOR6+btXXF9u9R6fBbcLp124fH08uoezYVrEVNeja38N/yoatQqAgB0= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=btopenworld.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=XO8T6zVHJtZdYj9OZplMTtA5LZDT+IAAiKpHltvc8bfbFpWKzS6qeEfRvRsCMxXbvsAYjzgv5clfabiOUhsbc7kK51DEdGR6QNbjHPRx+VxUsFoFqJqhIwFh7svvRFgaYkJ7yfhWJi1r4k5pJxgm/RbFsPYT8ITnYVacxm4d4rY=; X-YMail-OSG: Wo.Mt9oVM1na1HdLgXFRKwjDC7hmw_l_hOXm0PmYK_PZ0Yz ts_0t.tacIAucEavw8x0mtPfp.tmOw.KsuBWOJSbJHrONHlTFDuvzp.OIhVD 9tpVp0cmvBh15Hs_vN9qiqwvcNSV1cq8B.vPjZ0WaTUM4XIYHWlMQTjpWmbA 5L9mV7.2paDF0hXD1bK1Y8GE2zKM6fan4aMegMdROX.nFWw_HsDnkgMRbWEU ZAMUX22wNNVVTkX.6GTcPeGbNhhyAGjRxcx_8zfH5RNu5eWya8.8.MkucTcS UcOafKItfQi26l4WRLEYP4iIo5ObpIzp9YA1gyiOmBoctdVWREFzj5FWYk5q JkOTxUqF9vJPrJNGKXMHE97prEVhOoGiaEM565dnojaYGiVxHfwiWKdcRTVx F85ikMf40iwX9YQyLEIuq8XSRiK7rNs2S.hakPP9uDIE5Qg2Mw5.hyLKGd3N y.MESOMNiELXbu1dlUtztJrfgomxjwvdt9be2VDUx3C6j_xPCKdr4gFjg4w3 kXWXGU6HEpeg8hF_QVBE0curInq2B_.xusIIW4w6vgXthBLDgSWLVm02jlHx levzl5L6RyNeTGq50L9q_naTmnGGZssfJfDtV3lyGqeXDIW21o8qE Received: from [46.189.27.162] by web186105.mail.ir2.yahoo.com via HTTP; Wed, 12 Jun 2013 12:22:31 BST X-Rocket-MIMEInfo: 002.001,RGFuaWVsIFNoYWhhZiB3cm90ZToKCj4gZGFuaWVsc2hAYXBhY2hlLm9yZyB3cm90ZSBvbiBXZWQsIEp1biAxMiwgMjAxMyBhdCAxMDoyOTozNSAtMDAwMDoKPj4gIEF1dGhvcjogZGFuaWVsc2gKPj4gIERhdGU6IFdlZCBKdW4gMTIgMTA6Mjk6MzQgMjAxMwo.PiAgTmV3IFJldmlzaW9uOiAxNDkyMTM0Cj4.IAo.PiAgVVJMOiBodHRwOi8vc3ZuLmFwYWNoZS5vcmcvcjE0OTIxMzQKPj4gIExvZzoKPj4gIEFkZCBhbiBYRmFpbCB0ZXN0IGZvciAnc3ZuIGJsYW1lIC1yIDM6MScgKHdoZXJlIDMgPiAxKS4KPj4gCj4BMAEBAQE- X-Mailer: YahooMailWebService/0.8.146.552 References: <20130612102935.5F08123888E4@eris.apache.org> <20130612105857.GB12209@tarsus.local2> Message-ID: <1371036151.49095.YahooMailNeo@web186105.mail.ir2.yahoo.com> Date: Wed, 12 Jun 2013 12:22:31 +0100 (BST) From: Julian Foad Reply-To: Julian Foad Subject: Re: svn commit: r1492134 - /subversion/trunk/subversion/tests/cmdline/blame_tests.py To: "dev@subversion.apache.org" Cc: "commits@subversion.apache.org" In-Reply-To: <20130612105857.GB12209@tarsus.local2> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Daniel Shahaf wrote:=0A=0A> danielsh@apache.org wrote on Wed, Jun 12, 2013 = at 10:29:35 -0000:=0A>> Author: danielsh=0A>> Date: Wed Jun 12 10:29:34 2= 013=0A>> New Revision: 1492134=0A>> =0A>> URL: http://svn.apache.org/r149= 2134=0A>> Log:=0A>> Add an XFail test for 'svn blame -r 3:1' (where 3 > 1= ).=0A>> =0A>> Not filing an issue since I plan to commit a fix soon.=0A=0A= What behaviour change are you planning for 'blame'?=0A=0AI ask because I do= n't think it's obvious.=0A=0AFor example, it would be useful to have a mode= that looks forward in time from a given revision, to find the *next* revis= ion at which each line is changed after the starting revision.=A0 Is that t= he behaviour you are planning?=0A=0A- Julian=0A=0A=0A> Update: Bert found a= potential problem with peg revisions here that=0A> might require revving a= n RA API, so it'll take me longer to get to=0A> committing a fix than I pla= nned.=0A> =0A> Current WIP patch:=0A> =0A> Index: subversion/libsvn_client/= blame.c=0A> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A> --- sub= version/libsvn_client/blame.c=A0=A0=A0 (revision 1492120)=0A> +++ subversio= n/libsvn_client/blame.c=A0=A0=A0 (working copy)=0A> @@ -466,7 +466,7 @@ fil= e_rev_handler(void *baton, const char *path, sv=0A> =A0 /* Create the rev = structure. */=0A> =A0 frb->rev =3D apr_pcalloc(frb->mainpool, sizeof(struc= t rev));=0A> =0A> -=A0 if (revnum < frb->start_rev)=0A> +=A0 if (revnum < M= IN(frb->start_rev, frb->end_rev))=0A> =A0 =A0 {=0A> =A0 =A0 =A0 /* We sho= uldn't get more than one revision before the starting=0A> =A0 =A0 =A0 =A0 = =A0 revision (unless of including merged revisions). */=0A> @@ -479,7 +479,= 8 @@ file_rev_handler(void *baton, const char *path, sv=0A> =A0 =A0 }=0A> = =A0 else=0A> =A0 =A0 {=0A> -=A0 =A0 =A0 SVN_ERR_ASSERT(revnum <=3D frb->e= nd_rev);=0A> +=A0 =A0 =A0 /* 1+ for the "youngest to oldest" blame */=0A> += =A0 =A0 =A0 SVN_ERR_ASSERT(revnum <=3D 1 + MAX(frb->end_rev, frb->start_rev= ));=0A> =0A> =A0 =A0 =A0 /* Set values from revision props. */=0A> =A0 =A0= =A0 frb->rev->revision =3D revnum;=0A> @@ -578,6 +579,7 @@ svn_client_bla= me5(const char *target,=0A> =A0 svn_stream_t *last_stream;=0A> =A0 svn_st= ream_t *stream;=0A> =A0 const char *target_abspath_or_url;=0A> +=A0 svn_re= vnum_t youngest;=0A> =0A> =A0 if (start->kind =3D=3D svn_opt_revision_unsp= ecified=0A> =A0 =A0 =A0 || end->kind =3D=3D svn_opt_revision_unspecified)= =0A> @@ -599,11 +601,6 @@ svn_client_blame5(const char *target,=0A> =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 target_abspath_or_url, ra_session,=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 start, pool));=0A> = =0A> -=A0 if (end_revnum < start_revnum)=0A> -=A0 =A0 return svn_error_crea= te=0A> -=A0 =A0 =A0 (SVN_ERR_CLIENT_BAD_REVISION, NULL,=0A> -=A0 =A0 =A0 _= ("Start revision must precede end revision"));=0A> -=0A> =A0 /* We check t= he mime-type of the yougest revision before getting all=0A> =A0 =A0 =A0 the= older revisions. */=0A> =A0 if (!ignore_mime_type)=0A> @@ -674,8 +671,14 = @@ svn_client_blame5(const char *target,=0A> =A0 =A0 =A0 We need to ensure = that we get one revision before the start_rev,=0A> =A0 =A0 =A0 if available= so that we can know what was actually changed in the start=0A> =A0 =A0 =A0= revision. */=0A> +=A0 SVN_ERR(svn_ra_get_latest_revnum(ra_session, &younge= st, frb.currpool));=0A> =A0 SVN_ERR(svn_ra_get_file_revs2(ra_session, "",= =0A> -=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 start= _revnum - (start_revnum > 0 ? 1 : 0),=0A> +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 start_revnum =0A> +=A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 - (0 < start_revnum && start_revnum= =0A> < end_revnum ? 1 : 0)=0A> +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 + (youngest > start_revnum && =0A> start_revnum > e= nd_revnum ? 1 : 0),=0A> +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 /* ### pass MAX(start_revnum, end_revnum) as =0A> peg thru = to svn_fs_revision_root() */=0A> +=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 /* ### blame 5 fails. */=0A> +=A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 /* ### check svn_repos_get_file= _revs2 tests. */=0A> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 end_revnum, include_merged_revisions,=0A> =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 file_rev_handler, &frb, pool))= ;=0A> =0A> =0A>> * subversion/tests/cmdline/blame_tests.py=0A>> =A0 (blam= e_youngest_to_oldest): New test, XFail.=0A>> =A0 (test_list): Run it.=0A>