| 1 | Patch from upcoming subversion 1.9.1: |
| 2 | |
| 3 | http://svn.apache.org/viewvc?view=revision&revision=1696695 |
| 4 | |
| 5 | --- ../subversion/libsvn_fs_x/fs_id.c 2015/08/20 01:01:06 1696694 |
| 6 | +++ ./subversion/libsvn_fs_x/fs_id.c 2015/08/20 01:10:22 1696695 |
| 7 | @@ -85,6 +85,13 @@ |
| 8 | is not.*/ |
| 9 | const char *fs_path; |
| 10 | |
| 11 | + /* If FS is NULL, this points to svn_fs_open() as passed to the library. */ |
| 12 | + svn_error_t *(*svn_fs_open_)(svn_fs_t **, |
| 13 | + const char *, |
| 14 | + apr_hash_t *, |
| 15 | + apr_pool_t *, |
| 16 | + apr_pool_t *); |
| 17 | + |
| 18 | /* Pool that this context struct got allocated in. */ |
| 19 | apr_pool_t *owner; |
| 20 | |
| 21 | @@ -118,11 +125,14 @@ |
| 22 | fs_cleanup(void *baton) |
| 23 | { |
| 24 | svn_fs_x__id_context_t *context = baton; |
| 25 | + svn_fs_x__data_t *ffd = context->fs->fsap_data; |
| 26 | |
| 27 | /* Remember the FS_PATH to potentially reopen and mark the FS as n/a. */ |
| 28 | context->fs_path = apr_pstrdup(context->owner, context->fs->path); |
| 29 | + context->svn_fs_open_ = ffd->svn_fs_open_; |
| 30 | context->fs = NULL; |
| 31 | |
| 32 | + |
| 33 | /* No need for further notifications because from now on, everything is |
| 34 | allocated in OWNER. */ |
| 35 | apr_pool_cleanup_kill(context->owner, context, owner_cleanup); |
| 36 | @@ -137,8 +147,12 @@ |
| 37 | { |
| 38 | if (!context->fs) |
| 39 | { |
| 40 | - svn_error_t *err = svn_fs_open2(&context->fs, context->fs_path, NULL, |
| 41 | - context->owner, context->owner); |
| 42 | + svn_error_t *err; |
| 43 | + |
| 44 | + SVN_ERR_ASSERT_NO_RETURN(context->svn_fs_open_); |
| 45 | + |
| 46 | + err = context->svn_fs_open_(&context->fs, context->fs_path, NULL, |
| 47 | + context->owner, context->owner); |
| 48 | if (err) |
| 49 | { |
| 50 | svn_error_clear(err); |