You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2018/09/30 18:26:49 UTC
svn commit: r1842404 [6/11] - in /subversion/branches/better-pristines: ./
build/ build/ac-macros/ build/generator/ build/generator/templates/
contrib/client-side/svn_load_dirs/ doc/user/ notes/logo/ notes/shelving/
subversion/bindings/javahl/ subversi...
Modified: subversion/branches/better-pristines/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_client/status.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_client/status.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_client/status.c Sun Sep 30 18:26:47 2018
@@ -23,6 +23,9 @@
/* ==================================================================== */
+/* We define this here to remove any further warnings about the usage of
+ experimental functions in this file. */
+#define SVN_EXPERIMENTAL
/*** Includes. ***/
@@ -329,6 +332,79 @@ do_external_status(svn_client_ctx_t *ctx
return SVN_NO_ERROR;
}
+
+/* Run status on shelf SHELF_NAME, if it exists.
+ */
+static svn_error_t *
+shelf_status(const char *shelf_name,
+ const char *target_abspath,
+ svn_wc_status_func4_t status_func,
+ void *status_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ svn_error_t *err;
+ svn_client__shelf_t *shelf;
+ svn_client__shelf_version_t *shelf_version;
+ const char *wc_relpath;
+
+ err = svn_client__shelf_open_existing(&shelf,
+ shelf_name, target_abspath,
+ ctx, scratch_pool);
+ if (err && err->apr_err == SVN_ERR_ILLEGAL_TARGET)
+ {
+ svn_error_clear(err);
+ return SVN_NO_ERROR;
+ }
+ else
+ SVN_ERR(err);
+
+ SVN_ERR(svn_client__shelf_version_open(&shelf_version,
+ shelf, shelf->max_version,
+ scratch_pool, scratch_pool));
+ wc_relpath = svn_dirent_skip_ancestor(shelf->wc_root_abspath, target_abspath);
+ SVN_ERR(svn_client__shelf_version_status_walk(shelf_version, wc_relpath,
+ status_func, status_baton,
+ scratch_pool));
+ SVN_ERR(svn_client__shelf_close(shelf, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+/* Run status on all shelves named in CHANGELISTS by a changelist name
+ * of the form "svn:shelf:SHELF_NAME", if they exist.
+ */
+static svn_error_t *
+shelves_status(const apr_array_header_t *changelists,
+ const char *target_abspath,
+ svn_wc_status_func4_t status_func,
+ void *status_baton,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ static const char PREFIX[] = "svn:shelf:";
+ static const int PREFIX_LEN = 10;
+ int i;
+
+ if (! changelists)
+ return SVN_NO_ERROR;
+ for (i = 0; i < changelists->nelts; i++)
+ {
+ const char *cl = APR_ARRAY_IDX(changelists, i, const char *);
+
+ if (strncmp(cl, PREFIX, PREFIX_LEN) == 0)
+ {
+ const char *shelf_name = cl + PREFIX_LEN;
+
+ SVN_ERR(shelf_status(shelf_name, target_abspath,
+ status_func, status_baton,
+ ctx, scratch_pool));
+ }
+ }
+
+ return SVN_NO_ERROR;
+}
+
/*** Public Interface. ***/
@@ -586,6 +662,9 @@ svn_client_status6(svn_revnum_t *result_
}
else
{
+ SVN_ERR(shelves_status(changelists, target_abspath,
+ tweak_status, &sb,
+ ctx, pool));
err = svn_wc_walk_status(ctx->wc_ctx, target_abspath,
depth, get_all, no_ignore, FALSE, ignores,
tweak_status, &sb,
Modified: subversion/branches/better-pristines/subversion/libsvn_client/update.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_client/update.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_client/update.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_client/update.c Sun Sep 30 18:26:47 2018
@@ -182,6 +182,88 @@ record_conflict(svn_wc_conflict_result_t
return SVN_NO_ERROR;
}
+/* Perform post-update processing of externals defined below LOCAL_ABSPATH. */
+static svn_error_t *
+handle_externals(svn_boolean_t *timestamp_sleep,
+ const char *local_abspath,
+ svn_depth_t depth,
+ const char *repos_root_url,
+ svn_ra_session_t *ra_session,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *scratch_pool)
+{
+ apr_hash_t *new_externals;
+ apr_hash_t *new_depths;
+
+ SVN_ERR(svn_wc__externals_gather_definitions(&new_externals,
+ &new_depths,
+ ctx->wc_ctx, local_abspath,
+ depth,
+ scratch_pool, scratch_pool));
+
+ SVN_ERR(svn_client__handle_externals(new_externals,
+ new_depths,
+ repos_root_url, local_abspath,
+ depth, timestamp_sleep, ra_session,
+ ctx, scratch_pool));
+ return SVN_NO_ERROR;
+}
+
+/* Try to reuse the RA session by reparenting it to the anchor_url.
+ * This code is probably overly cautious since we only use this
+ * currently when parents are missing and so all the anchor_urls
+ * have to be in the same repo.
+ * Note that ra_session_p is an (optional) input parameter as well
+ * as an output parameter. */
+static svn_error_t *
+reuse_ra_session(svn_ra_session_t **ra_session_p,
+ const char **corrected_url,
+ const char *anchor_url,
+ const char *anchor_abspath,
+ svn_client_ctx_t *ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_ra_session_t *ra_session = *ra_session_p;
+
+ if (ra_session)
+ {
+ svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool);
+ if (err)
+ {
+ if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
+ {
+ /* session changed repos, can't reuse it */
+ svn_error_clear(err);
+ ra_session = NULL;
+ }
+ else
+ {
+ return svn_error_trace(err);
+ }
+ }
+ else
+ {
+ *corrected_url = NULL;
+ }
+ }
+
+ /* Open an RA session for the URL if one isn't already available */
+ if (!ra_session)
+ {
+ SVN_ERR(svn_client__open_ra_session_internal(&ra_session, corrected_url,
+ anchor_url,
+ anchor_abspath, NULL,
+ TRUE /* write_dav_props */,
+ TRUE /* read_dav_props */,
+ ctx,
+ result_pool, scratch_pool));
+ *ra_session_p = ra_session;
+ }
+
+ return SVN_NO_ERROR;
+}
+
/* This is a helper for svn_client__update_internal(), which see for
an explanation of most of these parameters. Some stuff that's
unique is as follows:
@@ -320,6 +402,18 @@ update_internal(svn_revnum_t *result_rev
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
+ if (!ignore_externals)
+ {
+ /* We may now be able to remove externals below LOCAL_ABSPATH. */
+ SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url,
+ anchor_url, anchor_abspath,
+ ctx, result_pool, scratch_pool));
+ ra_session = *ra_session_p;
+ SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth,
+ repos_root_url, ra_session, ctx,
+ scratch_pool));
+ }
+
/* Target excluded, we are done now */
return SVN_NO_ERROR;
}
@@ -373,44 +467,9 @@ update_internal(svn_revnum_t *result_rev
ctx->notify_func2(ctx->notify_baton2, notify, scratch_pool);
}
- /* Try to reuse the RA session by reparenting it to the anchor_url.
- * This code is probably overly cautious since we only use this
- * currently when parents are missing and so all the anchor_urls
- * have to be in the same repo. */
- if (ra_session)
- {
- svn_error_t *err = svn_ra_reparent(ra_session, anchor_url, scratch_pool);
- if (err)
- {
- if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
- {
- /* session changed repos, can't reuse it */
- svn_error_clear(err);
- ra_session = NULL;
- }
- else
- {
- return svn_error_trace(err);
- }
- }
- else
- {
- corrected_url = NULL;
- }
- }
-
- /* Open an RA session for the URL if one isn't already available */
- if (!ra_session)
- {
- SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url,
- anchor_url,
- anchor_abspath, NULL,
- TRUE /* write_dav_props */,
- TRUE /* read_dav_props */,
- ctx,
- result_pool, scratch_pool));
- *ra_session_p = ra_session;
- }
+ SVN_ERR(reuse_ra_session(ra_session_p, &corrected_url, anchor_url,
+ anchor_abspath, ctx, result_pool, scratch_pool));
+ ra_session = *ra_session_p;
/* If we got a corrected URL from the RA subsystem, we'll need to
relocate our working copy first. */
@@ -513,19 +572,8 @@ update_internal(svn_revnum_t *result_rev
if ((SVN_DEPTH_IS_RECURSIVE(depth) || cropping_target)
&& (! ignore_externals))
{
- apr_hash_t *new_externals;
- apr_hash_t *new_depths;
- SVN_ERR(svn_wc__externals_gather_definitions(&new_externals,
- &new_depths,
- ctx->wc_ctx, local_abspath,
- depth,
- scratch_pool, scratch_pool));
-
- SVN_ERR(svn_client__handle_externals(new_externals,
- new_depths,
- repos_root_url, local_abspath,
- depth, timestamp_sleep, ra_session,
- ctx, scratch_pool));
+ SVN_ERR(handle_externals(timestamp_sleep, local_abspath, depth,
+ repos_root_url, ra_session, ctx, scratch_pool));
}
/* Let everyone know we're finished here (unless we're asked not to). */
Modified: subversion/branches/better-pristines/subversion/libsvn_diff/diff_tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_diff/diff_tree.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_diff/diff_tree.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_diff/diff_tree.c Sun Sep 30 18:26:47 2018
@@ -37,14 +37,6 @@
#include "private/svn_diff_tree.h"
#include "svn_private_config.h"
-typedef struct tree_processor_t
-{
- svn_diff_tree_processor_t tp;
-
- /* void *future_extension */
-} tree_processor_t;
-
-
static svn_error_t *
default_dir_opened(void **new_dir_baton,
svn_boolean_t *skip,
@@ -215,33 +207,30 @@ svn_diff_tree_processor_t *
svn_diff__tree_processor_create(void *baton,
apr_pool_t *result_pool)
{
- tree_processor_t *wrapper;
- wrapper = apr_pcalloc(result_pool, sizeof(*wrapper));
+ svn_diff_tree_processor_t *tp = apr_pcalloc(result_pool, sizeof(*tp));
- wrapper->tp.baton = baton;
+ tp->baton = baton;
- wrapper->tp.dir_opened = default_dir_opened;
- wrapper->tp.dir_added = default_dir_added;
- wrapper->tp.dir_deleted = default_dir_deleted;
- wrapper->tp.dir_changed = default_dir_changed;
- wrapper->tp.dir_closed = default_dir_closed;
+ tp->dir_opened = default_dir_opened;
+ tp->dir_added = default_dir_added;
+ tp->dir_deleted = default_dir_deleted;
+ tp->dir_changed = default_dir_changed;
+ tp->dir_closed = default_dir_closed;
- wrapper->tp.file_opened = default_file_opened;
- wrapper->tp.file_added = default_file_added;
- wrapper->tp.file_deleted = default_file_deleted;
- wrapper->tp.file_changed = default_file_changed;
- wrapper->tp.file_closed = default_file_closed;
+ tp->file_opened = default_file_opened;
+ tp->file_added = default_file_added;
+ tp->file_deleted = default_file_deleted;
+ tp->file_changed = default_file_changed;
+ tp->file_closed = default_file_closed;
- wrapper->tp.node_absent = default_node_absent;
+ tp->node_absent = default_node_absent;
-
- return &wrapper->tp;
+ return tp;
}
struct reverse_tree_baton_t
{
const svn_diff_tree_processor_t *processor;
- const char *prefix_relpath;
};
static svn_error_t *
@@ -259,9 +248,6 @@ reverse_dir_opened(void **new_dir_baton,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->dir_opened(new_dir_baton, skip, skip_children,
relpath,
right_source, left_source,
@@ -284,9 +270,6 @@ reverse_dir_added(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->dir_deleted(relpath,
right_source,
right_props,
@@ -307,9 +290,6 @@ reverse_dir_deleted(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->dir_added(relpath,
NULL,
left_source,
@@ -335,9 +315,6 @@ reverse_dir_changed(const char *relpath,
struct reverse_tree_baton_t *rb = processor->baton;
apr_array_header_t *reversed_prop_changes = NULL;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
if (prop_changes)
{
SVN_ERR_ASSERT(left_props != NULL && right_props != NULL);
@@ -367,9 +344,6 @@ reverse_dir_closed(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->dir_closed(relpath,
right_source,
left_source,
@@ -393,9 +367,6 @@ reverse_file_opened(void **new_file_bato
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->file_opened(new_file_baton,
skip,
relpath,
@@ -423,9 +394,6 @@ reverse_file_added(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->file_deleted(relpath,
right_source,
right_file,
@@ -447,9 +415,6 @@ reverse_file_deleted(const char *relpath
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->file_added(relpath,
NULL /* copyfrom src */,
left_source,
@@ -480,9 +445,6 @@ reverse_file_changed(const char *relpath
struct reverse_tree_baton_t *rb = processor->baton;
apr_array_header_t *reversed_prop_changes = NULL;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
if (prop_changes)
{
SVN_ERR_ASSERT(left_props != NULL && right_props != NULL);
@@ -515,9 +477,6 @@ reverse_file_closed(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->file_closed(relpath,
right_source,
left_source,
@@ -536,9 +495,6 @@ reverse_node_absent(const char *relpath,
{
struct reverse_tree_baton_t *rb = processor->baton;
- if (rb->prefix_relpath)
- relpath = svn_relpath_join(rb->prefix_relpath, relpath, scratch_pool);
-
SVN_ERR(rb->processor->node_absent(relpath,
dir_baton,
rb->processor,
@@ -549,7 +505,6 @@ reverse_node_absent(const char *relpath,
const svn_diff_tree_processor_t *
svn_diff__tree_processor_reverse_create(const svn_diff_tree_processor_t * processor,
- const char *prefix_relpath,
apr_pool_t *result_pool)
{
struct reverse_tree_baton_t *rb;
@@ -557,8 +512,6 @@ svn_diff__tree_processor_reverse_create(
rb = apr_pcalloc(result_pool, sizeof(*rb));
rb->processor = processor;
- if (prefix_relpath)
- rb->prefix_relpath = apr_pstrdup(result_pool, prefix_relpath);
reverse = svn_diff__tree_processor_create(rb, result_pool);
Modified: subversion/branches/better-pristines/subversion/libsvn_fs_fs/recovery.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_fs/recovery.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_fs/recovery.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_fs/recovery.c Sun Sep 30 18:26:47 2018
@@ -471,9 +471,15 @@ recover_body(void *baton, apr_pool_t *po
}
/* Prune younger-than-(newfound-youngest) revisions from the rep
- cache if sharing is enabled taking care not to create the cache
- if it does not exist. */
- if (ffd->rep_sharing_allowed)
+ cache, taking care not to create the cache if it does not exist.
+
+ We do this whenever rep-cache.db exists, whether it's currently enabled
+ or not, to prevent a data loss that could result from having revisions
+ created after this 'recover' operation referring to rep-cache.db rows
+ that were created before the recover and that point to revisions younger-
+ than-(newfound-youngest).
+ */
+ if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT)
{
svn_boolean_t rep_cache_exists;
Propchange: subversion/branches/better-pristines/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Sun Sep 30 18:26:47 2018
@@ -96,4 +96,4 @@
/subversion/branches/verify-keep-going/subversion/libsvn_fs_x:1439280-1492639,1546002-1546110
/subversion/branches/wc-collate-path/subversion/libsvn_fs_x:1402685-1480384
/subversion/trunk/subversion/libsvn_fs_fs:1415133-1596500,1596567,1597414,1597989,1598273,1599140,1600872,1601633,1603485-1603487,1603499,1603605,1604128,1604188,1604413-1604414,1604416-1604417,1604421,1604442,1604700,1604717,1604720,1604726,1604755,1604794,1604802,1604824,1604836,1604844,1604902-1604903,1604911,1604925,1604933,1604947,1605059-1605060,1605064-1605065,1605068,1605071-1605073,1605075,1605123,1605188-1605189,1605191,1605197,1605444,1605633,1606132,1606142,1606144,1606514,1606526,1606528,1606551,1606554,1606564,1606598-1606599,1606656,1606658,1606662,1606744,1606840,1607085,1607572,1612407,1612810,1613339,1613872,1614611,1615348,1615351-1615352,1615356,1616338-1616339,1616613,1617586,1617688,1618138,1618151,1618153,1618226,1618641,1618653,1618662,1619068,1619358,1619413,1619769,1619774,1620602,1620909,1620912,1620928,1620930,1621275,1621635,1622931,1622937,1622942,1622946,1622959-1622960,1622963,1622987,1623007,1623368,1623373,1623377,1623379,1623381,1623398,1623402,162
4011,1624265,1624512,1626246,1626871,1626873,1626886,1627497-1627498,1627502,1627947-1627949,1627966,1628083,1628093,1628158-1628159,1628161,1628392-1628393,1628415,1628427,1628676,1628738,1628762,1628764,1629854-1629855,1629857,1629865,1629873,1629875,1629879,1630067,1630070,1631049-1631051,1631075,1631115,1631171,1631180,1631185-1631186,1631196-1631197,1631239-1631240,1631548,1631550,1631563,1631567,1631588,1631598,1632646,1632776,1632849,1632851-1632853,1632856-1632857,1632868,1632908,1632926,1633232,1633617-1633618,1634872,1634875,1634879-1634880,1634920,1636478,1636483,1636629,1636644,1637184,1637186,1637330,1637358,1637363,1637393,1639319,1639322,1639335,1639348,1639352,1639355,1639358,1639414,1639419,1639426,1639430,1639436,1639440,1639549,1640061-1640062,1640197,1640915,1640966,1641013,1643139,1643233,1645567,1646021,1646712,1646716,1647537,1647540-1647541,1647820,1647905,1648230,1648238,1648241-1648243,1648253,1648272,1648532,1648537-1648539,1648542,1648591,1648612,1649590,
1651567,1652068,1652076,1652441,1652451,1653608,1654932,1654934,1654937,1655635,1655649,1655651,1655664,1656176,1657525,1657972,1657978,1658482,1659212,1659217,1659314,1659509,1662668,1665318,1665854,1665894,1667090,1667101,1667538,1669743,1669746,1669749,1669945,1670139,1670953,1673170,1673197,1673202,1673204,1673445,1673454,1673685,1673689,1673875,1674165,1674341,1674400,1674404,1674631,1674669,1674673,1675396,1676667,1677431,1678149,1678151,1678718,1678725,1679169,1679907,1679920-1679924,1679926,1680347,1680460,1680464,1680476,1680819,1681949,1681966,1681974,1681994,1682008,1682076,1682086,1682093,1682259,1682265,1682739,1682864,1683311,1683330,1683378,1683544,1683553,1684047,1686232,1686542,1686546,1686554,1686557,1687061,1687064,1687070-1687071,1687074,1687078-1687079,1688270,1688425,1692650,1693886,1694489,1694848,1696171,1696185,1696627-1696628,1696630,1696758,1697372,1697381,1697387,1697393,1697403,1697405,1701017,1701053,1702600,1702922,1703069,1703142,1703237,1703240,17052
66,1705638,1705643,1705646,1705724,1705730,1705739,1706612,1706615,1706617,1706619,1706675-1706676,1706679,1706979-1706980,1707308,1707971-1707973,1707986,1707988-1707989,1708004,1709388,1709799,1710017,1710359,1710368,1710370,1711507,1711582,1711672,1712927,1715793,1715947,1716047,1716067,1716784,1716973-1716974,1717332,1717334,1717864,1719269,1719336,1719413,1719730,1720015,1721285,1723715,1723720,1723834,1723839,1725179-1725180,1726004,1726099,1726116,1726897,1726995,1727006-1727007,1727028,1727040,1727707,1727822,1730491,1735916,1736357,1736359,1737355-1737356,1740721-1740722,1741096,1741200,1741206,1741214,1741224,1742540,1745055,1745107,1745852,1746006,1746012,1746026,1756258-1756266,1756364,1756377,1759117,1759122-1759126,1759135,1759404-1759405,1759686,1764340,1764481,1764676,1766352,1780810,1781655,1781694,1785053,1785737-1785738,1785741,1785754,1785904,1786445-1786446,1786515
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1807118-1819868
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1807118-1842402
Modified: subversion/branches/better-pristines/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_fs_x/tree.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_fs_x/tree.c Sun Sep 30 18:26:47 2018
@@ -2060,7 +2060,7 @@ typedef struct text_baton_t
* svn_fs_apply_text() ==> ... ==> txn_body_fulltext_finalize_edits()
*/
-/* Write function for the publically returned stream. */
+/* Write function for the publicly returned stream. */
static svn_error_t *
text_stream_writer(void *baton,
const char *data,
Modified: subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_ra_serf/util.c Sun Sep 30 18:26:47 2018
@@ -756,6 +756,9 @@ handle_client_cert_pw(void *data,
if (creds)
{
+ /* At this stage we are unable to check whether the password
+ is correct; if it is incorrect serf will fail to establish
+ an SSL connection and will return a generic SSL error. */
svn_auth_cred_ssl_client_cert_pw_t *pw_creds;
pw_creds = creds;
*password = pw_creds->password;
@@ -1445,6 +1448,23 @@ handle_response(serf_request_t *request,
process_body:
+ /* A client cert file password was obtained and worked (any HTTP
+ response means that the SSL connection was established.) */
+ if (handler->conn->ssl_client_pw_auth_state)
+ {
+ SVN_ERR(svn_auth_save_credentials(handler->conn->ssl_client_pw_auth_state,
+ handler->session->pool));
+ handler->conn->ssl_client_pw_auth_state = NULL;
+ }
+ if (handler->conn->ssl_client_auth_state)
+ {
+ /* The cert file provider doesn't have any code to save creds so
+ this is currently a no-op. */
+ SVN_ERR(svn_auth_save_credentials(handler->conn->ssl_client_auth_state,
+ handler->session->pool));
+ handler->conn->ssl_client_auth_state = NULL;
+ }
+
/* We've been instructed to ignore the body. Drain whatever is present. */
if (handler->discard_body)
{
Modified: subversion/branches/better-pristines/subversion/libsvn_repos/authz_parse.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/authz_parse.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_repos/authz_parse.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_repos/authz_parse.c Sun Sep 30 18:26:47 2018
@@ -1058,14 +1058,15 @@ expand_group_callback(void *baton,
else
{
/* Recursively expand the group membership */
- members = svn_hash_gets(cb->parsed_groups, member);
- if (!members)
+ apr_array_header_t *member_members
+ = svn_hash_gets(cb->parsed_groups, member);
+ if (!member_members)
return svn_error_createf(
SVN_ERR_AUTHZ_INVALID_CONFIG, NULL,
_("Undefined group '%s'"),
member);
SVN_ERR(expand_group_callback(cb, key, klen,
- members, scratch_pool));
+ member_members, scratch_pool));
}
}
return SVN_NO_ERROR;
Modified: subversion/branches/better-pristines/subversion/libsvn_repos/dump.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/dump.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_repos/dump.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_repos/dump.c Sun Sep 30 18:26:47 2018
@@ -1936,25 +1936,11 @@ write_revision_record(svn_stream_t *stre
apr_pool_t *pool)
{
apr_hash_t *props;
- apr_time_t timetemp;
- svn_string_t *datevalue;
if (include_revprops)
{
SVN_ERR(svn_repos_fs_revision_proplist(&props, repos, rev,
authz_func, authz_baton, pool));
-
- /* Run revision date properties through the time conversion to
- canonicalize them. */
- /* ### Remove this when it is no longer needed for sure. */
- datevalue = svn_hash_gets(props, SVN_PROP_REVISION_DATE);
- if (datevalue)
- {
- SVN_ERR(svn_time_from_cstring(&timetemp, datevalue->data, pool));
- datevalue = svn_string_create(svn_time_to_cstring(timetemp, pool),
- pool);
- svn_hash_sets(props, SVN_PROP_REVISION_DATE, datevalue);
- }
}
else
{
Modified: subversion/branches/better-pristines/subversion/libsvn_repos/list.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_repos/list.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_repos/list.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_repos/list.c Sun Sep 30 18:26:47 2018
@@ -324,7 +324,7 @@ svn_repos_list(svn_fs_root_t *root,
svn_membuf__create(&scratch_buffer, 256, scratch_pool);
/* Actually report PATH, if it passes the filters. */
- if (matches_any(svn_dirent_dirname(path, scratch_pool), patterns,
+ if (matches_any(svn_dirent_basename(path, scratch_pool), patterns,
&scratch_buffer))
SVN_ERR(report_dirent(root, path, kind, path_info_only,
receiver, receiver_baton, scratch_pool));
Modified: subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/config_file.c Sun Sep 30 18:26:47 2018
@@ -1155,6 +1155,7 @@ svn_config_ensure(const char *config_dir
"### HTTP operation." NL
"### http-chunked-requests Whether to use chunked transfer" NL
"### encoding for HTTP requests body." NL
+ "### http-auth-types List of HTTP authentication types."NL
"### ssl-authority-files List of files, each of a trusted CA"
NL
"### ssl-trust-default-ca Trust the system 'default' CAs" NL
Modified: subversion/branches/better-pristines/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/io.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/io.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/io.c Sun Sep 30 18:26:47 2018
@@ -342,8 +342,13 @@ io_check_path(const char *path,
/* Not using svn_io_stat() here because we want to check the
apr_err return explicitly. */
SVN_ERR(cstring_from_utf8(&path_apr, path, pool));
-
+#ifdef WIN32
+ /* on Windows, svn does not handle reparse points or hard links.
+ So ignore the 'resolve_symlinks' flag. */
+ flags = APR_FINFO_MIN;
+#else
flags = resolve_symlinks ? APR_FINFO_MIN : (APR_FINFO_MIN | APR_FINFO_LINK);
+#endif
apr_err = apr_stat(&finfo, path_apr, flags, pool);
if (APR_STATUS_IS_ENOENT(apr_err))
@@ -2541,9 +2546,10 @@ stringbuf_from_aprfile(svn_stringbuf_t *
{
apr_finfo_t finfo = { 0 };
- /* In some cases we get size 0 and no error for non files,
- so we also check for the name. (= cached in apr_file_t) */
- if (! apr_file_info_get(&finfo, APR_FINFO_SIZE, file) && finfo.fname)
+ /* In some cases we get size 0 and no error for non files, so we
+ also check for the name. (= cached in apr_file_t) and for FIFOs */
+ if (! apr_file_info_get(&finfo, APR_FINFO_SIZE | APR_FINFO_TYPE, file)
+ && finfo.fname && finfo.filetype != APR_PIPE)
{
/* we've got the file length. Now, read it in one go. */
svn_boolean_t eof;
@@ -4631,7 +4637,7 @@ svn_io_dir_walk2(const char *dirname,
}
else if (finfo.filetype == APR_REG || finfo.filetype == APR_LNK)
{
- /* some other directory. pass it to the callback. */
+ /* a regular file or a symlink. pass it to the callback. */
SVN_ERR(entry_name_to_utf8(&name_utf8, finfo.name, dirname,
subpool));
full_path = svn_dirent_join(dirname, name_utf8, subpool);
Modified: subversion/branches/better-pristines/subversion/libsvn_subr/ssl_client_cert_pw_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/ssl_client_cert_pw_providers.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/ssl_client_cert_pw_providers.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/ssl_client_cert_pw_providers.c Sun Sep 30 18:26:47 2018
@@ -36,7 +36,7 @@
#include "svn_private_config.h"
/*-----------------------------------------------------------------------*/
-/* File provider */
+/* File password provider */
/*-----------------------------------------------------------------------*/
/* Baton type for the ssl client cert passphrase provider. */
@@ -51,6 +51,13 @@ typedef struct ssl_client_cert_pw_file_p
apr_hash_t *plaintext_answers;
} ssl_client_cert_pw_file_provider_baton_t;
+/* The client cert password provider only deals with a password and
+ realm (the client cert filename), there is no username. The gnome
+ keyring backend based on libsecret requires a non-NULL username so
+ we have to invent one. An empty string is acceptable and doesn't
+ change the value stored by the kwallet backend. */
+#define DUMMY_USERNAME ""
+
/* This implements the svn_auth__password_get_t interface.
Set **PASSPHRASE to the plaintext passphrase retrieved from CREDS;
ignore other parameters. */
@@ -132,7 +139,8 @@ svn_auth__ssl_client_cert_pw_cache_get(v
svn_boolean_t done;
SVN_ERR(passphrase_get(&done, &password, creds_hash, realmstring,
- NULL, parameters, non_interactive, pool));
+ DUMMY_USERNAME, parameters, non_interactive,
+ pool));
if (!done)
password = NULL;
}
@@ -293,7 +301,7 @@ svn_auth__ssl_client_cert_pw_cache_set(s
if (may_save_passphrase)
{
SVN_ERR(passphrase_set(saved, creds_hash, realmstring,
- NULL, creds->password, parameters,
+ DUMMY_USERNAME, creds->password, parameters,
non_interactive, pool));
if (*saved && passtype)
Modified: subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_subr/sysinfo.c Sun Sep 30 18:26:47 2018
@@ -1122,42 +1122,70 @@ value_from_dict(CFDictionaryRef plist, C
return value;
}
-/* Return the commercial name of the OS, given the version number in
+/* Return the minor version the operating system, given the number in
a format that matches the regular expression /^10\.\d+(\..*)?$/ */
-static const char *
-release_name_from_version(const char *osver)
+static int
+macos_minor_version(const char *osver)
{
char *end = NULL;
unsigned long num = strtoul(osver, &end, 10);
if (!end || *end != '.' || num != 10)
- return NULL;
+ return -1;
osver = end + 1;
end = NULL;
num = strtoul(osver, &end, 10);
if (!end || (*end && *end != '.'))
- return NULL;
+ return -1;
+
+ return (int)num;
+}
+
+/* Return the product name of the operating system. */
+static const char *
+product_name_from_minor_version(int minor, const char* product_name)
+{
+ /* We can only do this if we know the official product name. */
+ if (0 != strcmp(product_name, "Mac OS X"))
+ return product_name;
+
+ if (minor <= 7)
+ return product_name;
+
+ if (minor <= 11)
+ return "OS X";
- /* See http://en.wikipedia.org/wiki/History_of_OS_X#Release_timeline */
- switch(num)
+ return "macOS";
+}
+
+/* Return the commercial name of the operating system. */
+static const char *
+release_name_from_minor_version(int minor, const char* product_name)
+{
+ /* We can only do this if we know the official product name. */
+ if (0 == strcmp(product_name, "Mac OS X"))
{
- case 0: return "Cheetah";
- case 1: return "Puma";
- case 2: return "Jaguar";
- case 3: return "Panther";
- case 4: return "Tiger";
- case 5: return "Leopard";
- case 6: return "Snow Leopard";
- case 7: return "Lion";
- case 8: return "Mountain Lion";
- case 9: return "Mavericks";
- case 10: return "Yosemite";
- case 11: return "El Capitan";
- case 12: return "Sierra";
- case 13: return "High Sierra";
+ /* See https://en.wikipedia.org/wiki/MacOS_version_history#Releases */
+ switch(minor)
+ {
+ case 0: return "Cheetah";
+ case 1: return "Puma";
+ case 2: return "Jaguar";
+ case 3: return "Panther";
+ case 4: return "Tiger";
+ case 5: return "Leopard";
+ case 6: return "Snow Leopard";
+ case 7: return "Lion";
+ case 8: return "Mountain Lion";
+ case 9: return "Mavericks";
+ case 10: return "Yosemite";
+ case 11: return "El Capitan";
+ case 12: return "Sierra";
+ case 13: return "High Sierra";
+ case 14: return "Mojave";
+ }
}
-
return NULL;
}
@@ -1180,20 +1208,23 @@ macos_release_name(apr_pool_t *pool)
CFSTR("ProductBuildVersion"),
pool);
const char *release;
+ int minor_version;
if (!osver)
osver = value_from_dict(plist, CFSTR("ProductVersion"), pool);
- release = release_name_from_version(osver);
+ minor_version = macos_minor_version(osver);
+ release = release_name_from_minor_version(minor_version, osname);
+ osname = product_name_from_minor_version(minor_version, osname);
CFRelease(plist);
return apr_psprintf(pool, "%s%s%s%s%s%s%s%s",
(osname ? osname : ""),
- (osver ? (osname ? " " : "") : ""),
- (osver ? osver : ""),
- (release ? (osname||osver ? " " : "") : ""),
+ (release ? (osname ? " " : "") : ""),
(release ? release : ""),
+ (osver ? (osname||release ? " " : "") : ""),
+ (osver ? osver : ""),
(build
- ? (osname||osver||release ? ", " : "")
+ ? (osname||release||osver ? ", " : "")
: ""),
(build
? (server ? "server build " : "build ")
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/README
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/README?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/README (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/README Sun Sep 30 18:26:47 2018
@@ -94,6 +94,10 @@ copies.
.svn/wc.db /* SQLite database containing node metadata. */
pristine/ /* Sharded directory containing base files. */
tmp/ /* Local tmp area. */
+ experimental/ /* Data for experimental features. */
+ shelves/ /* Used by 1.10.x shelves implementation */
+ entries /* Stub file. */
+ format /* Stub file. */
`wc.db':
A self-contained SQLite database containing all the metadata Subversion
@@ -109,6 +113,17 @@ copies.
Pristines are used for sending diffs back to the server, etc.
+`experimental':
+ Experimental (unstable) features store their data here.
+
+`shelves':
+ Subversion 1.10's "svn shelve" command stores shelved changes here.
+ This directory is not used by any other minor release line.
+
+`entries', `format':
+ These stub files exist only to enable a pre-1.7 client to yield a clearer
+ error message.
+
How the client applies an update delta
--------------------------------------
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/conflicts.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/conflicts.c Sun Sep 30 18:26:47 2018
@@ -3888,9 +3888,9 @@ svn_wc__guess_incoming_move_target_nodes
apr_size_t longest_ancestor_len = 0;
*possible_targets = apr_array_make(result_pool, 1, sizeof(const char *));
- SVN_ERR(svn_wc__find_repos_node_in_wc(&candidates, wc_ctx->db, victim_abspath,
- moved_to_repos_relpath,
- scratch_pool, scratch_pool));
+ SVN_ERR(svn_wc__db_find_repos_node_in_wc(&candidates, wc_ctx->db, victim_abspath,
+ moved_to_repos_relpath,
+ scratch_pool, scratch_pool));
/* Find a "useful move target" node in our set of candidates.
* Since there is no way to be certain, filter out nodes which seem
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/deprecated.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/deprecated.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/deprecated.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/deprecated.c Sun Sep 30 18:26:47 2018
@@ -2096,8 +2096,7 @@ svn_wc_get_diff_editor6(const svn_delta_
result_pool, scratch_pool));
if (reverse_order)
- diff_processor = svn_diff__tree_processor_reverse_create(
- diff_processor, NULL, result_pool);
+ diff_processor = svn_diff__tree_processor_reverse_create(diff_processor, result_pool);
if (! show_copies_as_adds)
diff_processor = svn_diff__tree_processor_copy_as_changed_create(
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/diff_local.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/diff_local.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/diff_local.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/diff_local.c Sun Sep 30 18:26:47 2018
@@ -433,8 +433,7 @@ diff_status_callback(void *baton,
/* Public Interface */
svn_error_t *
-svn_wc__diff7(const char **root_relpath,
- svn_boolean_t *root_is_dir,
+svn_wc__diff7(svn_boolean_t anchor_at_given_paths,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
@@ -459,26 +458,30 @@ svn_wc__diff7(const char **root_relpath,
eb.anchor_abspath = local_abspath;
- if (root_relpath)
+ if (anchor_at_given_paths)
{
+ /* Anchor the underlying diff processor at the parent of
+ LOCAL_ABSPATH (if possible), and adjust so the outgoing
+ DIFF_PROCESSOR is always anchored at LOCAL_ABSPATH. */
+ /* ### Why anchor the underlying diff processor at the parent? */
svn_boolean_t is_wcroot;
SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot,
wc_ctx->db, local_abspath, scratch_pool));
if (!is_wcroot)
- eb.anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+ {
+ const char *relpath;
+
+ eb.anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
+ relpath = svn_dirent_basename(local_abspath, NULL);
+ diff_processor = svn_diff__tree_processor_filter_create(
+ diff_processor, relpath, scratch_pool);
+ }
}
else if (kind != svn_node_dir)
eb.anchor_abspath = svn_dirent_dirname(local_abspath, scratch_pool);
- if (root_relpath)
- *root_relpath = apr_pstrdup(result_pool,
- svn_dirent_skip_ancestor(eb.anchor_abspath,
- local_abspath));
- if (root_is_dir)
- *root_is_dir = (kind == svn_node_dir);
-
/* Apply changelist filtering to the output */
if (changelist_filter && changelist_filter->nelts)
{
@@ -572,7 +575,7 @@ svn_wc_diff6(svn_wc_context_t *wc_ctx,
processor = svn_diff__tree_processor_copy_as_changed_create(processor,
scratch_pool);
- return svn_error_trace(svn_wc__diff7(NULL, NULL,
+ return svn_error_trace(svn_wc__diff7(FALSE,
wc_ctx, local_abspath,
depth,
ignore_ancestry,
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/node.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/node.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/node.c Sun Sep 30 18:26:47 2018
@@ -1126,3 +1126,17 @@ svn_wc__node_was_moved_here(const char *
return SVN_NO_ERROR;
}
+
+svn_error_t *
+svn_wc__find_working_nodes_with_basename(apr_array_header_t **abspaths,
+ const char *wri_abspath,
+ const char *basename,
+ svn_node_kind_t kind,
+ svn_wc_context_t *wc_ctx,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ return svn_error_trace(svn_wc__db_find_working_nodes_with_basename(
+ abspaths, wc_ctx->db, wri_abspath, basename, kind,
+ result_pool, scratch_pool));
+}
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc-queries.sql?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc-queries.sql Sun Sep 30 18:26:47 2018
@@ -117,6 +117,17 @@ WHERE wc_id = ?1 AND local_relpath = ?2
ORDER BY op_depth DESC
LIMIT 1
+-- STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND
+SELECT presence, local_relpath
+FROM nodes n
+WHERE wc_id = ?1 AND local_relpath = RELPATH_JOIN(parent_relpath, ?2)
+ AND kind = ?3
+ AND presence in (MAP_NORMAL, MAP_INCOMPLETE)
+ AND op_depth = (SELECT MAX(op_depth)
+ FROM NODES w
+ WHERE w.wc_id = ?1
+ AND w.local_relpath = n.local_relpath)
+
-- STMT_SELECT_ACTUAL_NODE
SELECT changelist, properties, conflict_data
FROM actual_node
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc.h?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc.h (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc.h Sun Sep 30 18:26:47 2018
@@ -301,6 +301,7 @@ struct svn_wc_traversal_info_t
#define SVN_WC__ADM_TMP "tmp"
#define SVN_WC__ADM_PRISTINE "pristine"
#define SVN_WC__ADM_NONEXISTENT_PATH "nonexistent-path"
+#define SVN_WC__ADM_EXPERIMENTAL "experimental"
/* The basename of the ".prej" file, if a directory ever has property
conflicts. This .prej file will appear *within* the conflicted
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.c Sun Sep 30 18:26:47 2018
@@ -16586,12 +16586,12 @@ svn_wc__db_process_commit_queue(svn_wc__
}
svn_error_t *
-svn_wc__find_repos_node_in_wc(apr_array_header_t **local_abspath_list,
- svn_wc__db_t *db,
- const char *wri_abspath,
- const char *repos_relpath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool)
+svn_wc__db_find_repos_node_in_wc(apr_array_header_t **local_abspath_list,
+ svn_wc__db_t *db,
+ const char *wri_abspath,
+ const char *repos_relpath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
{
svn_wc__db_wcroot_t *wcroot;
const char *wri_relpath;
@@ -16628,3 +16628,46 @@ svn_wc__find_repos_node_in_wc(apr_array_
return svn_error_trace(svn_sqlite__reset(stmt));
}
+svn_error_t *
+svn_wc__db_find_working_nodes_with_basename(apr_array_header_t **local_abspaths,
+ svn_wc__db_t *db,
+ const char *wri_abspath,
+ const char *basename,
+ svn_node_kind_t kind,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool)
+{
+ svn_wc__db_wcroot_t *wcroot;
+ const char *wri_relpath;
+ svn_sqlite__stmt_t *stmt;
+ svn_boolean_t have_row;
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(wri_abspath));
+
+ SVN_ERR(svn_wc__db_wcroot_parse_local_abspath(&wcroot, &wri_relpath, db,
+ wri_abspath, scratch_pool,
+ scratch_pool));
+ VERIFY_USABLE_WCROOT(wcroot);
+
+ SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb,
+ STMT_SELECT_PRESENT_HIGHEST_WORKING_NODES_BY_BASENAME_AND_KIND));
+ SVN_ERR(svn_sqlite__bindf(stmt, "ist", wcroot->wc_id, basename,
+ kind_map, kind));
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+
+ *local_abspaths = apr_array_make(result_pool, 1, sizeof(const char *));
+
+ while (have_row)
+ {
+ const char *local_relpath;
+ const char *local_abspath;
+
+ local_relpath = svn_sqlite__column_text(stmt, 1, NULL);
+ local_abspath = svn_dirent_join(wcroot->abspath, local_relpath,
+ result_pool);
+ APR_ARRAY_PUSH(*local_abspaths, const char *) = local_abspath;
+ SVN_ERR(svn_sqlite__step(&have_row, stmt));
+ }
+
+ return svn_error_trace(svn_sqlite__reset(stmt));
+}
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.h
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.h?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.h (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc_db.h Sun Sep 30 18:26:47 2018
@@ -3497,12 +3497,30 @@ svn_wc__required_lock_for_resolve(const
* which has been replaced.
*/
svn_error_t *
-svn_wc__find_repos_node_in_wc(apr_array_header_t **local_abspath_list,
- svn_wc__db_t *db,
- const char *wri_abspath,
- const char *repos_relpath,
- apr_pool_t *result_pool,
- apr_pool_t *scratch_pool);
+svn_wc__db_find_repos_node_in_wc(apr_array_header_t **local_abspath_list,
+ svn_wc__db_t *db,
+ const char *wri_abspath,
+ const char *repos_relpath,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
+
+/* Return an array of const char * elements, which represent local absolute
+ * paths for nodes, within the working copy indicated by WRI_ABSPATH, which
+ * have a basename matching BASENAME and have node kind KIND.
+ * If no such nodes exist, return an empty array.
+ *
+ * This function returns only paths to nodes which are present in the highest
+ * layer of the WC. In other words, paths to deleted and/or excluded nodes are
+ * never returned.
+ */
+svn_error_t *
+svn_wc__db_find_working_nodes_with_basename(apr_array_header_t **local_abspaths,
+ svn_wc__db_t *db,
+ const char *wri_abspath,
+ const char *basename,
+ svn_node_kind_t kind,
+ apr_pool_t *result_pool,
+ apr_pool_t *scratch_pool);
/* @} */
typedef svn_error_t * (*svn_wc__db_verify_cb_t)(void *baton,
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wc_db_wcroot.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wc_db_wcroot.c Sun Sep 30 18:26:47 2018
@@ -539,6 +539,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
const char *adm_relpath;
/* Non-NULL if WCROOT is found through a symlink: */
const char *symlink_wcroot_abspath = NULL;
+ apr_pool_t *iterpool;
/* ### we need more logic for finding the database (if it is located
### outside of the wcroot) and then managing all of that within DB.
@@ -624,16 +625,20 @@ svn_wc__db_wcroot_parse_local_abspath(sv
database in the right place. If we find it... great! If not, then
peel off some components, and try again. */
+ iterpool = svn_pool_create(scratch_pool);
adm_relpath = svn_wc_get_adm_dir(scratch_pool);
while (TRUE)
{
svn_error_t *err;
svn_node_kind_t adm_subdir_kind;
- const char *adm_subdir = svn_dirent_join(local_abspath, adm_relpath,
- scratch_pool);
+ const char *adm_subdir;
- SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, scratch_pool));
+ svn_pool_clear(iterpool);
+
+ adm_subdir = svn_dirent_join(local_abspath, adm_relpath, iterpool);
+
+ SVN_ERR(svn_io_check_path(adm_subdir, &adm_subdir_kind, iterpool));
if (adm_subdir_kind == svn_node_dir)
{
@@ -684,7 +689,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
if (!moved_upwards || always_check)
{
SVN_ERR(get_old_version(&wc_format, local_abspath,
- scratch_pool));
+ iterpool));
if (wc_format != 0)
break;
}
@@ -708,7 +713,7 @@ svn_wc__db_wcroot_parse_local_abspath(sv
SVN_ERR(svn_io_check_resolved_path(local_abspath,
&resolved_kind,
- scratch_pool));
+ iterpool));
if (resolved_kind == svn_node_dir)
{
/* Is this directory recorded in our hash? */
@@ -984,6 +989,7 @@ try_symlink_as_dir:
}
while (strcmp(scan_abspath, local_abspath) != 0);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c (original)
+++ subversion/branches/better-pristines/subversion/libsvn_wc/wcroot_anchor.c Sun Sep 30 18:26:47 2018
@@ -193,7 +193,10 @@ svn_wc__get_shelves_dir(char **dir,
SVN_ERR(svn_wc__get_wcroot(&wcroot_abspath, wc_ctx, local_abspath,
scratch_pool, scratch_pool));
- *dir = svn_dirent_join(wcroot_abspath, ".svn/shelves", result_pool);
+ *dir = svn_dirent_join(wcroot_abspath,
+ SVN_WC_ADM_DIR_NAME "/" SVN_WC__ADM_EXPERIMENTAL "/"
+ "shelves/v2",
+ result_pool);
/* Ensure the directory exists. (Other versions of svn don't create it.) */
SVN_ERR(svn_io_make_dir_recursively(*dir, scratch_pool));
Modified: subversion/branches/better-pristines/subversion/mod_dav_svn/reports/file-revs.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/reports/file-revs.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/reports/file-revs.c (original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/reports/file-revs.c Sun Sep 30 18:26:47 2018
@@ -214,7 +214,7 @@ file_rev_handler(void *baton,
frb->compression_level, pool);
*window_handler = delta_window_handler;
*window_baton = frb;
- /* Start the txdelta element wich will be terminated by the window
+ /* Start the txdelta element which will be terminated by the window
handler together with the file-rev element. */
SVN_ERR(dav_svn__brigade_puts(frb->bb, frb->output, "<S:txdelta>"));
}
Modified: subversion/branches/better-pristines/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/mod_dav_svn/repos.c?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/better-pristines/subversion/mod_dav_svn/repos.c Sun Sep 30 18:26:47 2018
@@ -2861,6 +2861,13 @@ open_stream(const dav_resource *resource
"Resource body changes may only be made to "
"working resources (at this time).");
}
+ if (!resource->info->root.root)
+ {
+ return dav_svn__new_error(resource->pool, HTTP_METHOD_NOT_ALLOWED,
+ 0, 0,
+ "Resource body changes may only be made to "
+ "checked-out resources (at this time).");
+ }
}
/* ### TODO: Can we support range writes someday? */
Modified: subversion/branches/better-pristines/subversion/po/de.po
URL: http://svn.apache.org/viewvc/subversion/branches/better-pristines/subversion/po/de.po?rev=1842404&r1=1842403&r2=1842404&view=diff
==============================================================================
--- subversion/branches/better-pristines/subversion/po/de.po [UTF-8] (original)
+++ subversion/branches/better-pristines/subversion/po/de.po [UTF-8] Sun Sep 30 18:26:47 2018
@@ -22302,8 +22302,8 @@ msgstr "Nicht übertragenes lokal hinzug
#~ " Unterschied zwischen der linken und der rechten Seite wird auf »trunk«\n"
#~ " als Ziel angewandt.\n"
#~ "\n"
-#~ " Um die Zusammenführung zur Reintegratoin auszuführen, verwenden Sie\n"
-#~ " eine Arbeitskopie des Entwicklungszweigs »feature« und führen Sie\n"
+#~ " Um die Zusammenführung zur Reintegration auszuführen, verwenden Sie\n"
+#~ " eine Arbeitskopie des Hauptzweigs »trunk« und führen Sie\n"
#~ " dieses Kommando im obersten Verzeichnis aus:\n"
#~ "\n"
#~ " svn merge ^/feature\n"