Author: stsp
Date: Wed Feb 4 11:34:12 2015
New Revision: 1657124
URL: http://svn.apache.org/r1657124
Log:
On the pin-externals branch, merge oustanding changes from trunk.
Modified:
subversion/branches/pin-externals/ (props changed)
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
subversion/branches/pin-externals/subversion/include/svn_client.h
subversion/branches/pin-externals/subversion/include/svn_wc.h
subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c
subversion/branches/pin-externals/subversion/libsvn_client/revert.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/ (props changed)
subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c
subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h
subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c
subversion/branches/pin-externals/subversion/libsvn_wc/deprecated.c
subversion/branches/pin-externals/subversion/libsvn_wc/revert.c
subversion/branches/pin-externals/subversion/svn/revert-cmd.c
subversion/branches/pin-externals/subversion/tests/libsvn_subr/ (props
changed)
subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c
subversion/branches/pin-externals/tools/dev/ (props changed)
Propchange: subversion/branches/pin-externals/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 4 11:34:12 2015
@@ -86,4 +86,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1643755-1656940
+/subversion/trunk:1643755-1657123
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.cpp
Wed Feb 4 11:34:12 2015
@@ -339,7 +339,8 @@ void SVNClient::remove(Targets &targets,
void SVNClient::revert(StringArray &paths, svn_depth_t depth,
StringArray &changelists,
- bool clear_changelists)
+ bool clear_changelists,
+ bool metadata_only)
{
SVN::Pool subPool(pool);
@@ -352,6 +353,7 @@ void SVNClient::revert(StringArray &path
SVN_JNI_ERR(svn_client_revert3(targets.array(subPool), depth,
changelists.array(subPool),
clear_changelists,
+ metadata_only,
ctx, subPool.getPool()), );
}
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/SVNClient.h
Wed Feb 4 11:34:12 2015
@@ -161,7 +161,7 @@ class SVNClient :public SVNBase
void add(const char *path, svn_depth_t depth, bool force,
bool no_ignore, bool no_autoprops, bool add_parents);
void revert(StringArray &paths, svn_depth_t depth, StringArray &changelists,
- bool clear_changelists);
+ bool clear_changelists, bool metadata_only);
void remove(Targets &targets, CommitMessage *message, bool force,
bool keep_local, PropertyTable &revprops,
CommitCallback *callback);
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/native/org_apache_subversion_javahl_SVNClient.cpp
Wed Feb 4 11:34:12 2015
@@ -439,7 +439,7 @@ Java_org_apache_subversion_javahl_SVNCli
JNIEXPORT void JNICALL
Java_org_apache_subversion_javahl_SVNClient_revert
(JNIEnv *env, jobject jthis, jobject jpaths, jobject jdepth,
- jobject jchangelists, jboolean jclear_changelists)
+ jobject jchangelists, jboolean jclear_changelists, jboolean jmetadata_only)
{
JNIEntry(SVNClient, revert);
SVNClient *cl = SVNClient::getCppObject(jthis);
@@ -459,7 +459,7 @@ Java_org_apache_subversion_javahl_SVNCli
return;
cl->revert(paths, EnumMapper::toDepth(jdepth),
- changelists, bool(jclear_changelists));
+ changelists, bool(jclear_changelists), bool(jmetadata_only));
}
JNIEXPORT void JNICALL
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java
Wed Feb 4 11:34:12 2015
@@ -261,12 +261,15 @@ public interface ISVNClient
* @param changelists changelists to filter by
* @param clearChangelists If set, will clear changelist association
* from the reverted paths.
+ * @param metadataOnly Revert just the metadata (including conflict data)
+ * and not the working files/dirs
* @throws ClientException
* @since 1.9
*/
void revert(Set<String> paths, Depth depth,
Collection<String> changelists,
- boolean clearChangelists)
+ boolean clearChangelists,
+ boolean metadataOnly)
throws ClientException;
/**
Modified:
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
---
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
(original)
+++
subversion/branches/pin-externals/subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java
Wed Feb 4 11:34:12 2015
@@ -194,21 +194,22 @@ public class SVNClient implements ISVNCl
public native void revert(Set<String> paths, Depth depth,
Collection<String> changelists,
- boolean clearChangelists)
+ boolean clearChangelists,
+ boolean metadataOnly)
throws ClientException;
public void revert(Set<String> paths, Depth depth,
Collection<String> changelists)
throws ClientException
{
- revert(paths, depth, changelists, false);
+ revert(paths, depth, changelists, false, false);
}
public void revert(String path, Depth depth,
Collection<String> changelists)
throws ClientException
{
- revert(Collections.singleton(path), depth, changelists, false);
+ revert(Collections.singleton(path), depth, changelists, false, false);
}
public native void add(String path, Depth depth, boolean force,
Modified: subversion/branches/pin-externals/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_client.h?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_client.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_client.h Wed Feb
4 11:34:12 2015
@@ -4289,6 +4289,10 @@ svn_client_relocate(const char *dir,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared while reverting.
*
+ * If @a metadata_only is TRUE, the files and directories aren't changed
+ * by the operation. If there are conflict marker files attached to the
+ * targets these are removed.
+ *
* If @a ctx->notify_func2 is non-NULL, then for each item reverted,
* call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
* the reverted item.
@@ -4304,11 +4308,12 @@ svn_client_revert3(const apr_array_heade
svn_depth_t depth,
const apr_array_header_t *changelists,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
/** Similar to svn_client_revert2, but with @a clear_changelists set to
- * FALSE.
+ * FALSE and @a metadata_only set to FALSE.
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.8 API.
Modified: subversion/branches/pin-externals/subversion/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/include/svn_wc.h?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/include/svn_wc.h (original)
+++ subversion/branches/pin-externals/subversion/include/svn_wc.h Wed Feb 4
11:34:12 2015
@@ -7539,6 +7539,10 @@ svn_wc_relocate(const char *path,
* If @a clear_changelists is TRUE, then changelist information for the
* paths is cleared.
*
+ * If @a metadata_only is TRUE, the working copy files are untouched, but
+ * if there are conflict marker files attached to these files these
+ * markers are removed.
+ *
* If @a cancel_func is non-NULL, call it with @a cancel_baton at
* various points during the reversion process. If it returns an
* error (typically #SVN_ERR_CANCELLED), return that error
@@ -7564,6 +7568,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
svn_boolean_t use_commit_times,
const apr_array_header_t *changelist_filter,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -7571,7 +7576,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_revert5() but with @a clear_changelists always set to
- * FALSE.
+ * FALSE and @a metadata_only set to FALSE.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
Modified:
subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/deprecated.c Wed
Feb 4 11:34:12 2015
@@ -2840,6 +2840,7 @@ svn_client_revert2(const apr_array_heade
depth,
changelists,
FALSE /* clear_changelists */,
+ FALSE /* metadata_only */,
ctx,
pool));
}
Modified: subversion/branches/pin-externals/subversion/libsvn_client/revert.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_client/revert.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_client/revert.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_client/revert.c Wed Feb
4 11:34:12 2015
@@ -50,6 +50,7 @@ struct revert_with_write_lock_baton {
svn_boolean_t use_commit_times;
const apr_array_header_t *changelists;
svn_boolean_t clear_changelists;
+ svn_boolean_t metadata_only;
svn_client_ctx_t *ctx;
};
@@ -85,6 +86,7 @@ revert(void *baton, apr_pool_t *result_p
b->use_commit_times,
b->changelists,
b->clear_changelists,
+ b->metadata_only,
b->ctx->cancel_func, b->ctx->cancel_baton,
b->ctx->notify_func2, b->ctx->notify_baton2,
scratch_pool);
@@ -98,11 +100,18 @@ revert(void *baton, apr_pool_t *result_p
|| err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
{
if (b->ctx->notify_func2)
- b->ctx->notify_func2(
- b->ctx->notify_baton2,
- svn_wc_create_notify(b->local_abspath, svn_wc_notify_skip,
- scratch_pool),
- scratch_pool);
+ {
+ svn_wc_notify_t *notify;
+
+ notify = svn_wc_create_notify(b->local_abspath,
+ svn_wc_notify_skip,
+ scratch_pool);
+
+ notify->err = err;
+
+ b->ctx->notify_func2(b->ctx->notify_baton2,
+ notify, scratch_pool);
+ }
svn_error_clear(err);
}
else
@@ -118,10 +127,11 @@ svn_client_revert3(const apr_array_heade
svn_depth_t depth,
const apr_array_header_t *changelists,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
- apr_pool_t *subpool;
+ apr_pool_t *iterpool;
svn_error_t *err = SVN_NO_ERROR;
int i;
svn_config_t *cfg;
@@ -148,7 +158,7 @@ svn_client_revert3(const apr_array_heade
SVN_CONFIG_OPTION_USE_COMMIT_TIMES,
FALSE));
- subpool = svn_pool_create(pool);
+ iterpool = svn_pool_create(pool);
for (i = 0; i < paths->nelts; i++)
{
@@ -156,14 +166,14 @@ svn_client_revert3(const apr_array_heade
const char *local_abspath, *lock_target;
svn_boolean_t wc_root;
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
/* See if we've been asked to cancel this operation. */
if ((ctx->cancel_func)
&& ((err = ctx->cancel_func(ctx->cancel_baton))))
goto errorful;
- err = svn_dirent_get_absolute(&local_abspath, path, pool);
+ err = svn_dirent_get_absolute(&local_abspath, path, iterpool);
if (err)
goto errorful;
@@ -172,15 +182,17 @@ svn_client_revert3(const apr_array_heade
baton.use_commit_times = use_commit_times;
baton.changelists = changelists;
baton.clear_changelists = clear_changelists;
+ baton.metadata_only = metadata_only;
baton.ctx = ctx;
- err = svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath, pool);
+ err = svn_wc__is_wcroot(&wc_root, ctx->wc_ctx, local_abspath, iterpool);
if (err)
goto errorful;
lock_target = wc_root ? local_abspath
: svn_dirent_dirname(local_abspath, pool);
err = svn_wc__call_with_write_lock(revert, &baton, ctx->wc_ctx,
- lock_target, FALSE, pool, pool);
+ lock_target, FALSE,
+ iterpool, iterpool);
if (err)
goto errorful;
}
@@ -196,10 +208,10 @@ svn_client_revert3(const apr_array_heade
if (paths->nelts == 1)
sleep_path = APR_ARRAY_IDX(paths, 0, const char *);
- svn_io_sleep_for_timestamps(sleep_path, subpool);
+ svn_io_sleep_for_timestamps(sleep_path, iterpool);
}
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return svn_error_trace(err);
}
Propchange: subversion/branches/pin-externals/subversion/libsvn_fs_x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 4 11:34:12 2015
@@ -87,5 +87,5 @@
/subversion/branches/verify-at-commit/subversion/libsvn_fs_x:1462039-1462408
/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
-/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1643755-1656940
+/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,1653608
+/subversion/trunk/subversion/libsvn_fs_x:1414756-1509914,1643755-1657123
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/cached_data.c Wed
Feb 4 11:34:12 2015
@@ -3100,10 +3100,6 @@ block_read_noderev(svn_fs_x__noderev_t *
SVN_ERR(svn_fs_x__read_noderev(noderev_p, stream, result_pool,
scratch_pool));
-
- /* Workaround issue #4031: is-fresh-txn-root in revision files. */
- (*noderev_p)->is_fresh_txn_root = FALSE;
-
if (ffd->node_revision_cache)
SVN_ERR(svn_cache__set(ffd->node_revision_cache, key, *noderev_p,
scratch_pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/dag.c Wed Feb 4
11:34:12 2015
@@ -267,7 +267,7 @@ svn_fs_x__dag_get_node(dag_node_t **node
/* Support our quirky svn_fs_node_created_rev API.
Untouched txn roots report the base rev as theirs. */
new_node->revision
- = ( noderev->is_fresh_txn_root
+ = ( svn_fs_x__is_fresh_txn_root(noderev)
? svn_fs_x__get_revnum(noderev->predecessor_id.change_set)
: svn_fs_x__get_revnum(id->change_set));
@@ -618,7 +618,7 @@ svn_fs_x__dag_increment_mergeinfo_count(
}
/* Flush it out. */
- return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+ return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
}
svn_error_t *
@@ -644,7 +644,7 @@ svn_fs_x__dag_set_has_mergeinfo(dag_node
noderev->has_mergeinfo = has_mergeinfo;
/* Flush it out. */
- return svn_fs_x__put_node_revision(node->fs, noderev, FALSE, scratch_pool);
+ return svn_fs_x__put_node_revision(node->fs, noderev, scratch_pool);
}
@@ -1401,6 +1401,6 @@ svn_fs_x__dag_update_ancestry(dag_node_t
target_noderev->predecessor_count = source_noderev->predecessor_count;
target_noderev->predecessor_count++;
- return svn_fs_x__put_node_revision(target->fs, target_noderev, FALSE,
+ return svn_fs_x__put_node_revision(target->fs, target_noderev,
scratch_pool);
}
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/fs.h Wed Feb 4
11:34:12 2015
@@ -517,9 +517,6 @@ typedef struct svn_fs_x__noderev_t
/* path at which this node first came into existence. */
const char *created_path;
- /* is this the unmodified root of a transaction? */
- svn_boolean_t is_fresh_txn_root;
-
/* Does this node itself have svn:mergeinfo? */
svn_boolean_t has_mergeinfo;
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/low_level.c Wed
Feb 4 11:34:12 2015
@@ -48,7 +48,6 @@
#define HEADER_PRED "pred"
#define HEADER_COPYFROM "copyfrom"
#define HEADER_COPYROOT "copyroot"
-#define HEADER_FRESHTXNRT "is-fresh-txn-root"
#define HEADER_MINFO_HERE "minfo-here"
#define HEADER_MINFO_CNT "minfo-cnt"
@@ -560,10 +559,6 @@ svn_fs_x__read_noderev(svn_fs_x__noderev
result_pool);
}
- /* Get whether this is a fresh txn root. */
- value = svn_hash_gets(headers, HEADER_FRESHTXNRT);
- noderev->is_fresh_txn_root = (value != NULL);
-
/* Get the mergeinfo count. */
value = svn_hash_gets(headers, HEADER_MINFO_CNT);
if (value)
@@ -691,9 +686,6 @@ svn_fs_x__write_noderev(svn_stream_t *ou
auto_escape_path(noderev->copyroot_path,
scratch_pool)));
- if (noderev->is_fresh_txn_root)
- SVN_ERR(svn_stream_puts(outfile, HEADER_FRESHTXNRT ": y\n"));
-
if (noderev->mergeinfo_count > 0)
SVN_ERR(svn_stream_printf(outfile, scratch_pool, HEADER_MINFO_CNT ": %"
APR_INT64_T_FMT "\n",
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/revprops.c Wed Feb
4 11:34:12 2015
@@ -888,6 +888,7 @@ parse_packed_revprops(svn_fs_t *fs,
apr_off_t offset;
const char *header_end;
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ svn_boolean_t cache_all = has_revprop_cache(fs, scratch_pool);
/* decompress (even if the data is only "stored", there is still a
* length header to remove) */
@@ -968,15 +969,24 @@ parse_packed_revprops(svn_fs_t *fs,
if (revision == revprops->revision)
{
+ /* Parse (and possibly cache) the one revprop list we care about. */
SVN_ERR(parse_revprop(&revprops->properties, fs, revision,
revprops->generation, &serialized,
result_pool, iterpool));
revprops->serialized_size = serialized.len;
/* If we only wanted the revprops for REVISION then we are done. */
- if (!read_all)
+ if (!read_all && !cache_all)
break;
}
+ else if (cache_all)
+ {
+ /* Parse and cache all other revprop lists. */
+ apr_hash_t *properties;
+ SVN_ERR(parse_revprop(&properties, fs, revision,
+ revprops->generation, &serialized,
+ iterpool, iterpool));
+ }
if (read_all)
{
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.c Wed
Feb 4 11:34:12 2015
@@ -758,17 +758,39 @@ purge_shared_txn(svn_fs_t *fs,
}
+svn_boolean_t
+svn_fs_x__is_fresh_txn_root(svn_fs_x__noderev_t *noderev)
+{
+ /* Is it a root node? */
+ if (noderev->noderev_id.number != SVN_FS_X__ITEM_INDEX_ROOT_NODE)
+ return FALSE;
+
+ /* ... in a transaction? */
+ if (!svn_fs_x__is_txn(noderev->noderev_id.change_set))
+ return FALSE;
+
+ /* ... with no prop change in that txn?
+ (Once we set a property, the prop rep will never become NULL again.) */
+ if (noderev->prop_rep && svn_fs_x__is_txn(noderev->prop_rep->id.change_set))
+ return FALSE;
+
+ /* ... and no sub-tree change?
+ (Once we set a text, the data rep will never become NULL again.) */
+ if (noderev->data_rep && svn_fs_x__is_txn(noderev->data_rep->id.change_set))
+ return FALSE;
+
+ /* Root node of a txn with no changes. */
+ return TRUE;
+}
+
svn_error_t *
svn_fs_x__put_node_revision(svn_fs_t *fs,
svn_fs_x__noderev_t *noderev,
- svn_boolean_t fresh_txn_root,
apr_pool_t *scratch_pool)
{
apr_file_t *noderev_file;
const svn_fs_x__id_t *id = &noderev->noderev_id;
- noderev->is_fresh_txn_root = fresh_txn_root;
-
if (! svn_fs_x__is_txn(id->change_set))
return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
_("Attempted to write to non-transaction '%s'"),
@@ -1167,7 +1189,7 @@ create_new_txn_noderev_from_rev(svn_fs_t
/* For the transaction root, the copyroot never changes. */
svn_fs_x__init_txn_root(&noderev->noderev_id, txn_id);
- return svn_fs_x__put_node_revision(fs, noderev, TRUE, scratch_pool);
+ return svn_fs_x__put_node_revision(fs, noderev, scratch_pool);
}
/* A structure used by get_and_increment_txn_key_body(). */
@@ -1650,7 +1672,7 @@ svn_fs_x__create_node(svn_fs_t *fs,
SVN_ERR(allocate_item_index(&noderev->noderev_id.number, fs, txn_id,
scratch_pool));
- SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+ SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
return SVN_NO_ERROR;
}
@@ -1746,8 +1768,7 @@ svn_fs_x__set_entry(svn_fs_t *fs,
rep->id.number = SVN_FS_X__ITEM_INDEX_UNUSED;
/* Save noderev to disk. */
- SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, FALSE,
- subpool));
+ SVN_ERR(svn_fs_x__put_node_revision(fs, parent_noderev, subpool));
}
else
{
@@ -2390,8 +2411,7 @@ rep_write_contents_close(void *baton)
apr_pool_cleanup_kill(b->local_pool, b, rep_write_cleanup);
/* Write out the new node-rev information. */
- SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, FALSE,
- b->local_pool));
+ SVN_ERR(svn_fs_x__put_node_revision(b->fs, b->noderev, b->local_pool));
if (!old_rep)
{
svn_fs_x__p2l_entry_t entry;
@@ -2478,7 +2498,7 @@ svn_fs_x__create_successor(svn_fs_t *fs,
= svn_fs_x__get_revnum(new_noderev->noderev_id.change_set);
}
- SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, FALSE, scratch_pool));
+ SVN_ERR(svn_fs_x__put_node_revision(fs, new_noderev, scratch_pool));
return SVN_NO_ERROR;
}
@@ -2513,7 +2533,7 @@ svn_fs_x__set_proplist(svn_fs_t *fs,
noderev->prop_rep->id.change_set = id->change_set;
SVN_ERR(allocate_item_index(&noderev->prop_rep->id.number, fs,
txn_id, scratch_pool));
- SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, FALSE, scratch_pool));
+ SVN_ERR(svn_fs_x__put_node_revision(fs, noderev, scratch_pool));
}
return SVN_NO_ERROR;
@@ -2983,9 +3003,6 @@ write_final_rev(svn_fs_x__id_t *new_id_p
if (noderev->prop_rep)
noderev->prop_rep->has_sha1 = FALSE;
- /* Workaround issue #4031: is-fresh-txn-root in revision files. */
- noderev->is_fresh_txn_root = FALSE;
-
/* Write out our new node-revision. */
if (at_root)
SVN_ERR(validate_root_noderev(fs, noderev, rev, scratch_pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/transaction.h Wed
Feb 4 11:34:12 2015
@@ -73,13 +73,16 @@ svn_fs_x__with_all_locks(svn_fs_t *fs,
void *baton,
apr_pool_t *scratch_pool);
+/* Return TRUE, iff NODEREV is the root node of a transaction that has not
+ seen any modifications, yet. */
+svn_boolean_t
+svn_fs_x__is_fresh_txn_root(svn_fs_x__noderev_t *noderev);
+
/* Store NODEREV as the node-revision in the transaction defined by NODEREV's
- ID within FS, after setting its is_fresh_txn_root to FRESH_TXN_ROOT. Do
- any necessary temporary allocation in SCRATCH_POOL. */
+ ID within FS. Do any necessary temporary allocation in SCRATCH_POOL. */
svn_error_t *
svn_fs_x__put_node_revision(svn_fs_t *fs,
svn_fs_x__noderev_t *noderev,
- svn_boolean_t fresh_txn_root,
apr_pool_t *scratch_pool);
/* Find the paths which were changed in transaction TXN_ID of
Modified: subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_fs_x/tree.c Wed Feb 4
11:34:12 2015
@@ -990,6 +990,10 @@ open_path(parent_path_t **parent_path_p,
svn_pool_clear(iterpool);
+ /* The NODE in PARENT_PATH always lives in POOL, i.e. it will
+ * survive the cleanup of ITERPOOL and the DAG cache.*/
+ here = parent_path->node;
+
/* Parse out the next entry from the path. */
entry = svn_fs__next_entry_name(&next, rest, pool);
@@ -1083,10 +1087,6 @@ open_path(parent_path_t **parent_path_p,
apr_psprintf(iterpool, _("Failure opening '%s'"), path));
rest = next;
-
- /* The NODE in PARENT_PATH equals CHILD but lives in POOL, i.e.
- * it will survive the cleanup of ITERPOOL.*/
- here = parent_path->node;
}
svn_pool_destroy(iterpool);
Modified: subversion/branches/pin-externals/subversion/libsvn_wc/deprecated.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/deprecated.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_wc/deprecated.c
(original)
+++ subversion/branches/pin-externals/subversion/libsvn_wc/deprecated.c Wed Feb
4 11:34:12 2015
@@ -1076,7 +1076,8 @@ svn_wc_revert4(svn_wc_context_t *wc_ctx,
depth,
use_commit_times,
changelist_filter,
- FALSE /* clear_changelists*/,
+ FALSE /* clear_changelists */,
+ FALSE /* metadata_only */,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
Modified: subversion/branches/pin-externals/subversion/libsvn_wc/revert.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/libsvn_wc/revert.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/libsvn_wc/revert.c (original)
+++ subversion/branches/pin-externals/subversion/libsvn_wc/revert.c Wed Feb 4
11:34:12 2015
@@ -246,6 +246,22 @@ revert_restore_handle_copied_dirs(svn_bo
return SVN_NO_ERROR;
}
+/* Forward definition */
+static svn_error_t *
+revert_wc_data(svn_boolean_t *run_wq,
+ svn_boolean_t *notify_required,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_wc__db_status_t status,
+ svn_node_kind_t kind,
+ svn_node_kind_t reverted_kind,
+ svn_filesize_t recorded_size,
+ apr_time_t recorded_time,
+ svn_boolean_t copied_here,
+ svn_boolean_t use_commit_times,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool);
/* Make the working tree under LOCAL_ABSPATH to depth DEPTH match the
versioned tree. This function is called after svn_wc__db_op_revert
@@ -254,56 +270,63 @@ revert_restore_handle_copied_dirs(svn_bo
REVERT_ROOT is true for explicit revert targets and FALSE for targets
reached via recursion.
+
+ Sets *RUN_WQ to TRUE when the caller should (eventually) run the workqueue.
+ (The function sets it to FALSE when it has run the WQ itself)
+
+ If INFO is NULL, LOCAL_ABSPATH doesn't exist in DB. Otherwise INFO
+ specifies the state of LOCAL_ABSPATH in DB.
*/
static svn_error_t *
-revert_restore(svn_wc__db_t *db,
+revert_restore(svn_boolean_t *run_wq,
+ svn_wc__db_t *db,
const char *local_abspath,
svn_depth_t depth,
+ svn_boolean_t metadata_only,
svn_boolean_t use_commit_times,
svn_boolean_t revert_root,
+ const struct svn_wc__db_info_t *info,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool)
{
- svn_error_t *err;
svn_wc__db_status_t status;
svn_node_kind_t kind;
- svn_node_kind_t on_disk;
svn_boolean_t notify_required;
const apr_array_header_t *conflict_files;
svn_filesize_t recorded_size;
apr_time_t recorded_time;
- apr_finfo_t finfo;
-#ifdef HAVE_SYMLINK
- svn_boolean_t special;
-#endif
svn_boolean_t copied_here;
svn_node_kind_t reverted_kind;
- svn_boolean_t is_wcroot;
-
if (cancel_func)
SVN_ERR(cancel_func(cancel_baton));
- SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath, scratch_pool));
- if (is_wcroot && !revert_root)
+ if (!revert_root)
{
- /* Issue #4162: Obstructing working copy. We can't access the working
- copy data from the parent working copy for this node by just using
- local_abspath */
+ svn_boolean_t is_wcroot;
- if (notify_func)
+ SVN_ERR(svn_wc__db_is_wcroot(&is_wcroot, db, local_abspath,
scratch_pool));
+ if (is_wcroot)
{
- svn_wc_notify_t *notify = svn_wc_create_notify(
+ /* Issue #4162: Obstructing working copy. We can't access the working
+ copy data from the parent working copy for this node by just using
+ local_abspath */
+
+ if (notify_func)
+ {
+ svn_wc_notify_t *notify =
+ svn_wc_create_notify(
local_abspath,
svn_wc_notify_update_skip_obstruction,
scratch_pool);
- notify_func(notify_baton, notify, scratch_pool);
- }
+ notify_func(notify_baton, notify, scratch_pool);
+ }
- return SVN_NO_ERROR; /* We don't revert obstructing working copies */
+ return SVN_NO_ERROR; /* We don't revert obstructing working copies */
+ }
}
SVN_ERR(svn_wc__db_revert_list_read(¬ify_required,
@@ -312,17 +335,15 @@ revert_restore(svn_wc__db_t *db,
db, local_abspath,
scratch_pool, scratch_pool));
- err = svn_wc__db_read_info(&status, &kind,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- &recorded_size, &recorded_time, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- db, local_abspath, scratch_pool, scratch_pool);
-
- if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ if (info)
+ {
+ status = info->status;
+ kind = info->kind;
+ recorded_size = info->recorded_size;
+ recorded_time = info->recorded_time;
+ }
+ else
{
- svn_error_clear(err);
-
if (!copied_here)
{
if (notify_func && notify_required)
@@ -349,9 +370,116 @@ revert_restore(svn_wc__db_t *db,
recorded_time = 0;
}
}
- else if (err)
- return svn_error_trace(err);
+ if (!metadata_only)
+ {
+ SVN_ERR(revert_wc_data(run_wq,
+ ¬ify_required,
+ db, local_abspath, status, kind,
+ reverted_kind, recorded_size, recorded_time,
+ copied_here, use_commit_times,
+ cancel_func, cancel_baton, scratch_pool));
+ }
+
+ /* We delete these marker files even though they are not strictly metadata.
+ But for users that use revert as an API with metadata_only, these are. */
+ if (conflict_files)
+ {
+ int i;
+ for (i = 0; i < conflict_files->nelts; i++)
+ {
+ SVN_ERR(remove_conflict_file(¬ify_required,
+ APR_ARRAY_IDX(conflict_files, i,
+ const char *),
+ local_abspath, scratch_pool));
+ }
+ }
+
+ if (notify_func && notify_required)
+ notify_func(notify_baton,
+ svn_wc_create_notify(local_abspath, svn_wc_notify_revert,
+ scratch_pool),
+ scratch_pool);
+
+ if (depth == svn_depth_infinity && kind == svn_node_dir)
+ {
+ apr_pool_t *iterpool = svn_pool_create(scratch_pool);
+ apr_hash_t *children, *conflicts;
+ apr_hash_index_t *hi;
+
+ SVN_ERR(revert_restore_handle_copied_dirs(NULL, db, local_abspath, FALSE,
+ cancel_func, cancel_baton,
+ iterpool));
+
+ SVN_ERR(svn_wc__db_read_children_info(&children, &conflicts,
+ db, local_abspath, FALSE,
+ scratch_pool, iterpool));
+
+ for (hi = apr_hash_first(scratch_pool, children);
+ hi;
+ hi = apr_hash_next(hi))
+ {
+ const char *child_name = apr_hash_this_key(hi);
+ const char *child_abspath;
+
+ svn_pool_clear(iterpool);
+
+ child_abspath = svn_dirent_join(local_abspath, child_name, iterpool);
+
+ SVN_ERR(revert_restore(run_wq,
+ db, child_abspath, depth, metadata_only,
+ use_commit_times, FALSE /* revert root */,
+ apr_hash_this_val(hi),
+ cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ iterpool));
+ }
+
+ /* Run the queue per directory */
+ if (*run_wq)
+ {
+ SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
+ iterpool));
+ *run_wq = FALSE;
+ }
+
+ svn_pool_destroy(iterpool);
+ }
+
+ if (notify_func && (revert_root || kind == svn_node_dir))
+ SVN_ERR(svn_wc__db_revert_list_notify(notify_func, notify_baton,
+ db, local_abspath, scratch_pool));
+
+ return SVN_NO_ERROR;
+}
+
+/* Perform the in-working copy revert of LOCAL_ABSPATH, to what is stored in
DB */
+static svn_error_t *
+revert_wc_data(svn_boolean_t *run_wq,
+ svn_boolean_t *notify_required,
+ svn_wc__db_t *db,
+ const char *local_abspath,
+ svn_wc__db_status_t status,
+ svn_node_kind_t kind,
+ svn_node_kind_t reverted_kind,
+ svn_filesize_t recorded_size,
+ apr_time_t recorded_time,
+ svn_boolean_t copied_here,
+ svn_boolean_t use_commit_times,
+ svn_cancel_func_t cancel_func,
+ void *cancel_baton,
+ apr_pool_t *scratch_pool)
+{
+ svn_error_t *err;
+ apr_finfo_t finfo;
+ svn_node_kind_t on_disk;
+#ifdef HAVE_SYMLINK
+ svn_boolean_t special;
+#endif
+
+ /* Would be nice to use svn_io_dirent2_t here, but the performance
+ improvement that provides doesn't work, because we need the read
+ only and executable bits later on, in the most likely code path */
err = svn_io_stat(&finfo, local_abspath,
APR_FINFO_TYPE | APR_FINFO_LINK
| APR_FINFO_SIZE | APR_FINFO_MTIME
@@ -477,14 +605,14 @@ revert_restore(svn_wc__db_t *db,
modified = FALSE;
}
else
+ /* Side effect: fixes recorded timestamps */
SVN_ERR(svn_wc__internal_file_modified_p(&modified,
db, local_abspath,
TRUE, scratch_pool));
if (modified)
{
- SVN_ERR(svn_io_remove_file2(local_abspath, FALSE,
- scratch_pool));
+ /* Install will replace the file */
on_disk = svn_node_none;
}
else
@@ -504,14 +632,14 @@ revert_restore(svn_wc__db_t *db,
SVN_ERR(svn_io_set_file_read_only(local_abspath,
FALSE,
scratch_pool));
- notify_required = TRUE;
+ *notify_required = TRUE;
}
else if (!needs_lock_prop && read_only)
{
SVN_ERR(svn_io_set_file_read_write(local_abspath,
FALSE,
scratch_pool));
- notify_required = TRUE;
+ *notify_required = TRUE;
}
}
@@ -532,14 +660,14 @@ revert_restore(svn_wc__db_t *db,
SVN_ERR(svn_io_set_file_executable(local_abspath,
TRUE, FALSE,
scratch_pool));
- notify_required = TRUE;
+ *notify_required = TRUE;
}
else if (!executable_prop && executable)
{
SVN_ERR(svn_io_set_file_executable(local_abspath,
FALSE, FALSE,
scratch_pool));
- notify_required = TRUE;
+ *notify_required = TRUE;
}
}
#endif
@@ -563,74 +691,16 @@ revert_restore(svn_wc__db_t *db,
{
svn_skel_t *work_item;
- /* ### Get the checksum from read_info above and pass in here? */
SVN_ERR(svn_wc__wq_build_file_install(&work_item, db, local_abspath,
NULL, use_commit_times, TRUE,
scratch_pool, scratch_pool));
SVN_ERR(svn_wc__db_wq_add(db, local_abspath, work_item,
scratch_pool));
- SVN_ERR(svn_wc__wq_run(db, local_abspath, cancel_func, cancel_baton,
- scratch_pool));
- }
- notify_required = TRUE;
- }
-
- if (conflict_files)
- {
- int i;
- for (i = 0; i < conflict_files->nelts; i++)
- {
- SVN_ERR(remove_conflict_file(¬ify_required,
- APR_ARRAY_IDX(conflict_files, i,
- const char *),
- local_abspath, scratch_pool));
+ *run_wq = TRUE;
}
+ *notify_required = TRUE;
}
- if (notify_func && notify_required)
- notify_func(notify_baton,
- svn_wc_create_notify(local_abspath, svn_wc_notify_revert,
- scratch_pool),
- scratch_pool);
-
- if (depth == svn_depth_infinity && kind == svn_node_dir)
- {
- apr_pool_t *iterpool = svn_pool_create(scratch_pool);
- const apr_array_header_t *children;
- int i;
-
- SVN_ERR(revert_restore_handle_copied_dirs(NULL, db, local_abspath, FALSE,
- cancel_func, cancel_baton,
- iterpool));
-
- SVN_ERR(svn_wc__db_read_children_of_working_node(&children, db,
- local_abspath,
- scratch_pool,
- iterpool));
- for (i = 0; i < children->nelts; ++i)
- {
- const char *child_abspath;
-
- svn_pool_clear(iterpool);
-
- child_abspath = svn_dirent_join(local_abspath,
- APR_ARRAY_IDX(children, i,
- const char *),
- iterpool);
-
- SVN_ERR(revert_restore(db, child_abspath, depth,
- use_commit_times, FALSE /* revert root */,
- cancel_func, cancel_baton,
- notify_func, notify_baton,
- iterpool));
- }
-
- svn_pool_destroy(iterpool);
- }
-
- if (notify_func)
- SVN_ERR(svn_wc__db_revert_list_notify(notify_func, notify_baton,
- db, local_abspath, scratch_pool));
return SVN_NO_ERROR;
}
@@ -641,6 +711,7 @@ revert(svn_wc__db_t *db,
svn_depth_t depth,
svn_boolean_t use_commit_times,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -648,6 +719,8 @@ revert(svn_wc__db_t *db,
apr_pool_t *scratch_pool)
{
svn_error_t *err;
+ const struct svn_wc__db_info_t *info = NULL;
+ svn_boolean_t run_queue = FALSE;
SVN_ERR_ASSERT(depth == svn_depth_empty || depth == svn_depth_infinity);
@@ -667,15 +740,37 @@ revert(svn_wc__db_t *db,
SVN_ERR(svn_wc__write_check(db, dir_abspath, scratch_pool));
}
- err = svn_wc__db_op_revert(db, local_abspath, depth, clear_changelists,
- scratch_pool, scratch_pool);
+ err = svn_error_trace(
+ svn_wc__db_op_revert(db, local_abspath, depth, clear_changelists,
+ scratch_pool, scratch_pool));
if (!err)
- err = revert_restore(db, local_abspath, depth,
- use_commit_times, TRUE /* revert root */,
- cancel_func, cancel_baton,
- notify_func, notify_baton,
- scratch_pool);
+ {
+ err = svn_error_trace(
+ svn_wc__db_read_single_info(&info, db, local_abspath, FALSE,
+ scratch_pool, scratch_pool));
+
+ if (err && err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+ {
+ svn_error_clear(err);
+ err = NULL;
+ info = NULL;
+ }
+ }
+
+ if (!err)
+ err = svn_error_trace(
+ revert_restore(&run_queue, db, local_abspath, depth,
metadata_only,
+ use_commit_times, TRUE /* revert root */,
+ info, cancel_func, cancel_baton,
+ notify_func, notify_baton,
+ scratch_pool));
+
+ if (run_queue)
+ err = svn_error_compose_create(err,
+ svn_wc__wq_run(db, local_abspath,
+ cancel_func, cancel_baton,
+ scratch_pool));
err = svn_error_compose_create(err,
svn_wc__db_revert_list_done(db,
@@ -695,6 +790,7 @@ revert_changelist(svn_wc__db_t *db,
svn_boolean_t use_commit_times,
apr_hash_t *changelist_hash,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -713,6 +809,7 @@ revert_changelist(svn_wc__db_t *db,
scratch_pool))
SVN_ERR(revert(db, local_abspath,
svn_depth_empty, use_commit_times, clear_changelists,
+ metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -747,7 +844,7 @@ revert_changelist(svn_wc__db_t *db,
SVN_ERR(revert_changelist(db, child_abspath, depth,
use_commit_times, changelist_hash,
- clear_changelists,
+ clear_changelists, metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
iterpool));
@@ -773,6 +870,7 @@ revert_partial(svn_wc__db_t *db,
svn_depth_t depth,
svn_boolean_t use_commit_times,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -793,7 +891,7 @@ revert_partial(svn_wc__db_t *db,
/* Revert the root node itself (depth=empty), then move on to the
children. */
SVN_ERR(revert(db, local_abspath, svn_depth_empty,
- use_commit_times, clear_changelists,
+ use_commit_times, clear_changelists, metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton, iterpool));
@@ -828,6 +926,7 @@ revert_partial(svn_wc__db_t *db,
/* Revert just this node (depth=empty). */
SVN_ERR(revert(db, child_abspath,
svn_depth_empty, use_commit_times, clear_changelists,
+ metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
iterpool));
@@ -846,6 +945,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
svn_boolean_t use_commit_times,
const apr_array_header_t *changelist_filter,
svn_boolean_t clear_changelists,
+ svn_boolean_t metadata_only,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@@ -862,6 +962,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
depth, use_commit_times,
changelist_hash,
clear_changelists,
+ metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -870,6 +971,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
if (depth == svn_depth_empty || depth == svn_depth_infinity)
return svn_error_trace(revert(wc_ctx->db, local_abspath,
depth, use_commit_times, clear_changelists,
+ metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
@@ -883,7 +985,7 @@ svn_wc_revert5(svn_wc_context_t *wc_ctx,
if (depth == svn_depth_files || depth == svn_depth_immediates)
return svn_error_trace(revert_partial(wc_ctx->db, local_abspath,
depth, use_commit_times,
- clear_changelists,
+ clear_changelists, metadata_only,
cancel_func, cancel_baton,
notify_func, notify_baton,
scratch_pool));
Modified: subversion/branches/pin-externals/subversion/svn/revert-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/svn/revert-cmd.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/svn/revert-cmd.c (original)
+++ subversion/branches/pin-externals/subversion/svn/revert-cmd.c Wed Feb 4
11:34:12 2015
@@ -70,6 +70,7 @@ svn_cl__revert(apr_getopt_t *os,
err = svn_client_revert3(targets, opt_state->depth,
opt_state->changelists,
FALSE /* clear_changelists */,
+ FALSE /* metadata_only */,
ctx, scratch_pool);
if (err
&& (err->apr_err == SVN_ERR_WC_INVALID_OPERATION_DEPTH)
Propchange: subversion/branches/pin-externals/subversion/tests/libsvn_subr/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Feb 4 11:34:12 2015
@@ -52,3 +52,4 @@ read_length_tmp
bit-array-test
io-test-*
sqlite-test-*
+x509-test
Modified: subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c
URL:
http://svn.apache.org/viewvc/subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c?rev=1657124&r1=1657123&r2=1657124&view=diff
==============================================================================
--- subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c
(original)
+++ subversion/branches/pin-externals/subversion/tests/libsvn_wc/utils.c Wed
Feb 4 11:34:12 2015
@@ -297,7 +297,11 @@ sbox_wc_revert(svn_test__sandbox_t *b, c
SVN_ERR(svn_wc__acquire_write_lock(&lock_root_abspath, b->wc_ctx,
dir_abspath, FALSE /* lock_anchor */,
b->pool, b->pool));
- SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth, FALSE, NULL, FALSE,
+ SVN_ERR(svn_wc_revert5(b->wc_ctx, abspath, depth,
+ FALSE /* use_commit_times */,
+ NULL /* changelist_filter */,
+ FALSE /* clear_changelists */,
+ FALSE /* metadata_only */,
NULL, NULL, /* cancel baton + func */
NULL, NULL, /* notify baton + func */
b->pool));
Propchange: subversion/branches/pin-externals/tools/dev/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Wed Feb 4 11:34:12 2015
@@ -1,3 +1,4 @@
.libs
fsfs-access-map
logdata.py
+x509-parser