From commits-return-49889-archive-asf-public=cust-asf.ponee.io@subversion.apache.org Wed Nov 14 05:00:14 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1ADF218062B for ; Wed, 14 Nov 2018 05:00:13 +0100 (CET) Received: (qmail 94801 invoked by uid 500); 14 Nov 2018 04:00:13 -0000 Mailing-List: contact commits-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@subversion.apache.org Delivered-To: mailing list commits@subversion.apache.org Received: (qmail 94791 invoked by uid 99); 14 Nov 2018 04:00:13 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Nov 2018 04:00:13 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 91F513A1B0C for ; Wed, 14 Nov 2018 04:00:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1846560 - in /subversion/branches/1.10.x: ./ STATUS subversion/libsvn_client/revisions.c subversion/tests/cmdline/basic_tests.py Date: Wed, 14 Nov 2018 04:00:12 -0000 To: commits@subversion.apache.org From: svn-role@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20181114040012.91F513A1B0C@svn01-us-west.apache.org> Author: svn-role Date: Wed Nov 14 04:00:12 2018 New Revision: 1846560 URL: http://svn.apache.org/viewvc?rev=1846560&view=rev Log: Merge r1844987 from trunk: * r1844987 Raise an error if someone tries to use -rPREV on a working copy at r0. Justification: Fixes #4532, which is an assertion abort. Votes: +1: brane, rhuijben, julianfoad Modified: subversion/branches/1.10.x/ (props changed) subversion/branches/1.10.x/STATUS subversion/branches/1.10.x/subversion/libsvn_client/revisions.c subversion/branches/1.10.x/subversion/tests/cmdline/basic_tests.py Propchange: subversion/branches/1.10.x/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Nov 14 04:00:12 2018 @@ -102,4 +102,4 @@ /subversion/branches/verify-at-commit:1462039-1462408 /subversion/branches/verify-keep-going:1439280-1546110 /subversion/branches/wc-collate-path:1402685-1480384 -/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788,1825979,1826720-1826721,1826747,1826811,1826814,1826877,1826907,1826971,1827105,1827114,1827191,1827562,1827574,1827670,1828613,1829012,1829015,1829241,1829260,1829344,1830083,1830882-1830883,1830885,1830900-1830901,1831110,1831112,1831540,1833465,1833621,1833836,1833842,1833864,1833866,1833895,1833897,1833899,1833901,1835760,1836306,1836762,1836802,1836960,1836963,1836968,1836976,1837037,1837790,1838813,1839662,1839703,1839734,1839739,1840991,1842260,1842262,1842264,184 3888,1844882,1845204,1845261,1845408,1845555,1845577,1846403,1846406 +/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788,1825979,1826720-1826721,1826747,1826811,1826814,1826877,1826907,1826971,1827105,1827114,1827191,1827562,1827574,1827670,1828613,1829012,1829015,1829241,1829260,1829344,1830083,1830882-1830883,1830885,1830900-1830901,1831110,1831112,1831540,1833465,1833621,1833836,1833842,1833864,1833866,1833895,1833897,1833899,1833901,1835760,1836306,1836762,1836802,1836960,1836963,1836968,1836976,1837037,1837790,1838813,1839662,1839703,1839734,1839739,1840991,1842260,1842262,1842264,184 3888,1844882,1844987,1845204,1845261,1845408,1845555,1845577,1846403,1846406 Modified: subversion/branches/1.10.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1846560&r1=1846559&r2=1846560&view=diff ============================================================================== --- subversion/branches/1.10.x/STATUS (original) +++ subversion/branches/1.10.x/STATUS Wed Nov 14 04:00:12 2018 @@ -27,10 +27,3 @@ Veto-blocked changes: Approved changes: ================= - - * r1844987 - Raise an error if someone tries to use -rPREV on a working copy at r0. - Justification: - Fixes #4532, which is an assertion abort. - Votes: - +1: brane, rhuijben, julianfoad Modified: subversion/branches/1.10.x/subversion/libsvn_client/revisions.c URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/libsvn_client/revisions.c?rev=1846560&r1=1846559&r2=1846560&view=diff ============================================================================== --- subversion/branches/1.10.x/subversion/libsvn_client/revisions.c (original) +++ subversion/branches/1.10.x/subversion/libsvn_client/revisions.c Wed Nov 14 04:00:12 2018 @@ -146,7 +146,14 @@ svn_client__get_revision_number(svn_revn scratch_pool)); if (revision->kind == svn_opt_revision_previous) - (*revnum)--; + { + if (*revnum == 0) + return svn_error_createf( + SVN_ERR_CLIENT_BAD_REVISION, NULL, + _("Path '%s' has no previous revision"), + svn_dirent_local_style(local_abspath, scratch_pool)); + --(*revnum); + } } break; Modified: subversion/branches/1.10.x/subversion/tests/cmdline/basic_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/tests/cmdline/basic_tests.py?rev=1846560&r1=1846559&r2=1846560&view=diff ============================================================================== --- subversion/branches/1.10.x/subversion/tests/cmdline/basic_tests.py (original) +++ subversion/branches/1.10.x/subversion/tests/cmdline/basic_tests.py Wed Nov 14 04:00:12 2018 @@ -3047,6 +3047,15 @@ def peg_rev_on_non_existent_wc_path(sbox 'cat', '-r2', sbox.ospath('mu3') + '@3') +@Issue(4532) +def diff_previous_revision_of_r0(sbox): + """diff -rPREV on WC at revision 0""" + + sbox.build(empty=True) + svntest.actions.run_and_verify_svn(None, 'svn: E195002: ', + 'diff', '-rPREV', sbox.ospath('')) + + # With 'svn mkdir --parents' the target directory may already exist on disk. # In that case it was wrongly performing a recursive 'add' on its contents. def mkdir_parents_target_exists_on_disk(sbox): @@ -3266,6 +3275,7 @@ test_list = [ None, rm_missing_with_case_clashing_ondisk_item, delete_conflicts_one_of_many, peg_rev_on_non_existent_wc_path, + diff_previous_revision_of_r0, mkdir_parents_target_exists_on_disk, plaintext_password_storage_disabled, filtered_ls,