Update from svn-1.8.14 to 1.9.2.

Formal release notes are available:
  https://subversion.apache.org/docs/release-notes/1.9.html

Of particular note, the client checkout format has *not* changed so
upgrades should *not* be required.

When reading a repository (file:// or running as a local server), an
improved fsfs version 7 is available with significant performance
improvements.  An optional upgrade is possible to use the new features.
Without the upgrade, this is fully read/write compatible with the
version 6 fsfs as in svn-1.8.

Relnotes:	yes
This commit is contained in:
Peter Wemm 2015-10-12 09:53:55 +00:00
commit af80ed6add
583 changed files with 152567 additions and 48584 deletions

View File

@ -0,0 +1,88 @@
# Configuration file for YouCompleteMe vim plugin to allow the plugin
# to determine the compile flags. This file is based on:
# https://github.com/Valloric/YouCompleteMe/blob/master/cpp/ycm/.ycm_extra_conf.py
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
# of the public at large and to the detriment of our heirs and
# successors. We intend this dedication to be an overt act of
# relinquishment in perpetuity of all present and future rights to this
# software under copyright law.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
# IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# For more information, please refer to <http://unlicense.org/>
import os
import ycm_core
from clang_helpers import PrepareClangFlags
compilation_database_folder = os.path.dirname(os.path.realpath(__file__))
if compilation_database_folder:
database = ycm_core.CompilationDatabase( compilation_database_folder )
else:
database = None
def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
if not working_directory:
return flags
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
if flag == path_flag:
make_next_absolute = True
break
if flag.startswith( path_flag ):
path = flag[ len( path_flag ): ]
new_flag = path_flag + os.path.join( working_directory, path )
break
if new_flag:
new_flags.append( new_flag )
return new_flags
def FlagsForFile( filename ):
if database:
# Bear in mind that compilation_info.compiler_flags_ does NOT return a
# python list, but a "list-like" StringVec object
compilation_info = database.GetCompilationInfoForFile( filename )
final_flags = PrepareClangFlags(
MakeRelativePathsInFlagsAbsolute(
compilation_info.compiler_flags_,
compilation_info.compiler_working_dir_ ),
filename )
do_cache = True
else:
final_flags = [ ]
do_cache = False
return {
'flags': final_flags,
'do_cache': do_cache
}

View File

@ -1,3 +1,799 @@
Version 1.9.2
(30 Sep 2015, from /branches/1.9.x)
http://svn.apache.org/repos/asf/subversion/tags/1.9.2
User-visible changes:
- Client-side bugfixes:
* svn: fix crash when saving credentials in kwallet (r1700740, r1700951)
* checkout/update: fix "access denied" error on Windows (r1701064 et al)
* update: fix crash when updating a conflicted tree (r1702198, r1702200)
* commit: fix possible crash (r1702231)
* ra_serf: do not crash on unexpected 'X-SVN-VR-Base' headers (r1702288)
* merge: fix crash when merging to a local add (r1702299 et al)
* svnmucc: fix error during propset+put for existing file (r1702467 et al)
* update: fix crash without .svn/tmp folder (r1701838, r1702203)
* checkout: remove unnecessary I/O operation (r1701638)
* merge: fix possible crash (r1701997)
* update: fix crash with some of the incoming deletes (r1702247)
* upgrade: fix crash for pre-1.3 wc with externals (r1702218 et al)
* revert: fix crash when reverting the root of a move (r1702237 et al)
* svn: do not crash upon specific database corruptions (r1702974, r1702991)
* svn: show utf8proc version in svn --version --verbose (r1702533, r1702891)
- Server-side bugfixes:
* fix reporting for empty representations in svnfsfs stats (r1698312 et al)
Developer-visible changes:
- General:
* fix svnfsfs_tests.py in fsfs-v4 and fsfs-v6 modes (r1700215 et al)
- API changes:
* disable unsupported operations for standard streams (r1701633 et al)
Version 1.9.1
(02 Sep 2015, from /branches/1.9.x)
http://svn.apache.org/repos/asf/subversion/tags/1.9.1
User-visible changes:
- Client-side bugfixes:
* Fix crash with GPG-agent with non-canonical $HOME (r1691928, issue #4584)
* Fix checkout errors with svn+ssh:// on Windows (r1696222, r1696225)
* svn: expose expat and zlib versions in svn --version --verbose (r1696387, r1697664)
* svn: improve help text for 'svn info --show-item' (r1698106)
- Server-side bugfixes:
* svnserve: fixed minor typo in help text (r1694023)
* Enable caching with memcached on Windows (1674626, r1674785)
* Fix an error leak in FSFS verification (r1693886)
* Fix incomplete membuffer cache initialization (r1695022)
* svnfsfs: fix some bugs and inconsistencies in load-index (r1697381 et al.)
- Client-side and server-side bugfixes:
* Fix alignment fault in ra_svn on 32 bit SPARC machines (r1697914)
- Bindings bugfixes:
* Fix memory corruption in copy source SWIG bindings (r1694929)
Developer-visible changes:
* Better configure-time detection of httpd version and authz fix (r1687304 et al.)
* Correct a parameter name in svn_repos_get_fs_build_parser5 (r1694194)
* Resolve circular library reference in libsvn_fs_x (r1696695)
* Fix Unix build on systems without GPG agent (r1694481, r1697824)
Version 1.9.0
(5 Aug 2015, from /branches/1.9.x)
http://svn.apache.org/repos/asf/subversion/tags/1.9.0
User-visible changes:
- General:
* make all commands provide brief description in help output (r1522518)
* flush stdout before exiting to avoid information being lost (r1543868)
- Major new features:
* fsfs: new format 7 with more efficient on-disk layout (r1547045 et al)
* blame: support showing prospective as well as previous changes
* info: support printing of individual values with --show-item (r1662620)
* svn auth: new subcommand to manage cached credentials and certs
* svnserve: cache config and authz to lower resource usage and be able to
serve large numbers of connections with a limited number of threads
* membuffer: quadruple the maximum cacheable directory size (r1545948 et al)
* new filesystem fsx (faster, smaller); experimental - see release notes
- Minor new features and improvements:
* new 'diff-ignore-content-type' runtime configuration option
* new option for 'svnadmin verify': --check-normalization
* new option for 'svnadmin verify': --keep-going
* svnadmin info: new subcommand to print info about a repository
* print summary of conflicts before/after interactive conflict resolution
* import: reduce number of connections to the server needed (r1482962)
* membuffer: rework cache eviction heuristics (r1476664 et at)
* membuffer: improved cache usage statistics (r1489883)
* mergeinfo: new '--log' option (r1492168)
* svnadmin upgrade: progress and cancellation support (r1495545, r1495566)
* cleanup: add '--remove-unversioned' and '--remove-ignored' (issue #3549)
* cleanup: add '--include-externals' option (issue #2325)
* cleanup: add '--quiet' option (r1498661)
* svnadmin load: speedup by setting revprops in one call (r1504079)
* svnadmin load: set svn:date revprop in the initial commit (r1504951)
* reimplement UTF-8 fuzzy conversion using utf8proc (r1511676)
* svnadmin verify: speed up for repos with large directories (r1520419)
* svn merge: interactive conflict resolver tries external tools (r1524145)
* minor speed up in string to time conversion (r1533387)
* windows: speed up console output (r1533994)
* update: optimize wc db usage when obtaining children (r1537065 et al)
* decreased overhead for case-sensitive configuration access (r1538068)
* avoid re-opening repo for in-repo authz if already open (r1538120)
* svnserve: output errors in a more standard way (r1544250)
* faster parsing of config file comments (r1544716)
* avoid trying to open the hooks-env file when it doesn't exist (r1544721)
* svnserve: provide the same logging detail in "run once" mode as provided
in the log file (r1544731)
* svnserve: reduce connection latency (r1544732)
* wc: reduce the number of locks and transactions required (r1545127 et al)
* cat: add '--ignore-keywords' option (r1547517)
* merge and mergeinfo: use fewer RA sessions (r1552265)
* fsfs: limit delta chains from crossing too many shards (r1554942)
* fsfs: option to configure compression level in deltas (r1559748)
* fsfs: enable dir and prop deltas by default for formats that support
it (r1555286)
* fsfs: avoid out of date errors from files in a directory changing when
you change a property on the directory (r1558224)
* fsfs: temporary transaction properties are preserved when commit is
interrupted (r1549907 et al)
* fsfs: speed up transaction creation (r1544719)
* fsfs: avoid trying to open lock digest files that don't exist (r1544721)
* fsfs: reduce internal overhead by using sorted array instead of hash for
directory representation (r1554711)
* fsfs: skip decoding txdelta windows that are already cached (r1555284)
* fsfs: avoid constructing fulltext when delta we need is stored (r1555297)
* fsfs: improvements to format 6 reading/writing (r1517479)
* fsfs: reduce overhead of parsing noderev structures (r1544717)
* fsfs: speed up node relation comparison (r1554807)
* fsfs: speed up critical open_path() call (r1483301 et al)
* fsfs: speed up node verification (r1520421 et al)
* fsfs: speed up serialization into cache buffer format (r1505056)
* fsfs: avoid caching intermediate fulltexts (r1565100)
* fsfs: reduce lock contention on txn-list-lock (r1569549)
* svnadmin: don't display warnings as errors (r1556297)
* ra_serf: avoid caching properties in the update editor (r1557538)
* ra_serf: decrease latency of requests to get directory contents by
pipelining requests, speeds up 'svn ls --include externals' and
some cases of multi-url diff, including merge (r1557548)
* ra_serf: spool small update reports in memory to avoid making temp files
for small requests (r1557599)
* ra_serf: allow the reuse of serf connections after an error (r1553341)
* ra_serf: improve many error messages (r1551910 et al)
* ra_serf: pipeline lock/unlock requests (r1551918, r1551993, r1552008)
* ra_serf: pipeline requests for inherited properties against old servers
that don't support the faster REPORT (r1552455, r1552475)
* ra_serf: allow reuse of sessions after a canceled request (r1557686)
* ra_serf: reduce memory usage when retrieving revision props (r1557689)
* mod_dav_svn: make out of date error message consistent with generic repos
logic (r1558247)
* allow SQLite to optimize functions that are deterministic (r1559352)
* speed up delta calculations on non-deltifyable sections (r1559767)
* ra_serf: improve memory usage in commit processing (r1520028)
* report progress as cumulative across all sessions (issue #3260)
* ra_serf: don't send DAV headers with GET requests (r1517472)
* mod_dav_svn: SVNCacheTextDeltas defaults to on (r1517479)
* fs: improve scalability of fs_open and similar functions (r1523450 et al)
* svnserve: improve performance and scalability (r1523465 et al)
* svnadmin verify: output progress messages to stdout (r1471095)
* svnadmin crashtest: make output less misleading (r1486046)
* mod_dav_svn: discover copy to src earlier in some cases (r1537440)
* speed up mergeinfo parsing (r1483292, r1483309 et al)
* optimize hash lookups used in mergeinfo and caching (r1483434 et al)
* log: optimize string handling in repos layer (r1483570, r1483572)
* ask disk hardware to sync instead of only syncing to hardware buffers
when OS supports it (r1484439, r1484445)
* optimize diff code to avoid unneeded comparisons (r1485488)
* optimize check if relpaths are canonical (r1485496, r1489828)
* ra_svn: reduce protocol implementation overhead (r1485499, r1485504 et al)
* optimize file translation without keyword substitution (r1486058)
* optimize config file parsing by using unbuffered I/O (r1486897)
* patch: apply ignore settings when deciding to delete dirs (r1490378)
* use a cheaper RA operation for common client calculation (r1496468 et al)
* ra_svn: avoid unnecessary work when doing a blame (r1503046)
* optimize reading files into memory if size is known (r1505068)
* copy: do not error on properties when doing a foreign copy (r1563361)
* membuffer: reduce memory usage by using shorter lived pools (r1564217)
* svnadmin load: add '--ignore-dates' option (r1564789)
* update: reduce sessions used with '--parents' option (r1565920)
* diff: report properties on deleted nodes (r1569320, r1570055)
* diff: switch to diff processor APIs instead of old style callbacks, step
towards resolving long standing bugs and feature requests (r1569551 et al)
* diff: use the proper revision in headers for addition and deletion
of files (r1570053)
* svnadmin lslocks: add cancellation (r1571992)
* svn --version: list available authentication credential caches (r1572106)
* fs: improved detection of changes between two nodes, this should reduce
the number of out of date errors clients see (r1572336)
* allow the use of libmagic to be configured via subversion configuration
file or SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE env variable (r1572916)
* new '--pin-externals' option for svn copy (issue #1258)
* the '--strict' option was renamed '--no-newline' (r1662224)
* merge/update: switch to three-way text conflict markers
(r1591951, r1595522)
* patch: handle renames in git formatted patches (r1594636)
* svnfsfs: new expert tool (r1594860)
* mod_dav_svn: allow server admin to GET the FSFS global cache stats
(r1595160)
* diff: support git-like binary file diffs with '--git' (r1599552)
* diff: support arbitrary context size for internal diff tool with
'-U' option (r1603847, 1603871)
* commit: print progress notification between client finishing
transmitting text deltas and asking server to commit (r1604179)
* fsfs: optimize log commands for repos on Windows by not
using a locale specific function to parse ids (r1605123)
* fsfs: reduce memory usage of reading/writing changed paths caches
(r1605188 et al)
* mod_dav_svn: log post-commit errors to httpd error log as well
as returning them to client (r1606004)
* make server config groups work with svn:// URLs (issue #4512)
* svnadmin hotcopy: report progress when copying revisions and packed
shards for FSFS repositories (r1613339)
* info: show revisions for missing tree conflicts (r1617932)
* fsfs: avoid shared data clashes due to multiple distinct repositories
having identical UUIDs (r1618138 et al)
* status: ignore thumbs.db files by default (r1620955)
* fsfs: harden parsers against data corruption (r1622931, r1622937,
r1622942)
* diff: respect svn:keywords and svn:eol-style when doing arbitrary
diffs (r1623820)
* ra_serf: reduce size of XML generated for reports (r1627333)
* replace generic --trust-server-cert with more specific options to
override specific certificate failures (r1630117 et al)
* commit: improve speed of commits with many files (r1630312 et al)
* svnadmin setrevprop: add '--transaction' option (r1631435)
* svnadmin delrevprop: new subcommand (1592723)
* svnadmin verify: validate the index data against checksums (r1631598)
* svnadmin verify: new option '--metadata-only' (r1593753)
* cp: improve performance of local copies (r1632284, et al)
* fsfs: speed up operations that use revision properties (r1634875,
r1634879)
* checkout/update: use fewer RA sessions (r1635753 et al)
* log: do less work when '--with-no-revprops' is used (r1642231)
* patch: improve command to be more capable as compared to GNU patch
(issue #4533)
* limit server caches to avoid running out of memory if server admin
configured caches larger than supported by the platform (r1645572)
* mod_authz_svn: log implicit read access failures with INFO log level;
Explicit read access failures are still logged with ERROR log level
(r1653032)
* ra_serf: reduce memory usage by removing some extra intermediary state
(r1654681, r1654690)
* revert: improve performance on large working copies without changes
(r1657083)
* ra_svn: improve efficiency of editor processing (r1658194 et al)
* merge: provide different conflict reasons for local additions and
unversioned obstructions (r1659381)
* windows: improve checkout performance on windows by using sqlite truncate
journal mode rather than delete (r1659426)
* status: now accept '-r' argument (r1671164, 1672578, 1673228)
* ls: improve performance of '-v' on tag directories (r1673153)
* resolve: improve conflict prompts for binary files (r1667228 et al)
* fsfs: improve error messages for parsing errors (r1678147, r1678149)
* warn when the '--config-option' FILE:SECTION:OPTION combination may
be invalid. (r1674301 et al)
* ensure full key matching in membuffer cache (r1678950 et al)
* mod_dav_svn: expose cache statistics via HTTP (r1595160)
- Client-side bugfixes:
* export: fix problem exporting symlinks on windows (r1476093)
* fix non-ascii character handling of command line options (r1476461)
* log: strip EOL marker only after converting to UTF-8 (r1476608)
* ra_serf: avoid dropping errors when making a lock request (r1489526)
* ra_serf: fix an error leak in update logic (r1499686)
* windows: fix issues with wcs in symlinked folders (r1501251)
* fix regression that broke parallel nested checkouts (issue #4390)
* svnmucc: ignore leading r in revision number arguments to -r (r1502636)
* mkdir: use absolute paths to avoid Windows path length limits (r1516816)
* avoid encoding support code when C runtime doesn't support it (r1530582)
* ra_svn: add check against dirents with path separators (r1533812)
* properly delete temporary files when atomic write fails (r1537466)
* wc: fix corner cases in move-update tree conflicts (r1538639 et al)
* windows: fix crash report indentation for x64 reports (r1543589)
* mergeinfo: allow to work on a moved target (issue #4301)
* windows: avoid delay when no homedir is available (r1546814)
* status: report externals in a deterministic way (r1550200)
* copy: avoid an unneeded extra RA session for wc to repo case (r1551564)
* ra_serf: show pre-revprop-change failure on revprop delete (issue #3086)
* svnsync: avoid extra request at end of every revision sync (r1553370)
* ra_serf: fix replace + propset of locked file failures (issue #3674)
* ra_serf: prevent overwriting directory during copy (issue #3314)
* commit: limit number of temporary files open at same time (issue #4172)
* ra_serf: verify incoming integers are really integers (r1557709 et al)
* log: -g --xml doesn't differentiate between forward and reverse merges
(issue #4463)
* windows: improve update and checkout speed (issue #4450)
* log: reduce performance penalties of using -g (r1559912)
* blame: reduce performance penalties of using -g (r1560112)
* ra_local: set svn:txn-user-agent for consistency (r1498608)
* ra_svn: use the stream API properly for communications (r1562072)
* update: provide error when none of targets are wcs (r1565388)
* wc: reduce dependence on unspecified SQLite behavior (r1567080 et al)
* diff: fix diffing directory without permissions to read parent (r1569265,
r1569290)
* diff: improve resolving peg revisions (r1570205 et al)
* diff: fix bug in calculating header paths (r1570584)
* ra_serf: add SSL certificate issuers common name to output (r1573728)
* updates keywords in files not modified during 'svn switch' (issue #1975)
* svnmucc: Normalize line endings with '-F' and '-m' options
(r1592148, r1592150)
* fix problems with read-only authentication caches (issue #4504)
* commit: don't bump just locked files (r1603617)
* log: reduce memory with '-v' (r1604569 et al)
* diff: fix diffing locally deleted nodes under copied directories
(r1605832)
* diff: fix missing node error when diffing a replaced node (r1605866)
* propget: forbid using 'show-inherited-properties' with 'strict' (r1611698)
* windows: avoid delay when user profile isn't writable (r1617926)
* merge: display the correct node kinds for tree conflicts (r1618024,
r1619418, r1619717)
* diff: show the correct revisions in the header (r1619452)
* diff: fix missing header for files with only property changes (r1619476)
* update: raise a tree conflict rather than an obstruction when an
incoming server-excluded node conflicts with a locally added node
(r1619495)
* update: improve tree conflict reason and action descriptions (r1619777)
* ra_serf: fix stalls during checkout/update over http/https (r1621596)
* svnmucc: don't crash when '--version' is used with other arguments
(r1625496)
* checkout: report svn:externals failures via the exit code as other
commands already do (r1628398)
* svn & svnlook: use the right error code when fputs() fails (r1630369)
* export: reject peg specifiers on local destination path (r1635085)
* don't reject command-line arguments in the form of ".@abc", where
"abc" is a peg specifier that may be empty (r1635118)
* fix directory externals not following history (issue #4529)
* remove 'df' and 'm' options from the interactive conflict resolver for
binary files (r1645578)
* mergeinfo parsing: allow source path to be empty (issue #4537)
* mkdir: when using '--parents' don't add entire contents recursively if
target already exists (r1649951)
* resolve errors with move of a nested delete (r1651980, r1651997)
* update: prevent breaking a working copy when a directory is replaced
with an external to a foreign repository (issue #4550)
* update: prevent an invalid wc state when applying a move (r1652184 et al)
* resolve: fix a segfault when breaking a move inside a delete (issue #4491)
* ra_serf: don't handle a commit that didn't produce a new revision as
a successful commit (r1653532)
* export: fix the lack of notifications when starting to handle externals
(issue #4527)
* update: fix a case where we reported an error rather than a tree conflict
(r1655017)
* info: Use local platform style paths in all cases (r1659283)
* handle lack of a configuration file properly (r1660369)
* update: resolve issues with tree conflicts caused by an incoming
delete removing a mixed revision tree (r1660742)
* don't hold onto locks of deleted paths in the client on commit (r1661363)
* info: fix url calculation for a few statuses (r1661476)
* update: when using '--set-depth' avoid removing local changes (r1661585)
* update: fix tree conflict detection on unversioned nodes that exist where
there used to be a deleted node (r1661664)
* status: display tree conflicts even if the node with the tree conflict is
shadowed by a file (r1662331)
* pre-1.6 wc compatibility: fix with obstructed working copies (r1662412)
* resolve: allow directly resolving tree conflicts (r1658435)
* copy: when copying from a wc to a url show all the changes (r1655729)
* info: provide results in a stable order (r1662030)
* revert: allow depth limited reverts of nodes that only have not-present
and/or excluded child nodes (r1662091)
* wc: fix calculating repo path after commits of nodes that shadow a
switched (not-present) node (r1663991, r1666258, r1674032)
* update: resolve assertion on bad update report involving incomplete
status (r1663671, r1666832)
* update: allow a real file to replace a file external (r1664035)
* merge: raise a tree conflict on root of obstructing dir (r1666690)
* cp: fix 'svn cp ^/A/D/H@1 ^/A' to properly create A (r1674455, r1674456)
* status: fix incorrect output with file externals (issue #4580)
* merge: fix part of issue #4582 (r1686175, r1687029, r1688258)
- Server-side bugfixes:
* svnserve: don't ignore socket initialization errors (r1544253)
* svnserve: don't hide fatal errors in inetd and tunnel modes (r1544256)
* fsfs: log repo path in local style for cache init failure (r1494314)
* fsfs: fix potential transaction corruption (r1519624)
* svnserve: fix logging in multi-threaded servers (r1523502)
* fsfs: don't report out of date errors due to FS corruption (r1527084)
* svnadmin verify: detect inconsistencies that prevent loading (r1536854)
* mod_dav_svn: use 404 status for errors caused by invalid URIs (r1542063)
* mod_dav_svn: use 404 when the repository doesn't exist (r1544259)
* mod_dav_svn: use 'dav_svn:' prefix for filename instead of 'svn:'
(r1544711)
* mod_dav_svn: XML escape lock tokens (r1547427)
* hotcopy: don't create config files when copying pre-1.5 repos (r1547454)
* hotcopy: preserve the rep-cache.db permissions when hotcopying (r1547877)
* mod_dav_svn: fix SVNCacheTextDeltas and SVNAdvertisV2Protocol directive
merging (r1548124)
* mod_dav_svn: always produce an error text even when text specifies
the default message to make diagnosing issues easier (r1553441)
* mod_dav_svn: fix some pool lifetime issues with error messages (r1553868)
* mod_dav_svn: avoid setting option headers multiple times (r1557103)
* fsfs: prevent some commits that could cause future corruption (r1560673)
* cache: fix premature eviction due to 64-bit underflows (r1567996 et al)
* svnserve: fix potential integer overflow in Cyrus SASL support (r1570434)
* bdb: fix potential integer overflow and underflow (r1570701)
* bdb: prevent silent propogation of some corruption (r1570778)
* svnadmin hotcopy: do not corrupt db/current contents when copying old
FSFS repos (r1603485)
* svnadmin hotcopy: don't produce broken copies when a concurrent pack
happens (r1605633)
* log: reduce memory consumption of '-v' (r1605195)
* mod_dav_svn: fix performance issue on Windows with named atomics
(r1611379)
* log: fix a segfault in handling changed paths (r1615364)
* mod_dav_svn: properly forward post-lock/post-unlock failures (r1622235)
* diff: fix handling of depth empty in added directories (r1622024)
* fix a segfault with corrupted changed path lists that try to add root
nodes (r1622944)
* svnadmin verify: report errors nicely rather than possibly aborting
(r1622955)
* svnlook propget: report transaction name rather than revision number in
errors if run with '-t' option (r1623317)
* svnadmin verify: prevent stack overflow conditions in corrupted
repositories (r1623398)
* fsfs upgrade: fix an issue that could block an upgraded format 1 or 2
repository from being committed to (r1624011)
* fs backends: fix memory lifetime issue (r1632646)
* bdb: output correct checksum in error message about corruption (r1640707)
* fsfs: fix a pool lifetime error related to transaction local caches
(r1643139, 1643233)
* fsfs: avoid "random DAG walks" during checkout over ra_serf (r1645567)
* fsfs/bdb: reduce memory use during tree deletions (r1647820, r1655022)
* mod_authz_svn: fix unbounded memory use when SVNPathAuthz short_circuit
is used (r1647887)
* fsfs: reduce memory use when walking back in history (r1648230)
* dump: remove incorrect kind header on replaced nodes (issue #4553)
* dump: remove duplicate headers for replace-with-copy (issue #4552)
* mod_dav_svn: don't send XML-unsafe characters in svn:author
(issue #4415)
* dump: don't write broken dump files in some ambiguously encoded fsfs
repositories (issue #4554)
* mod_dav_svn: provide a more intuitive error message to the client when
trying to create a directory that already exists (issue #2295)
* fsfs: fix uninitialized memory use in lock/unlock code (r1657525)
* fix a segfault executing a pre-commit hook with legacy locks (r1657893)
* mod_dav_svn: do not ignore skel parsing errors (r1658168)
* fsfs: fix multiple reporting of the same lock (r1658482)
* fsfs: fix pool lifetime issue in lock handling (r1659314)
* mod_dav_svn: properly log assertions and malfuctions (r1660480)
* svnadmin load/dump: preserve deletion of svn:date from r0 (issue #4563)
* svnrdump: don't provide HEAD+1 as base revision when loading deletes
(r1664684)
* mod_dav_svn: improve error message sent with a 405 status code
(r1665195, r1666096, r1666379)
* make detection of invalid base revision on commit behave the same on
all RA layers (r1664664, r1664672, r1664674)
* mod_dav_svn: emit the first few log items as soon as they are available
(r1666965, r1667120)
* mod_dav_svn: prevent a tree walk on copy sources (issue #4351)
* fsfs: fix 'EOF found' error when reading repo (issue #4577)
* svnadmin freeze: unlock rep-cache.db as part of unfreezing
(r1679169, r1679287)
* fsfs: improve stability in the presence of power or network
disk failures during 'svnadmin pack' (r1683378)
* detect invalid svndiff data earlier (r1684077)
- Client-side and server-side bugfixes:
* use less memory when retrieving extension from filename (r1548480)
* use more optimal code path with old txdelta v1 data (r1485480)
* windows: allow opening SQLite databases on long paths (r1564338)
* fix an out-of-bounds read in the delta combiner (r1569415)
* fix a number of cases of undefined behavior when passing invalid
arguments to memcpy() (r1632530, et al)
* windows: avoid a 12 second delay due to a retry loop in some error
conditions when opening a file (r1657583)
- Other tool improvements and bugfixes:
* windows: add build-svn-deps-win.pl tool to build dependencies (r1467715)
* svnpubsub: add support for revprop changes (r1486463)
* svnpubsub: do not pass svn commands through shell (r148466, r1486467)
* svnpubsub: hooks exit with an error if they fail (r1486500, r1486597)
* svnpubsub: hooks use "--" to signal end of arguments (r1486513)
* mailer: properly encode mail headers per RFC2047 (r1487532)
* svnwcsub: add a pre-update hook, which can deny update (r1494542 et al)
* fsfs-stats: count file nodes that are added without history (r1519283)
* fsfs-stats: replaced by 'svnfsfs stats' (r1594860)
* fsfs-access-map: count empty reads and unnecessary seeks (r1523441)
* fsfs-access-map: generate scaled/rectangular heatmaps (r1505065)
* fsfs-access-map: deal with strace format issues (r1505065)
* fsfs-access-map: update to know about index files (r1505065)
* svnbench: renamed from svn-bench (r1659226)
* svnbench: add null-info command (r1532196)
* svnlook.py: made usable as a library by adding getter methods (r1541558)
* svnbench, svnraisetreeconflict, svnauthz, svn-rep-sharing-stats: More
consistent error reporting, following pattern of core command-line
programs (r1544194)
* which-error.py: allow which-error.py to be run from symlink (r1547977)
* bash_completion: add svnlook filesize command and options to svn cat,
info, and mergeinfo commands (r1569021)
* new '--conflict-style' option to standalone diff3 tool (r1591750)
* update standalone diff3 tool so it can be used with --diff-cmd
directly (r1591871, r1591876)
* bash_completion: support for auth command (r1596841)
* diff: support '-U' option (r1618618)
* svn-rep-sharing-stats: replaced by 'svnfsfs stats' (r1618861)
* add svn-vendor.py as an alternative to svn_load_dirs.pl that can
auto-detect renames and copies (r1623660)
* svnpredumpfilter.py: fix a scalability problem that made run time
increase greatly on large repositories (r1625674 et al)
* svnpredumpfilter.py: detect copies of copies and handle properly
(r1626182)
* bash_completion: add svnadmin delrevprop (r1631473)
* showchange.pl: removed, obsoleted by 'svn log --diff' (r1631686)
* bash_completion: add new trust options (r1660373)
* bash_completion: add '--pin-externals' (r1662250)
* bash_completion: stop offering deprecated options (r1662291)
* bash_completion: add '--show-item' and '--no-newline' (r1662622)
* svnbench: add null-blame command (r1673785, r1673803, r1674015)
* svnbench: install with default 'make install' (r1685085)
Developer-visible changes:
- General:
* require Python 2.7+ for development and testing (r1691712, r1691713, r1692448)
* include symbolic names for error codes in maintainer mode (r1467643)
* include symbolic names for warning codes in maintainer mode (r1469855)
* support YouCompleteMe vim plugin (r1476374 et al)
* cache: add pretend_empty mode for maintainers (r1461689, et al)
* allow tests to be run with exclusive wc locks (r1496475)
* fix check for Microsoft C/C++ compiler (r1503148)
* improve windows build to use pre-built dependencies
* optimize ramdrive usage in the windows test runner (r1504511)
* SVN_CMDLINE_DISABLE_CRASH_HANDLER env var added for Windows (r1506507)
* gen-make.py: support Visual Studio 2013 by --vsnet-version=2013 (r1533907)
* windows: don't require APR source when building (r1534037, et al)
* don't compile SQLite amalgamation twice (r1536364)
* make C tests use same temp path as Python tests (r1536700)
* davautocheck: access log logs the r->filename now (r1538048)
* added test to detect duplicate SQL queries (r1538962)
* windows test runner: copy additional apr dlls (r1539300)
* support for debug logging that should be available in serf 1.4.0 (r1541561)
* OS X: fix build when Gnome is installed (r1541698)
* properly detect if expat is libexpat.lib or xml.lib on windows (r1541981)
* doc-clean target works properly with separate build dir (r1542303)
* don't break entire test run if cleaning temp directory failed but return
an error anyway (r1542817)
* windows tests: find java.exe via the sdk if not found via PATH (r1543876)
* fix davautocheck with httpd 2.3.x+ and worker/prefork MPMs (r1544302-3)
* add parallel mode for C tests (r1545334 et al)
* use --bin path for svnrdump when running Python tests (r1548706)
* remove unused --with-openssl option from configure (r1548714)
* tests: stop rewriting shared authz file for every sandbox (r1552064 et al)
* fix unnecessary aborts in maintainer mode on sqlite errors (r1536325)
* new --sqlite-logging option for C tests (r1560409)
* allow building with APR-2 (r1560586)
* remove support for ASM Zlib from Windows build system (r1560864)
* gen-make.py: new -D option (r1567046)
* improve how we fetch the version of Windows (r1568798, 1568806)
* move common code in python tests to library files to avoid side effects of
having tests depending on each other (r1570654)
* disable compiling on platforms where int is shorter than 32-bits and add
the SVN_ALLOW_SHORT_INTS compile definition to override (r1570882)
* disable building *.sbr files with Visual C++ 2010 or later (r1571020)
* require serf 1.3.4 (r1572261)
* require APR and APR-Util 1.3.x (r1572261)
* add mod_dontdothat to davautocheck.sh (r1572312)
* require Apache httpd 2.2.x (r1572339)
* support pkg-config for serf when using a prefix (r1572762)
* don't depend on stdbool.h and inttypes.h for utf8proc (r1573069 et al)
* avoid non-portable find extensions so the build works on Solaris (r1573780)
* Allow PARALLEL value to specify the number of threads to run tests with,
PARALLEL=1 means to use the default (r1573320)
* pkg-config support for libsvn_* libraries (issue #4435)
* binaries built on Mac OS X 10.6+ will not run on older versions (r1651549)
* fix random failure of Makefile-based parallel builds on Unix
when the amalgamated SQLite is being used (r1658357)
* C tests only run with ra_local to avoid duplicate testing (r1609477)
* allow skipping the C tests for any RA method (r1609489)
* new tools for benchmarking on Windows (r1610264)
* svnbench: no longer part of tools but main subversion (r1618860)
* improve detection for libtool (r1627276)
* check the runtime version of the fs_util library in the fs backends
(r1651567)
* properly initialize the src_kind value to avoid problems for other API
users during a copy (r1655723)
* try to improve reliability of applications that do not call
svn_dso_initialize2() right after apr_initialize() (r1659604)
* add svn-wc-db-tester tool for testing working copies (r1660874)
* fix bugs and performance issues using svn_wc_walk_entries3() (r1661110)
* support using Python 3 for building (r1661247)
* don't add -lstdc++ on FreeBSD 10 (r1662329)
* add build support for Visual Studio 2015 (r1663183, r1663184, r1689721 et al.)
* fix test failures when running from a directory whose name contains
characters that must be escaped when used in a URL. (r1664997)
* fix breakage of the serf ra session with svn_ra_get_dir2() and
svn_ra_get_log2(). (r1665213, r1665259, r1665609)
* resolve a race condition in some test suite cleanup code (r1683303)
* fix some tests on non-US default locale on Windows (r1684034)
* document the meaning of "XFAIL" for users building from source (r1683071)
- API changes:
* new RA callbacks for managing ra_svn tunnels:
svn_ra_callbacks2_t::check_tunnel_func,
svn_ra_callbacks2_t::open_tunnel_func and
svn_ra_callbacks2_t::close_tunnel_func
* new API for retrieving info about a file system: svn_fs_info()
* new API svn_io_file_flush() that wraps apr_file_flush()
* new API svn_io_write_atomic(), that writes, sync and renames a file
* new API svn_compat_log_revprops_out_string()
* deprecate unused datatype svn_ra_get_latest_revnum_func_t
* new API svn_client_cleanup2() (r1496954 et al)
* new API svn_stringbuf_create_wrap() (r1502248)
* new API svn_io_file_aligned_seek() (r1502539)
* ra_svn: fix svn_ra_get_log*() to apply limit when server can't (r1503043)
* svn_client_commit6: notify which path prevents a mv commit (r1503662)
* new APIs svn_io_file_create_empty() and svn_io_file_create_bytes()
(r1505006)
* new API svn_ver_check_list2() (r1502267)
* new API svn_stringbuf_from_stream() (r1532193)
* svn_auth_get_platform_specific_client_providers() now includes ssl
providers (r1534153)
* change dav_svn_split_uri() repos_path argument (r1537812)
* new API svn_repos_fs_type() returns filesystem type (r1538585)
* svn_client__get_inheritable_props() clears wcroot_iprops when revision is
not valid (r1538602)
* SVN_VA_NULL: New macro which is null-pointer constant (r1536307)
* SVN_NEEDS_SENTINEL_NULL: New macro to mark functions that require final
NULL sentinel value, so compilers can warn when missing (r1543394)
* platform specific svn_auth_get_* functions are deprecated, use the
svn_auth_get_platform_specific_provider() function instead (r1543992)
* SVN_INT_ERR macro is deprecated; use svn_handle_error2() or
svn_cmdline_handle_exit_error() instead (r1544142)
* new API svn_client_cat3() allow disabling keyword expansion and retrieving
props (r1544182)
* svn_auth_first_credentials(): provides an error rather than crashing if
auth_baton is NULL (r1544320)
* svn_auth_set_parameter(): Do nothing if auth_baton is NULL (r1544320)
* new API svn_relpath_prefix which returns a relpath with a maximum number
of path components (r1545123, r1673282)
* svn_fs_initialize() is now threadsafe (r1546409)
* svn_checksum_kind_t has two new FNV-1a checksums (r1546699)
* svn_fs_lock: control characters are not allowed in lock tokens (r1547445)
* new API svn_wc_cleanup4() makes some functionality optional and adds
notifications (r1548075 et al)
* new API svn_client_info4() supports walking externals (r1550206 et al)
* new flag for svn_fs_begin_txn2() SVN_FS_TXN_CLIENT_DATE to allow client
to set the final svn:date (r1550228)
* new APIs for easier RA commits svn_client_mtcc_* (r1550758 et al)
* new API svn_ra_session_dup() (r1552324 et al)
* svn_ra_stat() now handles compatibility with 1.0-1.1 svnserve (r1552441)
* new error code SVN_ERR_COMPOSED_ERROR added to allow detection of
composed errors by API consumers (r1553266)
* new error code SVN_ERR_RA_DAV_PRECONDITION_FAILED (r1553668)
* new error code SVN_ERR_RA_CANNOT_CREATE_SESSION (r1554027)
* new API svn_fs_node_relation() (r1554800)
* SVN_EXPERIMENTAL to mark functions that might change in future (r1526012)
* fix bug in svn_client_get_merging_summary() with some params (r1532396)
* new error code SVN_ERR_XML_UNEXPECTED_ELEMENT (r1498938)
* extend stream API to also support incomplete reads (r1561688 et al)
* new API svn_wc_add_from_disk3() (r1563361)
* new API svn_client_revert3() to allow clearing changelists and to have
a metadata_only flag (r1568635, r1657026)
* svn_rangelist_inheritable2(): don't change inheritabilty of remaining
ranges (r1569731)
* svn_rangelist_inheritable2() and svn_mergeinfo_inheritable2(): fix a
pool lifetime issue (r1569764)
* new APIs to support cancelation during unified diff output and
allow the context size to be specified (r1570149 et al)
* APIs related to retrieving logs are now documented to be unlimited when
a negative value is passed for the limit (r1570330, 1570335)
* new APIs: svn_fs_props_different() and svn_fs_contents_different()
(r1572363, r1573111)
* expose SVN_CONFIG_AUTHN_* macros in public API (r1572640)
* add SVN_CONFIG_OPTION_SQLITE_TIMEOUT to allow SQLite busy timeout
to be configured by clients (r1592093)
* add new notification between transmitting deltas and finalizing
commit as svn_wc_notify_commit_finalizing (r1603388)
* svn_client_cat3() API no longer returns entry or WC props (r1603501)
* properly handle canonical paths in svn_io_start_cmd3() (r1604761)
* add SVN_FS_CONFIG_FSFS_BLOCK_READ to control FSFS format 7 block
read feature (r1604933)
* new API svn_cstring_skip_prefix() (r1612823)
* new API svn_diff_mem_string_output_merge3() (r1618599)
* extend svn_wc_info_t with conflicts2 (r1618643)
* new API svn_diff_mem_string_output_unified3() (r1618839)
* new API svn_diff_file_output_merge3() (r1618857)
* svn_fs_props_changed() and svn_fs_contents_changed() no longer return
false positives (r1618880)
* new API svn_wc_conflict_description2_dup() (r1618883)
* extend svn_wc_conflict_description2_t with prop_reject_abspath field
(r1619096)
* extend svn_wc_conflict_description2_t with property values as
svn_string_t's (r1619122)
* fix svn_client_import5() to use absolute paths (r1623974)
* fix a few cases of invalid filling of svn_client_commit_item3_t (r1623981)
* add SVN_FS_CONFIG_FSFS_SHARD_SIZE to allow creation of repositories with
a custom shard size (r1624512)
* new API svn_cmdline_create_auth_baton2 (r1630117)
* make svn_string_*() and svn_stringbuf_*() functions handle C strings
of NULL with 0 length (r1632530, et al)
* fix svn_stream_compressed() for streams without partial read support
(r1639626)
* do not segfault on svn_stream_read_full() or svn_stream_skip() are called
for a no-op stream created via svn_stream_create() (r1639637)
* add SVN_FS_CONFIG_FSFS_LOG_ADDRESSING to control logical addressing
feature of fsfs format 7 (r1640915)
* rename the 'parent_directory' parameter of
svn_wc_parse_externals_description3() to 'defining_directory' and improve
the documentation (r1642690)
* new API svn_repos_get_fs_build_parser5() (r1647563)
* SVN_VERSION_BODY changed so that it is embedded into libraries, ultimately
allowing SVN_VER_TAG constant to be modified by patches (r1651565)
* rename repos_url to repos_url_deocded argument to
svn_repos_get_commit_editor5() to clairfy usage (r1653609)
* make svn_io_set_file_read_only() and svn_io_remove_dir2() ignore
ENOTDIR when ignore_enoent argument is set so the behavior is consistent
across platforms (r1653680)
* make svn_ra_open4() return the documented error when a repository
should be opened in a different location (r1655648)
* no longer return an error when using svn_ra_get_lock() and the path does
not exist (r1656875)
* svn_string_dup() will accept a NULL pointer and return a NULL (r1657254)
* svn_ra_get_file_revs2() now handles SVN_INVALID_REVNUM as HEAD (r1660463)
* new API svn_error_quick_wrapf() (r1662668)
* new API svn_fs_node_has_props() (r1673170, r1673172, r1673692, r1673746)
* new API svn_repos_verify_fs3() (r1492651 ... r1687769)
- Bindings:
* javahl: add support for the RA layer (r1494650 et al)
* javahl: add ignore-keywords knob to ISVNCLient.doExport (r1494936)
* javahl: improve performance of rev_range_vector_to_apr_array (r1496243)
* javahl: provide whole stack of errors from native exceptions (r1496353)
* javahl: new framework for manipulating in-memory config data (r1497746)
* javahl: add methods to set config change handler callback (r1497753)
* javahl: add inheritance info to JavaHL's RevisionRange type (r1499308)
* swig-rb: fixes to building on Windows (1505406 et al)
* libsvn_swig_*libraries now work as proper shared librares (r1506520 et al)
* swig-py: 'import svn.core.*' imports libsvn_subr public symbols (r1507860)
* javahl: expose the svn_rangelist operations (r1509025)
* javahl: new utility class SVNUtil (r1512354)
* javahl: serialize init of native library (r1519803)
* javahl: fix value truncation checks (r1519913)
* javahl: add ISVNClient.info which exposes svn_client_info4 (r1603481)
* javahl: include name of exception class in error messages (r1532117)
* javahl: simplify JNI environment handling (r1533804)
* javahl: Revsion.UNSPECIFIED added as alias to Revision.START (r1533928)
* javahl: do not require JUnit to build javahl; only to test (r1535603)
* javahl: update Action enum with new entries added in 1.9 (r1536319)
* javahl: expose node property validation utility (r1538133)
* javahl: new style JNI wrapper (r1539114 et al)
* javahl: new utility API to parse/unparse svn:externals (r1539130 et al)
* javahl: allow tests to be run from a RAM disk (r1539215 et al)
* javahl: expose and use the url member of svn_wc_notify_t (r1539601)
* javahl: expose a utility API to resolve relative externals (r1540921)
* javahl: new utility API for file content translation (r1542401)
* javahl: throw NullPointerException when sources is empty (r1543328)
* swig-pl: fix compilation against perl 5.18 on Windows (r1543980)
* javahl: implement streamed file contents translation (r1543985)
* javahl: enable warnings with javac (r1544163, r1544169)
* javahl: cleanup warnings (r1544578 et al)
* javahl: add common utilities for new-style map iterations (r1545925)
* javahl: add an API to get runtime version of native libs (r1545945)
* javahl: use default cache size instead of no cache (r1547248)
* swig-py: add typemap for hunks field of svn_patch_t (r1548379)
* javahl: don't ignore difference between NULL and empty changelist in
ISVNClient.getChangelists (r1553254)
* swig-pl: fix pool issues with setting dates as revisions (r1553822)
* swig-pl: make svn_auth_set_parameter() usable (r1553823)
* javahl: expose inheritiable property names (r1560338)
* javahl: fix bug in parsing single revision merginfo data (r1563140)
* javahl: create JVM crashlogs from svn malfunctions (r1563927, r1564252)
* javahl: avoid problems when building without NLS support (r1566578 et al)
* javahl: expose --alow-mixed-revisions merge option (r1567602)
* javahl: support incomplete reads from streams (r1569631)
* javahl: allow revert API to take a set of paths (r1571461)
* javahl: improve authentication callback (r1597758 et al)
* javahl: load (most) classes on demand (r1602822)
* javahl: expose confg file keys in JavaHL (r1604448)
* javahl: update ISVNClient.info, ISVnClient.cleanup and add
ISvnClient.vacuum (r1604449)
* javahl: update ISVNRepos.hotcopy (r1618894)
* swig-py: Add close to the core.Stream class (r1619077)
* javahl: add example clients that use the authn API (r1640533)
* swig-py: implement dump stream parser (r1642813)
* swig-pl: remove some unneded cleanup code that triggered a cleanup
failure on windows (r1643072)
* swig-pl: make cancel_func, cancel_baton parameter pairs work (r1648852)
* javahl: expose whitespace diff parameters to blame method (issue #4475)
* javahl: update ConflictDescriptor (r1655842)
* javahl: update FileRevision to provide textDelta (r1656911)
* swig-pl: install into prefix (r1658459)
* javahl: expose the metadataOnly option to copy support (r1661451)
* swig-py: add support for svn_fs_lock_many(), svn_fs_unlock_many(),
svn_repos_fs_lock_many() and svn_repos_fs_unlock_many() (r1662867)
* swig-py: fix support for svn_ra_lock() and svn_ra_unlock() (r1662891)
* javahl: allow java callbacks to throw errors back to the svn code
(r1664938, r1664939, r1664940, r1664978, r1664984)
* swig-pl: fix some stack memory problems (r1668618, 1671388)
* swig: warn on using SWIG 3.x as we have compatibility problems
with newer versions of SWIG (1675149)
* javahl: requires Java 1.6 (r1677003)
* javahl: on OS X use /usr/libexec/java_home to find the JDK (r1675774)
* javahl: allow compiling with a C++11 compiler (r1684412)
Version 1.8.14
(5 Aug 2015, from /branches/1.8.x)
http://svn.apache.org/repos/asf/subversion/tags/1.8.14
@ -13,6 +809,9 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.14
of user and revision after 'svn up' (r1680242)
- Server-side bugfixes:
* mod_authz_svn: do not leak information in mixed anonymous/authenticated
httpd (dav) configurations (CVE-2015-3184)
* do not leak paths that were hidden by path-based authz (CVE-2015-3187)
* mod_dav_svn: do not ignore skel parsing errors (r1658168)
* detect invalid svndiff data earlier (r1684077)
* prevent possible repository corruption on power/disk failures (r1680819)
@ -863,10 +1662,17 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.0
* add missing API functions to JavaHL bindings (issue #4326)
* fix some reference counting bugs in swig-py bindings (r1464899, r1466524)
Version 1.7.22
(12 Aug 2015, from /branches/1.7.x)
http://svn.apache.org/repos/asf/subversion/tags/1.7.22
Developer-visible changes:
- General:
* fix the regression test suite which was broken in 1.7.21 (r1694012)
Version 1.7.21
(5 Aug 2015, from /branches/1.7.x)
http://svn.apache.org/repos/asf/subversion/tags/1.8.21
http://svn.apache.org/repos/asf/subversion/tags/1.7.21
User-visible changes:
- Client-side bugfixes:
@ -875,6 +1681,9 @@ http://svn.apache.org/repos/asf/subversion/tags/1.8.21
non-deltas dumpfile (r1652182 et al.)
- Server-side bugfixes:
* mod_authz_svn: do not leak information in mixed anonymous/authenticated
httpd (dav) configurations (CVE-2015-3184)
* do not leak paths that were hidden by path-based authz (CVE-2015-3187)
* fix 'svnadmin recover' for pre-1.4 FSFS repositories (r1561419)
Developer-visible changes:

View File

@ -1,4 +1,4 @@
The following people have commit access to the Subversion sources.
The following people have commit access to the Subversion sources.
Note that this is not a full list of Subversion's authors, however --
for that, you'd need to look over the log messages to see all the
patch contributors.
@ -58,6 +58,7 @@ Blanket commit access:
stefan2 Stefan Fuhrmann <stefan.fuhrmann@wandisco.com>
jcorvel Johan Corveleyn <jcorvel@gmail.com>
trent Trent Nelson <trent@snakebite.org>
kotkov Evgeny Kotkov <evgeny.kotkov@visualsvn.com>
[[END ACTIVE FULL COMMITTERS. LEAVE THIS LINE HERE; SCRIPTS LOOK FOR IT.]]
@ -96,6 +97,9 @@ Commit access for specific areas:
jrvernooij Jelmer Vernooij <jelmer@samba.org> (Python bindings)
sage Sage LaTorra <sagelt@gmail.com> (Ctypes-Python b.)
vmpn Vladimir Berezniker <vmpn@hitechman.com> (JavaHL bindings)
rschupp Roderich Schupp <roderich.schupp@gmail.com> (Swig bindings)
stilor Alexey Neyman <stilor@att.net> (Python bindings,
svn-vendor.py)
Packages:
@ -157,8 +161,10 @@ Commit access for specific areas:
artagnon Ramkumar Ramachandra <artagnon@gmail.com> (svnrdump, svntest)
arwin Arwin Arni <arwin@collab.net> (svn-bisect)
joes Joe Schaefer <joe_schaefer@yahoo.com> (svnpubsub)
prabhugs Prabhu Gnana Sundar <prabhugs@collab.net> (verify-keep-going)
humbedooh Daniel Gruno <humbedooh@apache.org> (svnpubsub)
prabhugs Prabhu Gnana Sundar <pprabhugs@gmail.com> (verify-keep-going)
schabi Markus Schaber <schabi@apache.org> (testsuite)
gbg Gabriela Gibson <gabriela.gibson@gmail.com> (gtest)
Translation of message files:
@ -186,6 +192,7 @@ giorgio_valoti Giorgio Valoti <giorgio_v@mac.com> (po: it)
IS BOUNCING]
fabien Fabien Coelho <fabien@coelho.net> (po: fr)
marcelg Marcel Gosselin <marcel.gosselin@polymtl.ca> (po: fr)
mattiase Mattias Engdegård <mattiase@acm.org> (po: sv)
Experimental branches:

View File

@ -3,7 +3,7 @@
A Quick Guide
======================================
$LastChangedDate: 2013-09-27 06:57:44 +0000 (Fri, 27 Sep 2013) $
$LastChangedDate: 2015-07-26 23:03:10 +0000 (Sun, 26 Jul 2015) $
Contents:
@ -15,7 +15,7 @@ Contents:
D. Documentation
II. INSTALLATION
A. Building from a Tarball or RPM
A. Building from a Tarball
B. Building the Latest Source under Unix
C. Building under Unix in Different Directories
D. Installing from a Zip or Installer File under Windows
@ -123,7 +123,8 @@ I. INTRODUCTION
create a repository, you have the option of specifying a
storage back-end. The Berkeley DB back-end will only be
available if the BDB libraries are discovered at compile
time.
time. The Berkeley DB back-end has been deprecated and
is not recommend.
* libsasl (OPTIONAL for client and server)
@ -145,7 +146,7 @@ I. INTRODUCTION
Subversion contains optional support for storing passwords in
KWallet (KDE 4) or GNOME Keyring.
* libmagic
* libmagic (OPTIONAL)
If the libmagic library is detected at compile time,
it will be used to determine mime-types of binary files
@ -153,6 +154,12 @@ I. INTRODUCTION
configured via auto-props or the mime-types-file option
take precedence.
* Googlemock aka Gmock (OPTIONAL)
This optional package is used by the tests for Subversions'
C++ bindings.
C. Dependencies in Detail
Subversion depends on a number of third party tools and libraries.
@ -186,7 +193,7 @@ I. INTRODUCTION
commands described in section II.B before installing the following.
1. Apache Portable Runtime 0.9.7 or 1.X.X (REQUIRED)
1. Apache Portable Runtime 1.3 or newer (REQUIRED)
Whenever you want to build any part of Subversion, you need the
Apache Portable Runtime (APR) and the APR Utility (APR-util)
@ -194,8 +201,8 @@ I. INTRODUCTION
****************************************************************
** IMPORTANT ISSUE ABOUT APR VERSIONS: READ THIS. **
** **
** IMPORTANT ISSUE ABOUT APR VERSIONS: READ THIS **
** IF UPGRADING FROM MUCH OLDER SUBVERSION **
****************************************************************
| |
| APR 0.9.X and 1.X are binary-incompatible. |
@ -288,7 +295,7 @@ I. INTRODUCTION
compression. Most Unix systems have libz pre-installed, but
if you need it, you can get it from
http://www.zlib.net
http://www.zlib.net/
3. autoconf 2.59 or newer (Unix only)
@ -306,7 +313,7 @@ I. INTRODUCTION
newer. The autogen.sh script knows about that.
5. Serf library 1.2.1 or newer (OPTIONAL)
5. Serf library 1.3.4 or newer (OPTIONAL)
If you want your client to be able to speak to an Apache
server (via a http:// or https:// URL), you must link against
@ -349,11 +356,7 @@ I. INTRODUCTION
Under Windows, you can specify the paths to these libraries by
passing the options --with-zlib and --with-openssl to gen-make.py.
### Is that right? In-tree build of Neon was disabled in r875974.
This may now apply to Serf, or else gen-make.py should be
updated to remove such options.
c. Using OpenSSL on the Apache server
b. Using OpenSSL on the Apache server
You can also add support for these features to an Apache httpd
server to be used for Subversion using the same support libraries.
@ -430,7 +433,7 @@ I. INTRODUCTION
http://freshmeat.net/projects/cyrussasl/
9. Apache Web Server 2.X (OPTIONAL)
9. Apache Web Server 2.2.X or newer (OPTIONAL)
(http://httpd.apache.org/download.cgi)
@ -443,14 +446,16 @@ I. INTRODUCTION
is done: See section III for details.
10. Python 2.5 or newer (http://www.python.org/) (OPTIONAL)
10. Python 2.7 or newer (http://www.python.org/) (OPTIONAL)
If you want to run "make check" or build from the latest source
under Unix as described in section II.B and III.D, install
Python 2.5 or higher on your system. The majority of the test
suite is written in Python, as is part of Subversion's build
under Unix/Windows as described in section II.B, II.E and III.D,
install Python 2.7 or higher on your system. The majority of the
test suite is written in Python, as is part of Subversion's build
system.
Note that Python 3.x is not supported and most likely won't work.
11. Perl 5.8 or newer (Windows only) (OPTIONAL)
@ -459,26 +464,10 @@ I. INTRODUCTION
script.
12. MASM 6 or newer (Windows only, OPTIONAL)
12. SQLite (REQUIRED)
The Windows build scripts for Subversion can use the Microsoft
Macro Assembler (MASM) to build an optimized version of the ZLib
library. Make sure that the version of MASM you use is compatible
with the C compiler. If you're using MSVC 6, and don't have MASM 6,
a free MASM-compatible assembler is available here:
http://www.masm32.com/
You only need ML.EXE and ML.ERR from this distribution.
The VS.NET installation already contains MASM (but note, that
version if MASM is not compatible with MSVC 6).
13. SQLite (REQUIRED)
Subversion 1.8 requires SQLite version 3.7.12 or above. You can meet
this dependency several ways:
Subversion requires SQLite version 3.7.12 or above. You can meet this
dependency several ways:
* Use an SQLite amalgamation file.
* Specify an SQLite installation to use.
* Let Subversion find an installed SQLite.
@ -491,26 +480,26 @@ I. INTRODUCTION
http://www.sqlite.org/download.html
14. pkg-config (Unix only, OPTIONAL)
13. pkg-config (Unix only, OPTIONAL)
Subversion uses pkg-config to find appropriate options used
at build time.
15. D-Bus (Unix only, OPTIONAL)
14. D-Bus (Unix only, OPTIONAL)
D-Bus is a message bus system. D-Bus is required for support for KWallet
and GNOME Keyring. pkg-config is needed to find D-Bus headers and library.
16. Qt 4 (Unix only, OPTIONAL)
15. Qt 4 (Unix only, OPTIONAL)
Qt is a cross-platform application framework. QtCore, QtDBus and QtGui
modules are required for support for KWallet. pkg-config is needed
to find Qt headers and libraries.
17. KDELibs 4 (Unix only, OPTIONAL)
16. KDELibs 4 (Unix only, OPTIONAL)
Subversion contains optional support for storing passwords in KWallet.
KDELibs contains core KDE libraries. Subversion uses libkdecore and libkdeui
@ -522,13 +511,13 @@ I. INTRODUCTION
--with-kwallet=/path/to/KDE/prefix
18. GLib 2 (Unix only, OPTIONAL)
17. GLib 2 (Unix only, OPTIONAL)
GLib is a general-purpose utility library. GLib is required for support
for GNOME Keyring. pkg-config is needed to find GLib headers and library.
19. GNOME Keyring (Unix only, OPTIONAL)
18. GNOME Keyring (Unix only, OPTIONAL)
Subversion contains optional support for storing passwords in GNOME Keyring.
pkg-config is needed to find GNOME Keyring headers and library. D-Bus and
@ -536,7 +525,7 @@ I. INTRODUCTION
then pass the '--with-gnome-keyring' option to `configure`.
20. Ctypesgen (OPTIONAL)
19. Ctypesgen (OPTIONAL)
Ctypesgen is Python wrapper generator for ctypes. It is used to generate
a part of Subversion Ctypes Python bindings (CSVN). If you want to build
@ -547,7 +536,7 @@ I. INTRODUCTION
For more information on CSVN, see subversion/bindings/ctypes-python/README.
21. libmagic (OPTIONAL)
20. libmagic (OPTIONAL)
Subversion's configure script attempts to find libmagic automatically.
If it is installed in a non-standard location, then use:
@ -568,6 +557,12 @@ I. INTRODUCTION
--with-libmagic
21. Googlemock (OPTIONAL)
Googlemock can be installed and built in-tree by invoking
$ ./get-dep.sh gmock
D. Documentation
The primary documentation for Subversion is the free book
@ -582,7 +577,7 @@ I. INTRODUCTION
II. INSTALLATION
============
A. Building from a Tarball or RPM
A. Building from a Tarball
------------------------------
1. Building from a Tarball
@ -597,34 +592,10 @@ II. INSTALLATION
$ make
# make install
You can also run the full test suite by running 'make check'.
2. Building from an RPM
If you are using Linux (or any OS that can use RPM) then another
possibility is to download the binary RPM from the
http://summersoft.fay.ar.us/pub/subversion directory.
Currently only Linux on the i386 platform is supported
using this method. You might also require additional RPMS
(which can be found in the above mentioned directory) to use the
subversion RPM depending on what packages you already have installed:
subversion*.i386.rpm
apache*.i386.rpm (Version 2.0.49 or greater)
db*.i386.rpm (Version 4.0.14 or greater; version 4.3.27 or
4.2.52 is preferred however)
expat (Comes with RedHat)
After downloading, install it (as root user):
# rpm -ivh subversion*.386.rpm (add other packages as necessary)
Note: For an easy way to generate a new version of the RPM
source and binary package from the latest source code you
just checked out, see the packages/rpm/README file for a
one-line build procedure.
You can also run the full test suite by running 'make check'. Even
in successful runs, some tests will report XFAIL; that is normal.
Failed runs are indicated by FAIL or XPASS results, or a non-zero exit
code from "make check".
B. Building the Latest Source under Unix
@ -646,7 +617,6 @@ II. INSTALLATION
# rm -f /usr/local/lib/libsvn*
# rm -f /usr/local/lib/libapr*
# rm -f /usr/local/lib/libexpat*
# rm -f /usr/local/lib/libserf*
Start the process by running "autogen.sh":
@ -655,7 +625,7 @@ II. INSTALLATION
This script will make sure you have all the necessary components
available to build Subversion. If any are missing, you will be
told where to get them from. (See the 'Build Requirements' in
told where to get them from. (See the 'Dependency Overview' in
section I.)
Note: if the command "autoconf" on your machine does not run
@ -786,27 +756,30 @@ II. INSTALLATION
E.1 Prerequisites
* Visual Studio 6 and service pack. It can be built with later versions
of Visual Studio (Visual Studio.NET 2002, 2003, 2005, 2008 and Visual
C++ Express 2005, 2008) but these instructions assume VS6.
of Visual Studio (Visual Studio.NET 2005-2015, Visual C++ Express
2005-2010, Visual Studio Express 2012-2013 and Visual Studio Community
2013-2015) but these instructions assume VS6.
* A recent Windows SDK. (Not needed with Visual Studio 2005 and later)
If you are using Visual Studio 6, you need the latest SDK which
is compatible with VC6, which is the one from february 2003.
is compatible with VC6, which is the one from February 2003.
You can get it from MSDN:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
* Python 2.5 or higher, downloaded from http://www.python.org/ which is
https://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/e1147034-9b0b-4494-a5bc-6dfebb6b7eb1/download-and-install-microsoft-platform-sdk-febuary-2003-last-version-with-vc6-support?forum=windowssdk
* Python 2.7 or higher, downloaded from http://www.python.org/ which is
used to generate the project files.
Note that Python 3.x is not supported (yet).
* Perl 5.8 or higher from http://www.activestate.com/
* Awk (from http://www.cs.princeton.edu/~bwk/btl.mirror/awk95.exe) is
needed to compile Apache or APR. Note that this is the actual awk
program, not an installer - just rename it to awk.exe and it is
ready to use.
* Apache apr, apr-util, and optionally apr-iconv libraries, version
0.9.12 or later. Included in both the Subversion dependencies ZIP file
1.3 or later. Included in both the Subversion dependencies ZIP file
and the Apache 2 source zip. If you are building from a Subversion
checkout and have not downloaded Apache 2, then get these 3 libraries
from http://www.apache.org/dist/apr/.
* SQLite 3.7.12 or higher from http://www.sqlite.org/download.html
* ZLib 1.2 or higher is required and is included in the Subversion
dependencies zip file or can be obtained from http://www.zlib.org
dependencies zip file or can be obtained from http://www.zlib.net/
* Either a Subversion client binary from http://subversion.apache.org/ to
do the initial checkout of the Subversion source or the zip file
source distribution. See the section "Bootstrapping from a Zip or
@ -818,11 +791,7 @@ II. INSTALLATION
* [Optional] Apache 2 source, downloaded from
http://httpd.apache.org/download.cgi, these instructions assume
version 2.0.58. This is only needed for building the Subversion
server Apache modules. Note that although Subversion will compile
against Apache 2.2.3 and APR 1.2.7, there is a bug that causes
runtime failures with Subversion on Windows. The fix is included in
APR 1.2.8 and will be bundled in the next HTTP Server release
(likely to be 2.2.4).
server Apache modules. ### FIXME Apache 2.2 or greater required.
* [Optional] Apache 2 msi install file, also from
http://httpd.apache.org/download.cgi (required for running the
tests). Only needed for testing the server dso modules and if
@ -835,7 +804,7 @@ II. INSTALLATION
components -- versions 4.3.27 and 4.4.20 are available from
http://subversion.tigris.org/servlets/ProjectDocumentList?folderID=688
as db-4.3.27-win32.zip and db-4.4.20-win32.zip.
For more information see Section I.5.
For more information see Section I.C.7.
* [Optional] Openssl 0.9.7f or higher can be obtained from
http://www.openssl.org/source/openssl-0.9.7f.tar.gz
* [Optional] A modified version of GNU libintl, called
@ -856,7 +825,7 @@ II. INSTALLATION
The Serf library supports secure connections with OpenSSL and
on-the-wire compression with zlib. If you want to use the
secure connections feature, you should pass the option
"--with-openssl" to the gen-make.py script. See Section I.11 for
"--with-openssl" to the gen-make.py script. See Section I.C.6 for
more details.
E.3 Preparation
@ -874,7 +843,7 @@ II. INSTALLATION
* Install Visual Studio Environment. You either have to tell the
installer to register environment variables or run VCVARS32.BAT
before building anything. If you are using a newer Visual Studio,
use the 'Visual Studio 200x Command Prompt' on the Start menu.
use the 'Visual Studio 20xx Command Prompt' on the Start menu.
* Install and register a recent Windows Core SDK if you are using
Visual Studio 6. This is a quote from the Microsoft February 2003
SDK documentation:
@ -897,14 +866,15 @@ II. INSTALLATION
* Install Perl (it should add itself to the path)
* Copy AWK (awk95.exe) to awk.exe (e.g. SVN\awk\awk.exe) and add
the directory containing it (e.g. SVN\awk) to the path.
* Install Apache 2 using the msi file if you are going to test the
server dso modules and are using Visual Studio 6. You must build
* [Optional] Install Apache 2 using the msi file if you are going to test
the server dso modules and are using Visual Studio 6. You must build
and install it from source if you are not using Visual Studio 6 and
want to build and/or test the server modules.
* If you checked out Subversion from the repository then install the serf
sources into SVN\src-trunk\serf.
* If you want BDB backend support, extract the Berkeley DB files
into SVN\src-trunk\db4-win32. It's a good idea to add
* [Optional] If you checked out Subversion from the repository and want
to build Subversion with http/https access support then install the
serf sources into SVN\src-trunk\serf.
* [Optional] If you want BDB backend support, extract the Berkeley DB
files into SVN\src-trunk\db4-win32. It's a good idea to add
SVN\src-trunk\db4-win32\bin to your PATH, so that Subversion can find
the Berkeley DB DLLs.
@ -919,8 +889,8 @@ II. INSTALLATION
SVN\src-trunk\db4-win32\lib. Again, the DLLs should be somewhere in
your path.
* If you want to build the server modules, extract Apache source into
SVN\httpd-2.x.x.
* [Optional] If you want to build the server modules, extract Apache
source into SVN\httpd-2.x.x.
* If you are building from a checkout of Subversion, and you are NOT
building Apache, then you will need the APR libraries. Depending
on how you got your version of APR, either:
@ -932,14 +902,20 @@ II. INSTALLATION
SVN\apr-util, and SVN\apr-iconv respectively.
* Extract the ZLib sources into SVN\zlib if you are not using the zlib
included in the dependencies zip file.
* If you want secure connection (https) client support, extract openssl
into SVN\openssl-x.x.x
* If you want localized message support, extract svn-win32-libintl.zip
into SVN\svn-win32-libintl and extract gettext-x.x.x-bin.zip and
gettext-x.x.x-dep.zip into SVN\gettext-x.x.x-bin.
* [Optional] If you want secure connection (https) client support, or if
you are building with enabled support for serf extract openssl into
SVN\openssl-x.x.x
* [Optional] If you want localized message support, extract
svn-win32-libintl.zip into SVN\svn-win32-libintl and extract
gettext-x.x.x-bin.zip and gettext-x.x.x-dep.zip into
SVN\gettext-x.x.x-bin.
Add SVN\gettext-x.x.x-bin\bin to your path.
* [Optional] Extract MASM32 (only the ML.EXE and ML.ERR files) into
SVN\asm (or extract nasm into SVN\asm) and put it in your path.
* Download the SQLite amalgemation from
http://www.sqlite.org/download.html
and extract it into SVN\sqlite-amalgemation.
See I.C.12 for alternatives to using the amalgemation package.
E.4 Building the Binaries
@ -955,14 +931,14 @@ II. INSTALLATION
C:>set VER=trunk
C:>set DIR=trunk
C:>set DRIVE=C
C:>set BUILD_ROOT=C:\SVN
C:>set PYTHONDIR=C:\Python22
C:>set AWKDIR=C:\SVN\Awk
C:>set ASMDIR=C:\SVN\asm
C:>set SDKINC=C:\Program Files\Microsoft SDK\include
C:>set SDKLIB=C:\Program Files\Microsoft SDK\lib
C:>set SDKINC="C:\Program Files\Microsoft SDK\include"
C:>set SDKLIB="C:\Program Files\Microsoft SDK\lib"
C:>set GETTEXTBIN=C:\SVN\gettext-0.14.1-bin\bin
C:>PATH=%PATH%;%DRIVE%:\SVN\src-%DIR%\db4-win32;%ASMDIR%;
C:>PATH=%PATH%;%BUILD_ROOT%\src-%DIR%\db4-win32;%ASMDIR%;
%PYTHONDIR%;%AWKDIR%;%GETTEXTBIN%
C:>set INCLUDE=%SDKINC%;%INCLUDE%
C:>set LIB=%SDKLIB%;%LIB%
@ -995,6 +971,41 @@ II. INSTALLATION
C:>set APACHEDIR=C:\Program Files\Apache Group\Apache2
C:>msdev httpd-2.0.58\apache.dsw /MAKE "BuildBin - Win32 Release"
APR
If you downloaded APR / APR-UTIL / APR_ICONV by source, you will have to
build these libraries first.
Building these libraries on Windows is straight forward and in most cases
as simple as issuing these two commands:
C:>nmake -f Makefile.win
C:>nmake -f Makefile.win install
Please refere to the build instructions provided by the library source
for actual build instructions.
ZLib
If you downloaded the zlib source, you will have to build ZLib first.
Building ZLib using Visual Studio should be quite simple. Just open the
appropriate solution and build the project zlibstat using the IDE.
Please refere to the build instructions provided by the library source
for actual build instructions.
Note that you'd make sure to define ZLIB_WINAPI in the ZLib config
header and move the lib-file into the zlib root-directory.
Serf
### Section about serf might be required/useful to add.
### scons is required too and serf needs to be configured prior to be
### able to build Subversion using:
### scons APR=[PATH_TO_APR] APU=[PATH_TO_APU] OPENSSL=[PATH_TO_OPENSSL]
### ZLIB=[PATH_TO_ZLIB] PREFIX=[PATH_TO_SERF_DEST]
### scons check
### scons install
Subversion
Things to note:
@ -1006,7 +1017,7 @@ II. INSTALLATION
the APR libraries; the options are --with-apr, --with-apr-util and
--with-apr-iconv.
* If you would like a debug build substitute Debug for Release in
the msdev commands.
the msdev/msbuild commands.
* There have been rumors that Subversion on Win32 can be built
using the latest cygwin, you probably don't want the zip file source
distribution though. ymmv.
@ -1019,8 +1030,9 @@ II. INSTALLATION
directories must be in the Tools/Options/Directories settings (if you
followed the 'Register the SDK with Visual Studio 6' instructions
above this has been done for you).
* If you are using Visual Studio .NET change -t dsw into -t vcproj and
add the --vsnet-version=200x option on the gen-make.py command.
* If you are using Visual Studio later than VC6 change -t dsw into
-t vcproj and add the --vsnet-version=20xx option on the gen-make.py
command.
In this case you will also have to distribute the C runtime dll with
the binaries. Also, since Apache/APR do not provide .vcproj files,
you will need to convert the Apache/APR .dsp files to .vcproj files
@ -1051,12 +1063,13 @@ II. INSTALLATION
C:>msdev subversion_msvc.dsw /USEENV /MAKE "__ALL_TESTS__ - Win32 Release"
C:>cd ..
Or, with Visual C++.NET 2002, 2003, 2005:
Or, with Visual C++.NET 2005 or C++ Express 2005:
C:>devenv subversion_vcnet.sln /build "Release" /project "__ALL_TESTS__"
C:>cd ..
Or, with Visual C++ Express 2005:
Or, with Visual C++.NET 2008+, C++ Express 2008+, Studio Express 2012+ or
Studio Community 2013+:
C:>msbuild subversion_vcnet.sln /t:__ALL_TESTS__ /p:Configuration=Release
C:>cd ..
@ -1102,7 +1115,7 @@ II. INSTALLATION
Then run the client tests:
C:>PATH=%DRIVE%:\SVN\svn-win32-%VER%\bin;%PATH%
C:>PATH=%BUILD_ROOT%\svn-win32-%VER%\bin;%PATH%
C:>cd src-%DIR%
C:>python win-tests.py -c -r -v
@ -1152,12 +1165,6 @@ III. BUILDING A SUBVERSION SERVER
A. Setting Up Apache
-----------------
(Following the BOOTSTRAPPING FROM RPM procedures above will install and
build the latest Subversion server for Linux RedHat 7.1, 7.2, and PPC
Linux systems *IF* the apache-devel-2.0.41 or greater package is already
installed when the SUBVERSION RPM is built.)
1. Obtaining and Installing Apache 2
Subversion tries to compile against the latest released version
@ -1213,7 +1220,7 @@ III. BUILDING A SUBVERSION SERVER
line. Make sure this is the same db as the one Subversion uses.
This note assumes you have installed Berkeley DB 4.2.52
at its default locations. For more info about the db requirement,
see section I.5.
see section I.C.7.
You may also want to include other modules in your build. Add
--enable-ssl to turn on SSL support, and --enable-deflate to turn on

View File

@ -268,3 +268,101 @@ For the file subversion/libsvn_subr/utf_width.c
* Permission to use, copy, modify, and distribute this software
* for any purpose and without fee is hereby granted. The author
* disclaims all warranties with regard to this software.
For the (modified) utf8proc library in subversion/libsvn_subr/utf8proc
Copyright (c) 2009 Public Software Group e. V., Berlin, Germany
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
This software distribution contains derived data from a modified version of
the Unicode data files. The following license applies to that data:
COPYRIGHT AND PERMISSION NOTICE
Copyright (c) 1991-2007 Unicode, Inc. All rights reserved. Distributed
under the Terms of Use in http://www.unicode.org/copyright.html.
Permission is hereby granted, free of charge, to any person obtaining a
copy of the Unicode data files and any associated documentation (the "Data
Files") or Unicode software and any associated documentation (the
"Software") to deal in the Data Files or Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, and/or sell copies of the Data Files or Software, and
to permit persons to whom the Data Files or Software are furnished to do
so, provided that (a) the above copyright notice(s) and this permission
notice appear with all copies of the Data Files or Software, (b) both the
above copyright notice(s) and this permission notice appear in associated
documentation, and (c) there is clear notice in each modified Data File or
in the Software as well as in the documentation associated with the Data
File(s) or Software that the data or software has been modified.
THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR
CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THE DATA FILES OR SOFTWARE.
Except as contained in this notice, the name of a copyright holder shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in these Data Files or Software without prior written
authorization of the copyright holder.
Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be
registered in some jurisdictions. All other trademarks and registered
trademarks mentioned herein are the property of their respective owners.
For the files subversion/libsvn_subr/x509parse.c and
subversion/libsvn_subr/x509.h
* Based on XySSL: Copyright (C) 2006-2008 Christophe Devine
*
* Copyright (C) 2009 Paul Bakker <polarssl_maintainer at polarssl dot org>
*
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the names of PolarSSL or XySSL nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

View File

@ -48,6 +48,7 @@ SVN_GPG_AGENT_LIBS = @SVN_GPG_AGENT_LIBS@
SVN_GNOME_KEYRING_LIBS = @SVN_GNOME_KEYRING_LIBS@
SVN_KWALLET_LIBS = @SVN_KWALLET_LIBS@
SVN_MAGIC_LIBS = @SVN_MAGIC_LIBS@
SVN_INTL_LIBS = @SVN_INTL_LIBS@
SVN_SASL_LIBS = @SVN_SASL_LIBS@
SVN_SERF_LIBS = @SVN_SERF_LIBS@
SVN_SQLITE_LIBS = @SVN_SQLITE_LIBS@
@ -87,6 +88,9 @@ swig_pldir = @libdir@/svn-perl
swig_rbdir = $(SWIG_RB_SITE_ARCH_DIR)/svn/ext
toolsdir = @bindir@/svn-tools
# where to install pkg-config files
pkgconfig_dir = $(datadir)/pkgconfig
javahl_javadir = @libdir@/svn-javahl
javahl_javahdir = @libdir@/svn-javahl/include
javahl_libdir = @libdir@
@ -132,6 +136,9 @@ APACHE_INCLUDES = @APACHE_INCLUDES@
APACHE_LIBEXECDIR = $(DESTDIR)@APACHE_LIBEXECDIR@
APACHE_LDFLAGS = @APACHE_LDFLAGS@
SVN_USE_GMOCK = @SVN_USE_GMOCK@
GMOCK_INCLUDES = -I@GMOCK_SRCDIR@
SWIG = @SWIG@
SWIG_PY_INCLUDES = @SWIG_PY_INCLUDES@ -I$(SWIG_SRC_DIR)/python/libsvn_swig_py
SWIG_PY_COMPILE = @SWIG_PY_COMPILE@
@ -165,11 +172,13 @@ MKDIR = @MKDIR@
DOXYGEN = @DOXYGEN@
# The EXTRA_ parameters can be used to pass extra flags at 'make' time.
CFLAGS = @CFLAGS@ $(EXTRA_CFLAGS)
CFLAGS = @CFLAGS@ @CUSERFLAGS@ $(EXTRA_CFLAGS)
CMODEFLAGS = @CMODEFLAGS@
CNOWARNFLAGS = @CNOWARNFLAGS@
CMAINTAINERFLAGS = @CMAINTAINERFLAGS@
CXXFLAGS = @CXXFLAGS@ $(EXTRA_CXXFLAGS)
CXXFLAGS = @CXXFLAGS@ @CXXUSERFLAGS@ $(EXTRA_CXXFLAGS)
CXXMODEFLAGS = @CXXMODEFLAGS@
CXXNOWARNFLAGS = @CXXNOWARNFLAGS@
CXXMAINTAINERFLAGS = @CXXMAINTAINERFLAGS@
### A few of the CFLAGS (e.g. -Wmissing-prototypes, -Wstrict-prototypes,
### -Wmissing-declarations) are not valid for C++, and should be somehow
@ -180,10 +189,12 @@ SWIG_LDFLAGS = @SWIG_LDFLAGS@ $(EXTRA_SWIG_LDFLAGS)
SWIG_CPPFLAGS = @SWIG_CPPFLAGS@ $(EXTRA_CPPFLAGS)
COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS) $(INCLUDES)
COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS) $(INCLUDES)
COMPILE_CXX = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXMAINTAINERFLAGS) $(CXXFLAGS) $(INCLUDES)
COMPILE_CXX_NOWARN = $(CXX) $(CXXMODEFLAGS) $(CPPFLAGS) $(CXXNOWARNFLAGS) $(CXXFLAGS) $(INCLUDES)
LT_COMPILE = $(LIBTOOL) $(LTFLAGS) --mode=compile $(COMPILE) $(LT_CFLAGS)
LT_COMPILE_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS)
LT_COMPILE_CXX_NOWARN = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX_NOWARN) $(LT_CFLAGS)
# Execute a command that loads libraries from the build dir
LT_EXECUTE = $(LIBTOOL) $(LTFLAGS) --mode=execute `for f in $(abs_builddir)/subversion/*/*.la; do echo -dlopen $$f; done`
@ -199,8 +210,12 @@ COMPILE_SWIG_RB = $(LIBTOOL) $(LTFLAGS) --mode=compile $(SWIG_RB_COMPILE) $(CPPF
COMPILE_JAVAHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(JAVAHL_INCLUDES) -o $@ -c
COMPILE_JAVAHL_JAVAC = $(JAVAC) $(JAVAC_FLAGS)
COMPILE_JAVAHL_JAVAH = $(JAVAH)
COMPILE_JAVAHL_COMPAT_JAVAC = $(JAVAC) $(JAVAC_COMPAT_FLAGS)
# export an env variable so that the tests can run without being installed
# On Mac OS X, export an env variable so that the tests can run without
# being installed. OS X needs the DYLD_LIBRARY_PATH env variable set in
# order to find the libraries to link against, because we can't effectively
# use rpath due to way rpath is implemented in the Mach executable format.
TEST_SHLIB_VAR_JAVAHL=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
for d in $(abs_builddir)/subversion/libsvn_*; do \
@ -212,9 +227,33 @@ TEST_SHLIB_VAR_JAVAHL=\
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
TEST_SHLIB_VAR_SWIG_PY=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
for d in $(SWIG_PY_DIR)/libsvn_swig_py $(SWIG_PY_DIR)/../../../libsvn_*; do \
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
else \
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
fi; \
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
TEST_SHLIB_VAR_SWIG_RB=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
else \
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
fi; \
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
# special compilation for files destined for cxxhl
COMPILE_CXXHL_CXX = $(LIBTOOL) $(LTCXXFLAGS) --mode=compile $(COMPILE_CXX) $(LT_CFLAGS) $(CXXHL_INCLUDES) -o $@ -c
COMPILE_CXXHL_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) -o $@ -c
COMPILE_GMOCK_CXX = $(LT_COMPILE_CXX_NOWARN) $(GMOCK_INCLUDES) -o $@ -c
COMPILE_CXXHL_GMOCK_CXX = $(LT_COMPILE_CXX) $(CXXHL_INCLUDES) $(GMOCK_INCLUDES) -o $@ -c
LINK = $(LIBTOOL) $(LTFLAGS) --mode=link $(CC) $(LT_LDFLAGS) $(CFLAGS) $(LDFLAGS) -rpath $(libdir)
LINK_LIB = $(LINK) $(LT_SO_VERSION)
@ -300,19 +339,6 @@ INSTALL_EXTRA_SWIG_PY=\
compileall.compile_dir("$(DESTDIR)$(swig_pydir_extra)", 1, \
"$(swig_pydir_extra)");'
# export an env variable so that the tests can run without being installed
TEST_SHLIB_VAR_SWIG_PY=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
for d in $(SWIG_PY_DIR)/libsvn_swig_py $(SWIG_PY_DIR)/../../../libsvn_*; do \
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
else \
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
fi; \
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
# The path to generated and complementary source files for the SWIG
# bindings.
SWIG_PL_DIR = $(abs_builddir)/subversion/bindings/swig/perl
@ -343,19 +369,6 @@ INSTALL_EXTRA_SWIG_RB=\
$(INSTALL_DATA) "$$i" $(DESTDIR)$(SWIG_RB_SITE_LIB_DIR)/svn; \
done
# export an env variable so that the tests can run without being installed
TEST_SHLIB_VAR_SWIG_RB=\
if [ "@SVN_APR_SHLIB_PATH_VAR@" = "DYLD_LIBRARY_PATH" ]; then \
for d in $(SWIG_RB_DIR)/libsvn_swig_ruby $(SWIG_RB_DIR)/../../../libsvn_*; do \
if [ -n "$$DYLD_LIBRARY_PATH" ]; then \
@SVN_APR_SHLIB_PATH_VAR@="$$@SVN_APR_SHLIB_PATH_VAR@:$$d/.libs"; \
else \
@SVN_APR_SHLIB_PATH_VAR@="$$d/.libs"; \
fi; \
done; \
export @SVN_APR_SHLIB_PATH_VAR@; \
fi;
APXS = @APXS@
HTTPD_VERSION = @HTTPD_VERSION@
@ -367,6 +380,7 @@ JAVA = @JAVA@
JAVAC = @JAVAC@
JAVADOC = @JAVADOC@
JAVAC_FLAGS = @JAVAC_FLAGS@
JAVAC_COMPAT_FLAGS = @JAVAC_COMPAT_FLAGS@
JAVAH = @JAVAH@
JAR = @JAR@
@ -430,6 +444,7 @@ local-distclean: local-clean
libtool mkmf.log subversion/svn_private_config.h \
subversion/bindings/javahl/classes \
subversion/bindings/javahl/include \
subversion/libsvn_*/*.pc \
$(SVN_CONFIG_SCRIPT_FILES)
rm -f Makefile
@ -467,13 +482,15 @@ revision-install:
install-static: @INSTALL_STATIC_RULES@
# JavaHL target aliases
javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-types-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
javahl: mkdir-init javahl-java javahl-javah javahl-callback-javah javahl-remote-javah javahl-types-javah javahl-util-javah javahl-lib @JAVAHL_TESTS_TARGET@ javahl-compat
install-javahl: javahl install-javahl-java install-javahl-javah install-javahl-lib
javahl-compat: javahl-compat-java @JAVAHL_COMPAT_TESTS_TARGET@
clean-javahl:
if [ -d $(javahl_test_rootdir) ]; then \
rm -rf $(javahl_test_rootdir)/*; \
fi
rm -rf $(javahl_java_PATH) $(javahl_javah_PATH) @JAVAHL_OBJDIR@
rm -fr $(javahl_test_rootdir)
rm -f $(libsvnjavahl_PATH)/*.la $(JAVAHL_JAR)
rm -f $(libsvnjavahl_PATH)/*.lo
rm -f $(libsvnjavahl_PATH)/*.o
@ -481,37 +498,47 @@ clean-javahl:
check-tigris-javahl: javahl-compat
@FIX_JAVAHL_LIB@
$(TEST_SHLIB_VAR_JAVAHL) \
$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_compat_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.tigris.subversion.javahl.RunTests
check-apache-javahl: javahl
@FIX_JAVAHL_LIB@
$(TEST_SHLIB_VAR_JAVAHL) \
$(JAVA) "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" org.apache.subversion.javahl.RunTests
check-deprecated-authn-javahl: javahl
@FIX_JAVAHL_LIB@
$(TEST_SHLIB_VAR_JAVAHL) \
$(JAVA) -Xcheck:jni "-Dtest.rootdir=$(javahl_test_rootdir)" "-Dtest.srcdir=$(javahl_test_srcdir)" "-Dtest.rooturl=$(BASE_URL)" "-Dtest.fstype=$(FS_TYPE)" "-Djava.library.path=@JAVAHL_OBJDIR@:$(libdir)" -classpath "$(javahl_tests_PATH):$(javahl_tests_CLASSPATH)" "-Dtest.tests=$(JAVAHL_TESTS)" "-Dtest.authn.deprecated=true" org.apache.subversion.javahl.RunTests
check-javahl: check-apache-javahl
check-all-javahl: check-apache-javahl check-tigris-javahl
check-all-javahl: check-apache-javahl check-tigris-javahl check-deprecated-authn-javahl
# "make check CLEANUP=true" will clean up directories for successful tests.
# "make check TESTS=subversion/tests/cmdline/basic_tests.py"
# will perform only basic tests (likewise for other tests).
check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
@if test "$(PYTHON)" != "none"; then \
flags="--verbose"; \
if test "$(CLEANUP)" != ""; then \
flags="--cleanup $$flags"; \
fi; \
if test "$(BASE_URL)" != ""; then \
flags="--url $(BASE_URL) $$flags"; \
fi; \
if test "$(SKIP_C_TESTS)" != ""; then \
flags="--skip-c-tests $$flags"; \
fi; \
if test "$(DUMP_LOAD_CROSS_CHECK)" != ""; then \
flags="--dump-load-cross-check $$flags"; \
fi; \
if test "$(FS_TYPE)" != ""; then \
flags="--fs-type $(FS_TYPE) $$flags"; \
fi; \
if test "$(HTTP_LIBRARY)" != ""; then \
flags="--http-library $(HTTP_LIBRARY) $$flags"; \
fi; \
if test "$(HTTPD_VERSION)" != ""; then \
flags="--httpd-version $(HTTPD_VERSION) $$flags"; \
if test "$(HTTPD_VERSION)" != ""; then \
flags="--httpd-version $(HTTPD_VERSION) $$flags"; \
fi; \
if test "$(SERVER_MINOR_VERSION)" != ""; then \
flags="--server-minor-version $(SERVER_MINOR_VERSION) $$flags"; \
@ -526,7 +553,7 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
flags="--fsfs-packing $$flags"; \
fi; \
if test "$(PARALLEL)" != ""; then \
flags="--parallel $$flags"; \
flags="--parallel $(PARALLEL) $$flags"; \
fi; \
if test "$(LOG_TO_STDOUT)" != ""; then \
flags="--log-to-stdout $$flags"; \
@ -544,13 +571,19 @@ check: bin @TRANSFORM_LIBTOOL_SCRIPTS@ $(TEST_DEPS) @BDB_TEST_DEPS@
if test "$(HTTP_PROXY)" != ""; then \
flags="--http-proxy $(HTTP_PROXY) $$flags"; \
fi; \
if test "$(EXCLUSIVE_WC_LOCKS)" != ""; then \
flags="--exclusive-wc-locks $$flags"; \
fi; \
if test "$(MEMCACHED_SERVER)" != ""; then \
flags="--memcached-server $(MEMCACHED_SERVER) $$flags"; \
fi; \
LD_LIBRARY_PATH='$(auth_plugin_dirs):$(LD_LIBRARY_PATH)' \
$(PYTHON) $(top_srcdir)/build/run_tests.py \
--config-file $(top_srcdir)/subversion/tests/tests.conf \
$$flags \
'$(abs_srcdir)' '$(abs_builddir)' $(TESTS); \
else \
echo "make check: Python 2.5 or greater is required,"; \
echo "make check: Python 2.7 or greater is required,"; \
echo " but was not detected during configure"; \
exit 1; \
fi;
@ -564,7 +597,7 @@ davcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod
# run make check.
davautocheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@ apache-mod
@# Takes MODULE_PATH, USE_HTTPV1 and SVN_PATH_AUTHZ in the environment.
@APXS=$(APXS) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
@APXS=$(APXS) MAKE=$(MAKE) $(SHELL) $(top_srcdir)/subversion/tests/cmdline/davautocheck.sh
# First, run:
# subversion/svnserve/svnserve -d -r `pwd`/subversion/tests/cmdline
@ -573,8 +606,8 @@ svncheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
# 'make svnserveautocheck' runs svnserve for you and kills it.
svnserveautocheck: svnserve bin $(TEST_DEPS) @BDB_TEST_DEPS@
@env PYTHON=$(PYTHON) THREADED=$(THREADED) \
$(top_srcdir)/subversion/tests/cmdline/svnserveautocheck.sh
@env PYTHON=$(PYTHON) THREADED=$(THREADED) MAKE=$(MAKE) \
$(SHELL) $(top_srcdir)/subversion/tests/cmdline/svnserveautocheck.sh
# First, run:
# subversion/svnserve/svnserve --listen-host "::1" -d -r `pwd`/subversion/tests/cmdline
@ -591,6 +624,15 @@ svnsshcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
bdbcheck: bin $(TEST_DEPS) @BDB_TEST_DEPS@
@$(MAKE) check FS_TYPE=bdb
# Produce the clang compilation database as the compile_commands.json file
# in the srcdir. This is used by tools such as the YouCompleteMe vim plugin
# to know the compile flags for various source files so that analysis such
# as syntax checking, static analysis or symbol completion can be done
# outside the build system. To do this it uses the tool called bear:
# https://github.com/rizsotto/Bear
compile-commands:
@bear -o $(abs_srcdir)/compile_commands.json -- $(MAKE) all
# Create an execution coverage report from the data collected during
# all execution since the last reset.
gcov:
@ -605,12 +647,11 @@ gcov-reset:
gcov-clean:
rm -f gcov-lcov.dat gcov-lcov.log gcov-genhtml.log
rm -rf gcov-report
find . -name "*.gcda" -o -name "*.gcno" -print0 | xargs -0 rm -f --
find . -name "*.gcda" -o -name "*.gcno" -exec rm -f -- {} \;
check-clean: gcov-clean
if [ -d subversion/tests/cmdline/svn-test-work ]; then \
find subversion/tests/cmdline/svn-test-work -mindepth 1 -maxdepth 1 \
-print0 | xargs -0 rm -rf --; \
rm -rf subversion/tests/cmdline/svn-test-work/*; \
fi
rm -rf subversion/tests/libsvn_fs/test-repo-* \
subversion/tests/libsvn_fs_base/test-repo-* \
@ -654,28 +695,42 @@ doc-javahl:
-sourcepath $(top_srcdir)/subversion/bindings/javahl/src \
-link http://java.sun.com/javase/6/docs/api/ \
org.tigris.subversion.javahl \
org.apache.subversion.javahl \
org.apache.subversion.javahl.callback \
org.apache.subversion.javahl.types
org.apache.subversion.javahl \
org.apache.subversion.javahl.callback \
org.apache.subversion.javahl.remote \
org.apache.subversion.javahl.types \
org.apache.subversion.javahl.util
doc-clean:
rm -rf $(top_srcdir)/doc/doxygen
rm -rf $(top_srcdir)/doc/javadoc
rm -rf $(abs_builddir)/doc/doxygen
rm -rf $(abs_builddir)/doc/javadoc
# Converting from the .rnc XML shcemas to various other schema formats.
SCHEMAS_DTD = $(SCHEMA_DIR)/blame.dtd $(SCHEMA_DIR)/info.dtd \
$(SCHEMA_DIR)/list.dtd $(SCHEMA_DIR)/log.dtd \
$(SCHEMA_DIR)/status.dtd $(SCHEMA_DIR)/props.dtd
# Converting from the .rnc XML schemas to various other schema formats.
SCHEMAS_DTD = $(SCHEMA_DIR)/blame.dtd \
$(SCHEMA_DIR)/diff.dtd \
$(SCHEMA_DIR)/info.dtd \
$(SCHEMA_DIR)/list.dtd \
$(SCHEMA_DIR)/log.dtd \
$(SCHEMA_DIR)/props.dtd \
$(SCHEMA_DIR)/status.dtd
SCHEMAS_RNG = $(SCHEMA_DIR)/blame.rng $(SCHEMA_DIR)/info.rng \
$(SCHEMA_DIR)/list.rng $(SCHEMA_DIR)/log.rng \
$(SCHEMA_DIR)/status.rng $(SCHEMA_DIR)/props.rng
SCHEMAS_RNG = $(SCHEMA_DIR)/blame.rng \
$(SCHEMA_DIR)/diff.rng \
$(SCHEMA_DIR)/info.rng \
$(SCHEMA_DIR)/list.rng \
$(SCHEMA_DIR)/log.rng \
$(SCHEMA_DIR)/props.rng \
$(SCHEMA_DIR)/status.rng
SCHEMAS_XSD = $(SCHEMA_DIR)/blame.xsd $(SCHEMA_DIR)/info.xsd \
$(SCHEMA_DIR)/list.xsd $(SCHEMA_DIR)/log.xsd \
$(SCHEMA_DIR)/status.xsd $(SCHEMA_DIR)/props.xsd
SCHEMAS_XSD = $(SCHEMA_DIR)/blame.xsd \
$(SCHEMA_DIR)/diff.xsd \
$(SCHEMA_DIR)/info.xsd \
$(SCHEMA_DIR)/list.xsd \
$(SCHEMA_DIR)/log.xsd \
$(SCHEMA_DIR)/props.xsd \
$(SCHEMA_DIR)/status.xsd
schema: schema-rng schema-dtd schema-xsd
schema: mkdir-init schema-rng schema-dtd schema-xsd
schema-rng: $(SCHEMAS_RNG)
schema-dtd: $(SCHEMAS_DTD)
@ -781,7 +836,7 @@ $(SWIG_PL_DIR)/native/Makefile.PL: $(SWIG_SRC_DIR)/perl/native/Makefile.PL.in
./config.status subversion/bindings/swig/perl/native/Makefile.PL
$(SWIG_PL_DIR)/native/Makefile: $(SWIG_PL_DIR)/native/Makefile.PL
cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL
cd $(SWIG_PL_DIR)/native; $(PERL) Makefile.PL PREFIX=$(prefix)
# There is a "readlink -f" command on some systems for the same purpose,
# but it's not as portable (e.g. Mac OS X doesn't have it). These should
@ -925,4 +980,5 @@ INSTALL_EXTRA_TOOLS=\
ln -sf svnmucc$(EXEEXT) $(DESTDIR)$(bindir)/svnsyitf$(EXEEXT); \
if test "$(DESTDIR)$(bindir)" != "$(DESTDIR)$(toolsdir)"; then \
ln -sf $(bindir)/svnmucc$(EXEEXT) $(DESTDIR)$(toolsdir)/svnmucc$(EXEEXT); \
ln -sf $(bindir)/svnbench$(EXEEXT) $(DESTDIR)$(toolsdir)/svn-bench$(EXEEXT); \
fi

View File

@ -21,3 +21,8 @@ Inc. MD5 Message-Digest Algorithm, including various
modifications by Spyglass Inc., Carnegie Mellon University, and
Bell Communications Research, Inc (Bellcore).
This product includes software developed by Public Software Group e. V.
under a permissive license, see LICENSE.
This software contains code derived from TropicSSL under a BSD 3-Clause
license, see LICENSE.

View File

@ -63,7 +63,8 @@ done
# ### APR's libtool. deferring to a second round of change...
#
libtoolize="`./build/PrintPath glibtoolize libtoolize libtoolize15`"
# Much like APR except we do not prefer libtool 1 over libtool 2.
libtoolize="`./build/PrintPath glibtoolize libtoolize glibtoolize1 libtoolize15 libtoolize14`"
lt_major_version=`$libtoolize --version 2>/dev/null | sed -e 's/^[^0-9]*//' -e 's/\..*//' -e '/^$/d' -e 1q`
if [ "x$libtoolize" = "x" ]; then
@ -156,11 +157,11 @@ fi
#
# Note: this dependency on Python is fine: only SVN developers use autogen.sh
# and we can state that dev people need Python on their machine. Note
# that running gen-make.py requires Python 2.5 or newer.
# that running gen-make.py requires Python 2.7 or newer.
PYTHON="`./build/find_python.sh`"
if test -z "$PYTHON"; then
echo "Python 2.5 or later is required to run autogen.sh"
echo "Python 2.7 or later is required to run autogen.sh"
echo "If you have a suitable Python installed, but not on the"
echo "PATH, set the environment variable PYTHON to the full path"
echo "to the Python executable, and re-run autogen.sh"
@ -204,7 +205,7 @@ fi
echo "Creating svn_private_config.h.in..."
${AUTOHEADER:-autoheader}
# If there's a config.cache file, we may need to delete it.
# If there's a config.cache file, we may need to delete it.
# If we have an existing configure script, save a copy for comparison.
if [ -f config.cache ] && [ -f configure ]; then
cp configure configure.$$.tmp
@ -239,7 +240,7 @@ echo "./configure --enable-maintainer-mode"
echo "./configure --disable-shared"
echo "./configure --enable-maintainer-mode --disable-shared"
echo "./configure --disable-optimize --enable-debug"
echo "./configure CUSERFLAGS='--flags-for-C' CXXUSERFLAGS='--flags-for-C++'"
echo "./configure CFLAGS='--flags-for-C' CXXFLAGS='--flags-for-C++'"
echo ""
echo "Note: If you wish to run a Subversion HTTP server, you will need"
echo "Apache 2.x. See the INSTALL file for details."

File diff suppressed because one or more lines are too long

View File

@ -40,13 +40,23 @@ private-includes =
subversion/libsvn_delta/compose_delta.c
subversion/bindings/cxxhl/include/*.hpp
subversion/bindings/cxxhl/include/svncxxhl/*.hpp
subversion/bindings/cxxhl/src/*.hpp
subversion/bindings/cxxhl/src/aprwrap/*.hpp
subversion/bindings/cxxhl/src/private/*.hpp
subversion/bindings/javahl/native/*.hpp
subversion/bindings/javahl/native/jniwrapper/jni_*.hpp
subversion/libsvn_subr/utf8proc/utf8proc.h
subversion/libsvn_subr/utf8proc/utf8proc.c
subversion/libsvn_subr/utf8proc/utf8proc_data.c
private-built-includes =
subversion/svn_private_config.h
subversion/libsvn_fs_fs/rep-cache-db.h
subversion/libsvn_fs_x/rep-cache-db.h
subversion/libsvn_wc/wc-metadata.h
subversion/libsvn_wc/wc-queries.h
subversion/libsvn_wc/wc-checks.h
subversion/libsvn_subr/internal_statements.h
subversion/tests/libsvn_wc/wc-test-queries.h
subversion/bindings/swig/proxy/swig_python_external_runtime.swg
subversion/bindings/swig/proxy/swig_perl_external_runtime.swg
subversion/bindings/swig/proxy/swig_ruby_external_runtime.swg
@ -56,15 +66,30 @@ private-built-includes =
subversion/bindings/javahl/include/org_apache_subversion_javahl_Path.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNRepos.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_SVNClient.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeInputStream.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_NativeOutputStream.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Version.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LinkedLibIterator.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_VersionExtended_LoadedLibIterator.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RuntimeVersion.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_Revision.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_types_RevisionRangeList.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_callback_UserPasswordCallback.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteSession.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_RemoteFactory.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_CommitEditor.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_remote_StateReporter.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigImpl_Category.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ConfigLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_DiffLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_PropLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_SubstLib.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_TunnelChannel.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_RequestChannel.h
subversion/bindings/javahl/include/org_apache_subversion_javahl_util_ResponseChannel.h
test-scripts =
subversion/tests/cmdline/*_tests.py
@ -106,6 +131,7 @@ swig-checkout-files = common.swg swigrun.swg runtime.swg
# msvc-libs - additional libraries to link with on Windows
# msvc-export - additional list of files to expose in dsp/vc(x)proj
# msvc-static - visual studio target produces only a static lib
# msvc-force-static- visual studio always uses static libraries for svn libs
# add-deps - expands to additional autoconf-defined dependencies
# add-install-deps - like add-deps, but for the install step
# external-lib - expands to additional autoconf-defined libs
@ -121,6 +147,7 @@ libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr
apriconv apr
manpages = subversion/svn/svn.1
install = bin
msvc-libs = setargv.obj
# The subversion repository administration tool
[svnadmin]
@ -130,6 +157,7 @@ path = subversion/svnadmin
install = bin
manpages = subversion/svnadmin/svnadmin.1
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
msvc-libs = setargv.obj
# The subversion repository dump filtering tool
[svndumpfilter]
@ -215,7 +243,7 @@ type = lib
path = subversion/libsvn_client
libs = libsvn_wc libsvn_ra libsvn_delta libsvn_diff libsvn_subr apriconv apr
install = lib
msvc-export = svn_client.h private/svn_client_private.h
msvc-export = svn_client.h private/svn_client_mtcc.h private/svn_client_private.h
# Routines for binary diffing and tree-deltas
[libsvn_delta]
@ -248,6 +276,7 @@ add-install-deps = $(SVN_FS_LIB_INSTALL_DEPS)
msvc-export = svn_fs.h private/svn_fs_private.h
[libsvn_fs_base]
description = Subversion Filesystem Base Library
type = fs-module
path = subversion/libsvn_fs_base
sources = *.c bdb/*.c util/*.c
@ -256,14 +285,24 @@ libs = libsvn_delta libsvn_subr aprutil apriconv apr bdb libsvn_fs_util
msvc-static = yes
[libsvn_fs_fs]
description = Subversion FSFS Repository Filesystem Library
type = fs-module
path = subversion/libsvn_fs_fs
install = fsmod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
msvc-static = yes
[libsvn_fs_x]
description = Subversion FSX Repository Filesystem Library
type = fs-module
path = subversion/libsvn_fs_x
install = fsmod-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr libsvn_fs_util
msvc-static = yes
# Low-level grab bag of utilities
[libsvn_fs_util]
description = Subversion Filesystem Utility Library
type = lib
install = fsmod-lib
path = subversion/libsvn_fs_util
@ -273,7 +312,7 @@ msvc-static = yes
# General API for accessing repositories
[libsvn_ra]
description = Subversion Repository Access Library
description = Subversion General Repository Access Library
type = lib
path = subversion/libsvn_ra
libs = libsvn_delta libsvn_subr ra-libs apriconv apr
@ -285,15 +324,16 @@ msvc-export = svn_ra.h private\svn_ra_private.h
# Accessing repositories via DAV through serf
[libsvn_ra_serf]
description = Subversion HTTP/WebDAV Protocol Repository Access Library
type = ra-module
path = subversion/libsvn_ra_serf
install = serf-lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf xml
msvc-libs = secur32.lib
libs = libsvn_delta libsvn_subr aprutil apriconv apr serf xml zlib
msvc-static = yes
# Accessing repositories via SVN
[libsvn_ra_svn]
description = Subversion SVN Protocol Repository Access Library
type = ra-module
path = subversion/libsvn_ra_svn
install = ramod-lib
@ -302,6 +342,7 @@ msvc-static = yes
# Accessing repositories via direct libsvn_fs
[libsvn_ra_local]
description = Subversion Local Repository Access Library
type = ra-module
path = subversion/libsvn_ra_local
install = ramod-lib
@ -323,7 +364,7 @@ description = Subversion General Utility Library
type = lib
install = fsmod-lib
path = subversion/libsvn_subr
libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic
libs = aprutil apriconv apr xml zlib apr_memcache sqlite magic intl
msvc-libs = kernel32.lib advapi32.lib shfolder.lib ole32.lib
crypt32.lib version.lib
msvc-export =
@ -332,7 +373,7 @@ msvc-export =
svn_error.h svn_hash.h svn_io.h svn_iter.h svn_md5.h svn_mergeinfo.h
svn_nls.h svn_opt.h svn_path.h svn_pools.h svn_props.h svn_quoprint.h
svn_sorts.h svn_string.h svn_subst.h svn_time.h svn_types.h svn_user.h
svn_utf.h svn_version.h svn_xml.h
svn_utf.h svn_version.h svn_xml.h svn_x509.h
private\svn_atomic.h private\svn_cache.h private\svn_cmdline_private.h
private\svn_debug.h private\svn_error_private.h private\svn_fspath.h
private\svn_log.h private\svn_mergeinfo_private.h
@ -340,9 +381,10 @@ msvc-export =
private\svn_utf_private.h private\svn_eol_private.h
private\svn_token.h private\svn_adler32.h
private\svn_temp_serializer.h private\svn_io_private.h
private\svn_sorts_private.h private\svn_auth_private.h
private\svn_string_private.h private\svn_magic.h
private\svn_subr_private.h private\svn_mutex.h private\svn_named_atomic.h
private\svn_cert.h
private\svn_subr_private.h private\svn_mutex.h
private\svn_packed_data.h private\svn_object_pool.h private\svn_cert.h
# Working copy management lib
[libsvn_wc]
@ -360,10 +402,9 @@ when = INSTALL_APACHE_MODS
type = apache-mod
path = subversion/mod_dav_svn
sources = *.c reports/*.c posts/*.c
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr libhttpd mod_dav
nonlibs = apr aprutil
install = apache-mod
msvc-libs = mod_dav.lib libhttpd.lib
[mod_authz_svn]
description = Subversion path-based authorization module for Apache
@ -371,9 +412,8 @@ when = INSTALL_APACHE_MODS
type = apache-mod
path = subversion/mod_authz_svn
nonlibs = mod_dav_svn apr aprutil
libs = libsvn_repos libsvn_subr
libs = libsvn_repos libsvn_subr libhttpd
install = apache-mod
msvc-libs = libhttpd.lib
[mod_dontdothat]
description = Apache Httpd module to block certain kinds of Apache Subversion requests
@ -381,21 +421,35 @@ when = INSTALL_APACHE_MODS
type = apache-mod
path = tools/server-side/mod_dontdothat
nonlibs = mod_dav_svn apr aprutil
libs = libsvn_subr xml
libs = libsvn_subr xml libhttpd
install = tools
msvc-libs = libhttpd.lib
# The Subversion FSFS repository manipulation tool
[svnfsfs]
description = Subversion FSFS Repository Manipulation Tool
type = exe
path = subversion/svnfsfs
install = bin
libs = libsvn_repos libsvn_fs libsvn_fs_fs libsvn_delta libsvn_subr apriconv apr
msvc-libs = setargv.obj
# ----------------------------------------------------------------------------
#
# CONSTRUCTED HEADERS
#
[rep_cache]
description = Schema for the rep-sharing feature
[rep_cache_fs_fs]
description = Schema for the FSFS rep-sharing feature
type = sql-header
path = subversion/libsvn_fs_fs
sources = rep-cache-db.sql
[rep_cache_fs_x]
description = Schema for the FSX rep-sharing feature
type = sql-header
path = subversion/libsvn_fs_x
sources = rep-cache-db.sql
[wc_queries]
desription = Queries on the WC database
type = sql-header
@ -408,6 +462,11 @@ type = sql-header
path = subversion/libsvn_subr
sources = internal_statements.sql
[wc_test_queries]
description = Queries using working copy tests
type = sql-header
path = subversion/tests/libsvn_wc
sources = wc-test-queries.sql
# ----------------------------------------------------------------------------
#
@ -431,7 +490,6 @@ sources = core.i
libs = libsvn_swig_py libsvn_swig_perl libsvn_swig_ruby
libsvn_diff libsvn_subr apr
description = Subversion core library bindings
include-runtime = yes
[swig_client]
type = swig
@ -501,35 +559,39 @@ description = Subversion WC library bindings
type = swig_lib
lang = python
path = subversion/bindings/swig/python/libsvn_swig_py
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr apriconv apr
libs = libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_subr
apriconv apr python swig
link-cmd = $(LINK)
install = swig-py-lib
# need special build rule to include -DSWIGPYTHON
compile-cmd = $(COMPILE_SWIG_PY)
msvc-static = no
msvc-export = ../bindings/swig/python/libsvn_swig_py/swigutil_py.h
# SWIG utility library for Perl modules
[libsvn_swig_perl]
type = swig_lib
lang = perl
path = subversion/bindings/swig/perl/libsvn_swig_perl
libs = libsvn_delta libsvn_subr apriconv apr
libs = libsvn_delta libsvn_subr apriconv apr perl swig
install = swig-pl-lib
# need special build rule to include
compile-cmd = $(COMPILE_SWIG_PL)
msvc-static = yes
msvc-static = no
msvc-export = ../bindings/swig/perl/libsvn_swig_perl/swigutil_pl.h
# SWIG utility library for Ruby modules
[libsvn_swig_ruby]
type = swig_lib
lang = ruby
path = subversion/bindings/swig/ruby/libsvn_swig_ruby
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr
libs = libsvn_client libsvn_wc libsvn_delta libsvn_subr apriconv apr ruby swig
link-cmd = $(LINK) $(SWIG_RB_LIBS)
install = swig-rb-lib
# need special build rule to include
compile-cmd = $(COMPILE_SWIG_RB)
msvc-static = no
msvc-export = ../bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
# ----------------------------------------------------------------------------
#
@ -539,7 +601,9 @@ msvc-static = no
type = java
path = subversion/bindings/javahl/src/org/apache/subversion/javahl
subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
subversion/bindings/javahl/src/org/apache/subversion/javahl/types
subversion/bindings/javahl/src/org/apache/subversion/javahl/util
src-root = subversion/bindings/javahl/src
sources = *.java
install = javahl-java
@ -552,7 +616,7 @@ type = java
path = subversion/bindings/javahl/src/org/tigris/subversion/javahl
sources = *.java
install = javahl-java
link-cmd = $(COMPILE_JAVAHL_JAVAC)
link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
classes = subversion/bindings/javahl/classes
add-deps = $(javahl_java_DEPS)
### Replace JAR call in INSTALL_EXTRA_JAVAHL_JAVA macro Makefile.in.
@ -576,26 +640,15 @@ type = java
path = subversion/bindings/javahl/tests/org/tigris/subversion/javahl
sources = *.java
install = javahl-java
link-cmd = $(COMPILE_JAVAHL_JAVAC)
link-cmd = $(COMPILE_JAVAHL_COMPAT_JAVAC)
classes = subversion/bindings/javahl/classes
package-roots = org
### Java targets don't do up-to-date checks yet.
#add-deps = javahl-compat-java
add-deps = $(javahl_compat_java_DEPS)
[javahl-types-javah]
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
package = org.apache.subversion.javahl.types
sources = *.java
add-deps = $(javahl_java_DEPS)
install = javahl-javah
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
[javahl-callback-javah]
type = javah
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/callback
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
@ -605,8 +658,41 @@ add-deps = $(javahl_java_DEPS)
install = javahl-javah
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
[javahl-remote-javah]
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/remote
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
package = org.apache.subversion.javahl.remote
sources = *.java
add-deps = $(javahl_java_DEPS)
install = javahl-javah
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
[javahl-types-javah]
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/types
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
package = org.apache.subversion.javahl.types
sources = *.java
add-deps = $(javahl_java_DEPS)
install = javahl-javah
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
[javahl-util-javah]
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl/util
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
package = org.apache.subversion.javahl.util
sources = *.java
add-deps = $(javahl_java_DEPS)
install = javahl-javah
link-cmd = $(COMPILE_JAVAHL_JAVAH) -force
[javahl-javah]
type = javah
type = javah
path = subversion/bindings/javahl/src/org/apache/subversion/javahl
classes = subversion/bindings/javahl/classes
headers = subversion/bindings/javahl/include
@ -621,9 +707,11 @@ description = Subversion Java HighLevel binding
type = lib
path = subversion/bindings/javahl/native
libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff
libsvn_subr libsvn_fs aprutil apriconv apr
sources = *.cpp *.c
add-deps = $(javahl_javah_DEPS) $(javahl_java_DEPS) $(javahl_callback_javah_DEPS) $(javahl_types_javah_DEPS)
libsvn_subr libsvn_fs aprutil apriconv apr java-sdk
sources = *.cpp jniwrapper/*.cpp
add-deps = $(javahl_java_DEPS) $(javahl_callback_javah_DEPS)
$(javahl_remote_javah_DEPS) $(javahl_types_javah_DEPS)
$(javahl_util_javah_DEPS) $(javahl_javah_DEPS)
install = javahl-lib
# need special build rule to include -I$(JDK)/include/jni.h
compile-cmd = $(COMPILE_JAVAHL_CXX)
@ -640,7 +728,7 @@ type = lib
path = subversion/bindings/cxxhl
libs = libsvn_repos libsvn_client libsvn_wc libsvn_ra libsvn_delta libsvn_diff
libsvn_subr libsvn_fs aprutil apriconv apr
sources = src/*.cpp
sources = src/*.cpp src/aprwrap/*.cpp
install = cxxhl-lib
msvc-static = yes
compile-cmd = $(COMPILE_CXXHL_CXX)
@ -648,14 +736,32 @@ link-cmd = $(LINK_CXX_LIB)
[cxxhl-tests]
description = Unit tests for Subversion C++ HighLevel bindings
when = SVN_USE_GMOCK
type = exe
path = subversion/bindings/cxxhl
libs = libsvncxxhl libsvn_subr
libs = libsvncxxhl libgmock libsvn_subr apr
sources = tests/*.cpp
install = tests
compile-cmd = $(COMPILE_CXXHL_CXX)
compile-cmd = $(COMPILE_CXXHL_GMOCK_CXX)
link-cmd = $(LINK_CXX)
# ----------------------------------------------------------------------------
#
# Gmock targets
#
[libgmock]
description = Googlemock Library
when = SVN_USE_GMOCK
type = lib
path = gmock-fused
sources = gmock-gtest-all.cc
install = tests
msvc-static = yes
compile-cmd = $(COMPILE_GMOCK_CXX)
link-cmd = $(LINK_CXX_LIB)
# ----------------------------------------------------------------------------
#
# TESTING TARGETS
@ -702,15 +808,52 @@ libs = libsvn_test libsvn_fs libsvn_fs_base libsvn_delta
# ----------------------------------------------------------------------------
# Tests for libsvn_fs_fs
[fs-pack-test]
[fs-fs-pack-test]
description = Test fsfs packing in libsvn_fs_fs
type = exe
path = subversion/tests/libsvn_fs_fs
sources = fs-pack-test.c
sources = fs-fs-pack-test.c
install = test
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_subr apriconv apr
[fs-fs-fuzzy-test]
description = Use fuzzying to test FSFS corruption resilience
type = exe
path = subversion/tests/libsvn_fs_fs
sources = fs-fs-fuzzy-test.c
install = sub-test
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_repos libsvn_subr apriconv apr
[fs-fs-private-test]
description = Test FSSF private API
type = exe
path = subversion/tests/libsvn_fs_fs
sources = fs-fs-private-test.c
install = test
libs = libsvn_test libsvn_fs libsvn_fs_fs libsvn_delta
libsvn_repos libsvn_subr apriconv apr
# ----------------------------------------------------------------------------
# Tests for libsvn_fs_x
[fs-x-pack-test]
description = Test fsx packing in libsvn_fs_x
type = exe
path = subversion/tests/libsvn_fs_x
sources = fs-x-pack-test.c
install = test
libs = libsvn_test libsvn_fs libsvn_fs_x libsvn_delta
libsvn_subr apriconv apr
[string-table-test]
description = Test fsfs string tables
type = exe
path = subversion/tests/libsvn_fs_x
sources = string-table-test.c
install = test
libs = libsvn_test libsvn_fs_x libsvn_subr apr
# ----------------------------------------------------------------------------
# Tests for libsvn_fs
@ -721,6 +864,7 @@ path = subversion/tests/libsvn_fs
sources = locks-test.c
install = test
libs = libsvn_test libsvn_fs libsvn_delta libsvn_subr apriconv apr
msvc-force-static = yes
[fs-test]
description = Test locks in libsvn_fs
@ -729,7 +873,7 @@ path = subversion/tests/libsvn_fs
sources = fs-test.c
install = test
libs = libsvn_test libsvn_fs libsvn_delta
libsvn_subr aprutil apriconv apr
libsvn_fs_util libsvn_subr aprutil apriconv apr
# ----------------------------------------------------------------------------
# Tests for libsvn_repos
@ -742,6 +886,14 @@ sources = repos-test.c dir-delta-editor.c
install = test
libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
[dump-load-test]
description = Test dumping/loading repositories in libsvn_repos
type = exe
path = subversion/tests/libsvn_repos
sources = dump-load-test.c
install = test
libs = libsvn_test libsvn_repos libsvn_fs libsvn_delta libsvn_subr apriconv apr
# ----------------------------------------------------------------------------
# Tests for libsvn_subr
@ -753,6 +905,14 @@ sources = auth-test.c
install = test
libs = libsvn_test libsvn_subr apr
[bit-array-test]
description = Test packed bit arrays
type = exe
path = subversion/tests/libsvn_subr
sources = bit-array-test.c
install = test
libs = libsvn_test libsvn_subr apr
[cache-test]
description = Test in-memory cache
type = exe
@ -768,6 +928,7 @@ path = subversion/tests/libsvn_subr
sources = checksum-test.c
install = test
libs = libsvn_test libsvn_subr apr zlib
msvc-force-static = yes
[compat-test]
description = Test compatibility functions
@ -792,6 +953,7 @@ path = subversion/tests/libsvn_subr
sources = crypto-test.c
install = test
libs = libsvn_test libsvn_subr aprutil apr
msvc-force-static = yes
[dirent_uri-test]
description = Test dirent_uri library
@ -849,21 +1011,13 @@ sources = mergeinfo-test.c
install = test
libs = libsvn_test libsvn_subr apr
[named_atomic-test]
description = Test named atomics
[packed-data-test]
description = Test path library
type = exe
path = subversion/tests/libsvn_subr
sources = named_atomic-test.c
sources = packed-data-test.c
install = test
libs = libsvn_test libsvn_subr apr
[named_atomic-proc-test]
description = Sub-process for named atomics
type = exe
path = subversion/tests/libsvn_subr
sources = named_atomic-test-proc.c
install = sub-test
libs = libsvn_subr apr
libs = libsvn_test libsvn_subr apriconv apr
[path-test]
description = Test path library
@ -873,6 +1027,22 @@ sources = path-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[prefix-string-test]
description = Test path library
type = exe
path = subversion/tests/libsvn_subr
sources = prefix-string-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[priority-queue-test]
description = Test path library
type = exe
path = subversion/tests/libsvn_subr
sources = priority-queue-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[revision-test]
description = Test revision library
type = exe
@ -881,6 +1051,14 @@ sources = revision-test.c
install = test
libs = libsvn_test libsvn_subr apr
[root-pools-test]
description = Test time functions
type = exe
path = subversion/tests/libsvn_subr
sources = root-pools-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[skel-test]
description = Test skels in libsvn_subr
type = exe
@ -913,6 +1091,14 @@ sources = string-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[sqlite-test]
description = Test stream library
type = exe
path = subversion/tests/libsvn_subr
sources = sqlite-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[time-test]
description = Test time functions
type = exe
@ -945,6 +1131,15 @@ sources = translate-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
[x509-test]
description = Test x509 parser
type = exe
path = subversion/tests/libsvn_subr
sources = x509-test.c
install = test
libs = libsvn_test libsvn_subr apriconv apr
# ----------------------------------------------------------------------------
# Tests for libsvn_delta
@ -974,6 +1169,15 @@ path = subversion/tests/libsvn_client
sources = client-test.c
install = test
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr
msvc-force-static = yes
[mtcc-test]
description = Test Multi Command Context
type = exe
path = subversion/tests/libsvn_client
sources = mtcc-test.c
install = test
libs = libsvn_test libsvn_client libsvn_wc libsvn_repos libsvn_ra libsvn_fs libsvn_delta libsvn_subr apriconv apr
# ----------------------------------------------------------------------------
# Tests for libsvn_diff
@ -1003,7 +1207,7 @@ type = exe
path = subversion/tests/libsvn_ra
sources = ra-test.c
install = test
libs = libsvn_test libsvn_ra libsvn_fs libsvn_delta libsvn_subr
libs = libsvn_test libsvn_ra libsvn_ra_svn libsvn_fs libsvn_delta libsvn_subr
apriconv apr
# ----------------------------------------------------------------------------
@ -1028,6 +1232,7 @@ path = subversion/tests/libsvn_wc
sources = conflict-data-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
[db-test]
description = Test the wc-ng database subsystem
@ -1036,6 +1241,7 @@ path = subversion/tests/libsvn_wc
sources = db-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
[pristine-store-test]
description = Test the wc-ng pristine text storage subsystem
@ -1044,6 +1250,7 @@ path = subversion/tests/libsvn_wc
sources = pristine-store-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
[entries-compat-test]
description = Test backwards compat for the entry interface
@ -1052,6 +1259,7 @@ path = subversion/tests/libsvn_wc
sources = entries-compat.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
[op-depth-test]
description = Test layered tree changes
@ -1060,12 +1268,13 @@ path = subversion/tests/libsvn_wc
sources = op-depth-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
[wc-queries-test]
description = Test Sqlite query evaluation
type = exe
path = subversion/tests/libsvn_wc
sources = wc-queries-test.c
sources = wc-queries-test.c ../../libsvn_subr/sqlite3wrapper.c
install = test
libs = libsvn_test libsvn_subr apriconv apr sqlite
@ -1076,6 +1285,7 @@ path = subversion/tests/libsvn_wc
sources = wc-test.c utils.c
install = test
libs = libsvn_client libsvn_test libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
# ----------------------------------------------------------------------------
# These are not unit tests at all, they are small programs that exercise
@ -1107,6 +1317,7 @@ path = subversion/tests/cmdline
sources = entries-dump.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
testing = skip
[atomic-ra-revprop-change]
@ -1117,12 +1328,21 @@ install = test
libs = libsvn_ra libsvn_subr apriconv apr
testing = skip
[lock-helper]
type = exe
path = subversion/tests/cmdline
sources = lock-helper.c
install = test
libs = libsvn_fs libsvn_subr apriconv apr
testing = skip
[wc-lock-tester]
type = exe
path = subversion/tests/libsvn_wc
sources = wc-lock-tester.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
testing = skip
[wc-incomplete-tester]
@ -1131,6 +1351,16 @@ path = subversion/tests/libsvn_wc
sources = wc-incomplete-tester.c
install = test
libs = libsvn_wc libsvn_subr apriconv apr
msvc-force-static = yes
testing = skip
[svn-wc-db-tester]
type = exe
path = tools/dev/wc-ng
sources = svn-wc-db-tester.c
install = test
libs = libsvn_wc libsvn_subr apr
msvc-force-static = yes
testing = skip
# ----------------------------------------------------------------------------
@ -1142,15 +1372,25 @@ testing = skip
type = lib
external-lib = $(SVN_APR_LIBS)
msvc-libs = ws2_32.lib rpcrt4.lib mswsock.lib
pkg-config = apr-@SVN_APR_MAJOR_VERSION@
[aprutil]
type = lib
external-lib = $(SVN_APRUTIL_LIBS)
pkg-config = apr-util-@SVN_APR_MAJOR_VERSION@
[apriconv]
type = lib
external-lib = $(SVN_APRUTIL_LIBS)
[libhttpd]
type = lib
external-lib = $(SVN_HTTPD_LIBS)
[mod_dav]
type = lib
external-lib = $(SVN_MOD_DAV_LIBS)
[bdb]
type = lib
external-lib = $(SVN_DB_LIBS)
@ -1158,6 +1398,7 @@ external-lib = $(SVN_DB_LIBS)
[gnome-keyring]
type = lib
external-lib = $(SVN_GNOME_KEYRING_LIBS)
pkg-config = gnome-keyring-1
[kwallet]
type = lib
@ -1171,10 +1412,18 @@ external-lib = $(SVN_MAGIC_LIBS)
type = lib
external-lib = $(SVN_SASL_LIBS)
[openssl]
type = lib
external-lib = $(SVN_OPENSSL_LIBS)
msvc-libs = ssleay32.lib libeay32.lib
[intl]
type = lib
external-lib = $(SVN_INTL_LIBS)
[zlib]
type = lib
external-lib = $(SVN_ZLIB_LIBS)
external-project = zlib
msvc-static = yes
[apr_memcache]
@ -1184,18 +1433,41 @@ external-lib = $(SVN_APR_MEMCACHE_LIBS)
[serf]
type = lib
external-lib = $(SVN_SERF_LIBS)
external-project = serf/serf
libs = apr aprutil xml
msvc-static = yes
libs = apr aprutil openssl xml zlib
msvc-libs = secur32.lib
pkg-config = serf-1
pkg-config-private = yes
[sqlite]
type = lib
external-lib = $(SVN_SQLITE_LIBS)
pkg-config = sqlite3
pkg-config-private = yes
[xml]
type = lib
external-lib = $(SVN_XML_LIBS)
[swig]
type = lib
external-lib = $(SVN_SWIG_LIBS)
[perl]
type = lib
external-lib = $(SVN_PERL_LIBS)
[python]
type = lib
external-lib = $(SVN_PYTHON_LIBS)
[ruby]
type = lib
external-lib = $(SVN_RUBY_LIBS)
[java-sdk]
type = lib
external-lib = $(SVN_JAVA_SDK_LIBS)
[ra-libs]
type = lib
external-lib = $(SVN_RA_LIB_LINK)
@ -1204,7 +1476,7 @@ libs = libsvn_ra_serf libsvn_ra_local libsvn_ra_svn
[fs-libs]
type = lib
external-lib = $(SVN_FS_LIB_LINK)
libs = libsvn_fs_base libsvn_fs_fs
libs = libsvn_fs_base libsvn_fs_fs libsvn_fs_x
[__ALL__]
type = project
@ -1213,37 +1485,44 @@ libs = svn svnadmin svndumpfilter svnlook svnmucc svnserve svnrdump svnsync
svnversion
mod_authz_svn mod_dav_svn mod_dontdothat
svnauthz svnauthz-validate svnraisetreeconflict
svnfsfs svnbench
[__ALL_TESTS__]
type = project
path = build/win32
libs = __ALL__
fs-test fs-base-test fs-fsfs-test fs-pack-test skel-test
strings-reps-test changes-test locks-test repos-test
fs-test fs-base-test fs-fsfs-test fs-fs-pack-test fs-fs-fuzzy-test
fs-fs-private-test fs-x-pack-test string-table-test
skel-test strings-reps-test changes-test locks-test
repos-test dump-load-test
checksum-test compat-test config-test hashdump-test mergeinfo-test
opt-test path-test stream-test string-test time-test utf-test
opt-test packed-data-test path-test prefix-string-test
priority-queue-test root-pools-test stream-test
string-test time-test utf-test bit-array-test
error-test error-code-test cache-test spillbuf-test crypto-test
named_atomic-test named_atomic-proc-test revision-test
revision-test
subst_translate-test io-test
translate-test
random-test window-test
diff-diff3-test
ra-test
ra-local-test
sqlite-test
svndiff-test vdelta-test
entries-dump atomic-ra-revprop-change wc-lock-tester wc-incomplete-tester
client-test
lock-helper
client-test mtcc-test
conflict-data-test db-test pristine-store-test entries-compat-test
op-depth-test dirent_uri-test wc-queries-test wc-test
auth-test
parse-diff-test
parse-diff-test x509-test
[__MORE__]
type = project
path = build/win32
libs = __ALL_TESTS__
diff diff3 diff4 fsfs-reorg fsfs-stats fsfs-access-map svn-bench
svn-rep-sharing-stats svn-populate-node-origins-index
diff diff3 diff4 fsfs-access-map svnauth
svn-populate-node-origins-index x509-parser svn-wc-db-tester
[__LIBS__]
type = project
@ -1286,20 +1565,6 @@ libs = __JAVAHL__ javahl-tests javahl-compat-tests
# ----------------------------------------------------------------------------
# Contrib and tools
[fsfs-reorg]
type = exe
path = tools/dev
sources = fsfs-reorg.c
install = tools
libs = libsvn_delta libsvn_subr apr
[fsfs-stats]
type = exe
path = tools/server-side
sources = fsfs-stats.c
install = tools
libs = libsvn_delta libsvn_subr apr
[fsfs-access-map]
type = exe
path = tools/dev
@ -1328,10 +1593,11 @@ sources = diff4.c
install = tools
libs = libsvn_diff libsvn_subr apriconv apr
[svn-bench]
[svnbench]
description = Benchmarking and diagnostics tool for the network layer
type = exe
path = tools/client-side/svn-bench
install = tools
path = subversion/svnbench
install = bin
libs = libsvn_client libsvn_wc libsvn_ra libsvn_subr libsvn_delta
apriconv apr
@ -1371,9 +1637,10 @@ path = tools/dev/svnraisetreeconflict
libs = libsvn_wc libsvn_subr apriconv apr
install = tools
[svn-rep-sharing-stats]
[x509-parser]
description = Tool to verify x509 certificates
type = exe
path = tools/server-side
sources = svn-rep-sharing-stats.c
path = tools/dev
sources = x509-parser.c
install = tools
libs = libsvn_repos libsvn_fs libsvn_fs_fs libsvn_subr apriconv apr
libs = libsvn_subr apr

File diff suppressed because it is too large Load Diff

View File

@ -49,13 +49,11 @@ SVN_CONFIG_NICE(config.nice)
# ==== Check for programs ====================================================
# Look for a C compiler (before anything can set CFLAGS)
CMAINTAINERFLAGS="$CUSERFLAGS"
CUSERFLAGS="$CFLAGS"
AC_PROG_CC
SVN_CC_MODE_SETUP
# Look for a C++ compiler (before anything can set CXXFLAGS)
CXXMAINTAINERFLAGS="$CXXUSERFLAGS"
CXXUSERFLAGS="$CXXFLAGS"
AC_PROG_CXX
SVN_CXX_MODE_SETUP
@ -92,13 +90,8 @@ AC_SUBST([MKDIR])
dnl verify apr version and set apr flags
dnl These regular expressions should not contain "\(" and "\)".
dnl The specific reason we require APR 0.9.7 is:
dnl It contains fixes to its file writing routines
dnl now generating errors instead of silently ignoring
dnl them. Only .7 and later can guarantee repository
dnl integrity with FSFS.
APR_VER_REGEXES=["0\.9\.[7-9] 0\.9\.[12][0-9] 1\. 2\."]
APR_VER_REGEXES=["1\.[3-9]\. 2\."]
SVN_LIB_APR($APR_VER_REGEXES)
@ -111,11 +104,14 @@ if test `expr $apr_version : 2` -ne 0; then
AC_SUBST(SVN_APRUTIL_INCLUDES)
AC_SUBST(SVN_APRUTIL_CONFIG, ["$apu_config"])
AC_SUBST(SVN_APRUTIL_LIBS)
SVN_APR_MAJOR_VERSION=2
else
svn_lib_ver=0
APU_VER_REGEXES=["0\.9\.[7-9] 0\.9\.1[0-9] 1\."]
APU_VER_REGEXES=["1\.[3-9]\."]
SVN_LIB_APRUTIL($APU_VER_REGEXES)
SVN_APR_MAJOR_VERSION=1
fi
AC_SUBST(SVN_APR_MAJOR_VERSION)
SVN_LT_SOVERSION="-version-info $svn_lib_ver"
AC_SUBST(SVN_LT_SOVERSION)
AC_DEFINE_UNQUOTED(SVN_SOVERSION, $svn_lib_ver,
@ -125,7 +121,7 @@ dnl Search for pkg-config
AC_PATH_PROG(PKG_CONFIG, pkg-config)
dnl Search for serf
SVN_LIB_SERF(1,2,1)
SVN_LIB_SERF(1,3,4)
if test "$svn_lib_serf" = "yes"; then
AC_DEFINE([SVN_HAVE_SERF], 1,
@ -142,7 +138,7 @@ fi
dnl Find Apache with a recent-enough magic module number
SVN_FIND_APACHE(20020903)
SVN_FIND_APACHE(20051115)
dnl Search for SQLite. If you change SQLITE_URL from a .zip to
dnl something else also update build/ac-macros/sqlite.m4 to reflect
@ -167,7 +163,6 @@ if test -n "$sqlite_compat_ver" && test "$sqlite_compat_ver" != no; then
fi
SVN_CHECK_FOR_ATOMIC_BUILTINS
if test "$svn_cv_atomic_builtins" = "yes"; then
AC_DEFINE(SVN_HAS_ATOMIC_BUILTINS, 1, [Define if compiler provides atomic builtins])
fi
@ -227,7 +222,7 @@ if test "$experimental_libtool" = "yes"; then
SVN_LIBTOOL="$sh_libtool"
else
sh_libtool="$abs_builddir/libtool"
SVN_LIBTOOL="\$(SHELL) $sh_libtool"
SVN_LIBTOOL="\$(SHELL) \"$sh_libtool\""
fi
AC_SUBST(SVN_LIBTOOL)
@ -324,18 +319,6 @@ case $host in
esac
AC_SUBST(LT_NO_UNDEFINED)
AC_MSG_CHECKING([whether to avoid circular linkage at all costs])
case $host in
*-*-cygwin*)
AC_MSG_RESULT([yes])
AC_DEFINE([SVN_AVOID_CIRCULAR_LINKAGE_AT_ALL_COSTS_HACK], 1,
[Define if circular linkage is not possible on this platform.])
;;
*)
AC_MSG_RESULT([no])
;;
esac
dnl Check for trang.
trang=yes
AC_ARG_WITH(trang,
@ -570,64 +553,97 @@ found_gnome_keyring=no
AC_MSG_CHECKING([whether to look for GNOME Keyring])
if test "$with_gnome_keyring" != "no"; then
AC_MSG_RESULT([yes])
if test "$svn_enable_shared" = "yes"; then
if test "$APR_HAS_DSO" = "yes"; then
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
AC_MSG_RESULT([yes])
old_CPPFLAGS="$CPPFLAGS"
SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
AC_MSG_CHECKING([for GNOME Keyring])
if test "$found_gnome_keyring" = "yes"; then
case "$host" in
*-*-darwin*)
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([--with-gnome-keyring is not supported on Mac OS X.])
else
with_gnome_keyring=no
fi
;;
*)
if test "$svn_enable_shared" = "yes"; then
if test "$APR_HAS_DSO" = "yes"; then
if test -n "$PKG_CONFIG"; then
AC_MSG_CHECKING([for GLib and GNOME Keyring .pc files])
if $PKG_CONFIG --exists glib-2.0 gnome-keyring-1; then
AC_MSG_RESULT([yes])
AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
[Is GNOME Keyring support enabled?])
CPPFLAGS="$old_CPPFLAGS"
SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
old_CPPFLAGS="$CPPFLAGS"
SVN_GNOME_KEYRING_INCLUDES="`$PKG_CONFIG --cflags glib-2.0 gnome-keyring-1`"
CPPFLAGS="$CPPFLAGS $SVN_GNOME_KEYRING_INCLUDES"
AC_CHECK_HEADER(gnome-keyring.h, found_gnome_keyring=yes, found_gnome_keyring=no)
AC_MSG_CHECKING([for GNOME Keyring])
if test "$found_gnome_keyring" = "yes"; then
AC_MSG_RESULT([yes])
AC_DEFINE([SVN_HAVE_GNOME_KEYRING], [1],
[Is GNOME Keyring support enabled?])
CPPFLAGS="$old_CPPFLAGS"
SVN_GNOME_KEYRING_LIBS="`$PKG_CONFIG --libs glib-2.0 gnome-keyring-1`"
else
AC_MSG_RESULT([no])
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([cannot find GNOME Keyring])
fi
fi
else
AC_MSG_RESULT([no])
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([cannot find GNOME Keyring])
AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
else
with_gnome_keyring=no
fi
fi
else
AC_MSG_RESULT([no])
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([cannot find GLib and GNOME Keyring .pc files.])
AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
else
with_gnome_keyring=no
fi
fi
else
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([cannot find pkg-config. GNOME Keyring requires this.])
AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
else
with_gnome_keyring=no
fi
fi
else
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([APR does not have support for DSOs. GNOME Keyring requires this.])
AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
else
with_gnome_keyring=no
fi
fi
else
if test "$with_gnome_keyring" = "yes"; then
AC_MSG_ERROR([--with-gnome-keyring conflicts with --disable-shared])
else
with_gnome_keyring=no
fi
fi
;;
esac
else
AC_MSG_RESULT([no])
fi
AC_SUBST(SVN_GNOME_KEYRING_INCLUDES)
AC_SUBST(SVN_GNOME_KEYRING_LIBS)
dnl Googlemock -----------------
AC_ARG_ENABLE([gmock],
AS_HELP_STRING([--disable-gmock],
[Do not use the Googlemock testing framework]),
[],
[enable_gmock=yes])
AC_SUBST([GMOCK_SRCDIR], [$abs_srcdir/gmock-fused])
AC_MSG_CHECKING([whether use Googlemock])
if test "$enable_gmock" != "no"; then
if test -d "$GMOCK_SRCDIR"; then
AC_MSG_RESULT([yes])
SVN_USE_GMOCK=true
else
AC_MSG_RESULT([no])
SVN_USE_GMOCK=false
fi
else
AC_MSG_RESULT([no])
SVN_USE_GMOCK_SOURCES=false
fi
AC_SUBST([SVN_USE_GMOCK])
dnl Ev2 experimental features ----------------------
dnl Note: The Ev2 implementations will be built unconditionally, but by
@ -651,13 +667,22 @@ AC_ARG_ENABLE(nls,
[enable_nls=$enableval],[enable_nls=yes])
USE_NLS="no"
SVN_INTL_LIBS=""
if test "$enable_nls" = "yes"; then
dnl First, check to see if there is a working msgfmt.
AC_PATH_PROG(MSGFMT, msgfmt, none)
AC_PATH_PROG(MSGMERGE, msgmerge, none)
AC_PATH_PROG(XGETTEXT, xgettext, none)
if test "$MSGFMT" != "none"; then
AC_SEARCH_LIBS(bindtextdomain, [intl], [],
AC_SEARCH_LIBS(bindtextdomain, [intl],
[
# in case libintl needs to be linked explicitly,
# $ac_cv_search_bindtextdomain contains -l linker flags
if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
then
SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
fi
],
[
enable_nls="no"
])
@ -669,6 +694,10 @@ if test "$enable_nls" = "yes"; then
AC_SEARCH_LIBS(bindtextdomain, [intl],
[
enable_nls="yes"
if echo "$ac_cv_search_bindtextdomain" | grep '^-l' >/dev/null
then
SVN_INTL_LIBS="$ac_cv_search_bindtextdomain"
fi
# This is here so that -liconv ends up in LIBS
# if it worked with -liconv.
AC_CHECK_LIB(iconv, libiconv_open)
@ -687,6 +716,8 @@ if test "$enable_nls" = "yes"; then
fi
fi
AC_SUBST(SVN_INTL_LIBS)
AH_BOTTOM([
/* Indicate to translators that string X should be translated. Do not look
up the translation at run time; just expand to X. This macro is suitable
@ -711,6 +742,30 @@ AH_BOTTOM([
#define gettext(x) (x)
#define dgettext(domain, x) (x)
#endif
/* compiler hints */
#if defined(__GNUC__) && (__GNUC__ >= 3)
# define SVN__PREDICT_FALSE(x) (__builtin_expect(x, 0))
# define SVN__PREDICT_TRUE(x) (__builtin_expect(!!(x), 1))
#else
# define SVN__PREDICT_FALSE(x) (x)
# define SVN__PREDICT_TRUE(x) (x)
#endif
#if defined(SVN_DEBUG)
# define SVN__FORCE_INLINE
# define SVN__PREVENT_INLINE
#elif defined(__GNUC__)
# define SVN__FORCE_INLINE APR_INLINE __attribute__ ((always_inline))
# define SVN__PREVENT_INLINE __attribute__ ((noinline))
#else
# define SVN__FORCE_INLINE APR_INLINE
# define SVN__PREVENT_INLINE
#endif
/* Macro used to specify that a variable is intentionally left unused.
Supresses compiler warnings about the variable being unused. */
#define SVN_UNUSED(v) ( (void)(v) )
])
dnl Used to simulate makefile conditionals.
@ -887,16 +942,6 @@ AC_CHECK_HEADER(termios.h,[
dnl Process some configuration options ----------
AC_ARG_WITH(openssl,
AS_HELP_STRING([--with-openssl],
[This option does NOT affect the Subversion build process in any
way. It tells an integrated Serf HTTP client library build
process where to locate the OpenSSL library when (and only when)
building Serf as an integrated part of the Subversion build
process. When linking to a previously installed version of Serf
instead, you do not need to use this option.]),
[])
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Turn on debugging]),
@ -989,7 +1034,7 @@ AS_HELP_STRING([--enable-maintainer-mode],
dnl but throw too many warnings in svn code, of too little importance,
dnl to keep these enabled. Remove the "dnl" to do a run with these
dnl switches enabled.
dnl ./configure CUSERFLAGS="-Wswitch-enum -Wswitch-default"
dnl ./configure CFLAGS="-Wswitch-enum -Wswitch-default"
dnl Add each of the following flags only if the C compiler accepts it.
CFLAGS_KEEP="$CFLAGS"
@ -1003,12 +1048,13 @@ AS_HELP_STRING([--enable-maintainer-mode],
SVN_CFLAGS_ADD_IFELSE([-Wold-style-definition])
SVN_CFLAGS_ADD_IFELSE([-Wno-system-headers])
SVN_CFLAGS_ADD_IFELSE([-Wno-format-nonliteral])
SVN_CFLAGS_ADD_IFELSE([-Wmissing-variable-declarations])
CMAINTAINERFLAGS="$CFLAGS $CMAINTAINERFLAGS"
CMAINTAINERFLAGS="$CFLAGS"
CFLAGS="$CFLAGS_KEEP"
dnl Add flags that all versions of GCC (should) support
CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long $CMAINTAINERFLAGS"
CMAINTAINERFLAGS="-Wall -Wpointer-arith -Wwrite-strings -Wshadow -Wformat=2 -Wunused -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wno-multichar -Wredundant-decls -Wnested-externs -Winline -Wno-long-long -Wbad-function-cast $CMAINTAINERFLAGS"
fi
if test "$GXX" = "yes"; then
AC_MSG_NOTICE([maintainer-mode: adding G++ warning flags])
@ -1022,7 +1068,7 @@ AS_HELP_STRING([--enable-maintainer-mode],
SVN_CXXFLAGS_ADD_IFELSE([-Wshorten-64-to-32])
SVN_CXXFLAGS_ADD_IFELSE([-Wno-system-headers])
CXXMAINTAINERFLAGS="$CXXFLAGS $CXXMAINTAINERFLAGS"
CXXMAINTAINERFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS_KEEP"
dnl Add flags that all versions of G++ (should) support
@ -1227,7 +1273,7 @@ AS_HELP_STRING([--enable-gprof],
PYTHON="`$abs_srcdir/build/find_python.sh`"
if test -z "$PYTHON"; then
AC_MSG_WARN([Python 2.5 or later is required to run the testsuite])
AC_MSG_WARN([Python 2.7 or later is required to run the testsuite])
AC_MSG_WARN([or to use the Subversion Python bindings])
AC_MSG_WARN([])
AC_MSG_WARN([If you have a suitable Python installed, but not on the])
@ -1237,7 +1283,7 @@ fi
AC_PATH_PROGS(PYTHON, "$PYTHON", none)
# The minimum version for the JVM runtime for our Java bytecode.
JAVA_OLDEST_WORKING_VER='1.5'
JAVA_OLDEST_WORKING_VER='1.6'
# SVN_CHECK_JDK sets $JAVA_CLASSPATH
SVN_CHECK_JDK($JAVA_OLDEST_WORKING_VER)
@ -1341,6 +1387,13 @@ if test "$svn_enable_shared" = "no" || test "$use_dso" != "yes"; then
svn_fs_lib_install_deps="install-fsmod-lib"
svn_fs_lib_link="\$(FS_FS_LINK)"
AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_X, 1,
[Defined if libsvn_fs should link against libsvn_fs_x])
svn_fs_lib_deps="$svn_fs_lib_deps \$(FS_X_DEPS)"
svn_fs_lib_link="$svn_fs_lib_link \$(FS_X_LINK)"
dnl FSFS already installs fsmod
dnl svn_fs_lib_install_deps="$svn_fs_lib_install_deps install-fsmod-lib"
if test "$svn_lib_berkeley_db" = "yes"; then
AC_DEFINE(SVN_LIBSVN_FS_LINKS_FS_BASE, 1,
[Defined if libsvn_fs should link against libsvn_fs_base])
@ -1402,8 +1455,15 @@ if test "$do_javahl_build" = "yes"; then
# it.
AC_MSG_CHECKING([for additional flags to link C++ libraries])
if test "x$ac_compiler_gnu" = "xyes"; then
LT_CXX_LIBADD="-lstdc++"
AC_MSG_RESULT([$LT_CXX_LIBADD])
case "$host" in
*freebsd10*)
AC_MSG_RESULT([none needed])
;;
*)
LT_CXX_LIBADD="-lstdc++"
AC_MSG_RESULT([$LT_CXX_LIBADD])
;;
esac
else
AC_MSG_RESULT([none needed])
fi
@ -1433,6 +1493,8 @@ AC_SUBST(JAVAHL_COMPAT_TESTS_TARGET)
# ==== Miscellaneous bits ====================================================
AC_CHECK_HEADERS([stdbool.h inttypes.h])
# Strip '-no-cpp-precomp' from CPPFLAGS for the clang compiler
### I think we get this flag from APR, so the fix probably belongs there
if test "$CC" = "clang"; then
@ -1484,6 +1546,13 @@ AC_CONFIG_COMMANDS([svn_private_config.h.tmp],
SVN_DB_HEADER="$SVN_DB_HEADER"])
AC_CONFIG_FILES([Makefile])
# Create pkg-config .pc files from .pc.in files
for pc_in_file in "${abs_srcdir}"/subversion/libsvn_*/*.pc.in; do
pc_file=${pc_in_file#${abs_srcdir}/}
pc_file=${pc_file%.in}
AC_CONFIG_FILES([${pc_file}])
done
SVN_CONFIG_SCRIPT(tools/backup/hot-backup.py)
SVN_CONFIG_SCRIPT(tools/hook-scripts/commit-access-control.pl)
SVN_CONFIG_SCRIPT(subversion/bindings/swig/perl/native/Makefile.PL)

View File

@ -0,0 +1,30 @@
Googlemock and Googletest Suite for Subversion
---------------------------------------------
Googlemock and Googletest are external packages that are downloaded
and compiled on request, as part of regular compilations.
Googlemock is available here:
https://code.google.com/p/googlemock/
The source packages already include Googletest, which is available
here:
https://code.google.com/p/googletest/
Subversion uses Googlemock and Googletest for the C++HL test suite.
To configure Subversion to use Googlemock, type
./get-dep.sh gmock
This will download Googlemock and put the fused source into the
'gmock-fused' directory. Once it's there, configure will pick it up
automatically (but you do have to re-run autogen.sh and configure).
You can disable building Googlemock (and hence the C++HL test suite)
with the --disable-gmock configure option. This will tell configure to
ignore the gmock-fused directory.

View File

@ -53,7 +53,7 @@ root" contains exactly three subdirectories: <tt>/trunk</tt>,
only one project root, or it may contain a number of them.</p>
<p><em>Book reference:</em> <a
href="http://svnbook.red-bean.com/svnbook/ch05s04.html#svn-ch-5-sect-6.1">Choosing
href="http://svnbook.red-bean.com/nightly/en/svn.reposadmin.planning.html#svn.reposadmin.projects.chooselayout">Choosing
a Repository Layout</a>.</p>
@ -70,10 +70,8 @@ change. You can mention this revision number in bug databases, or use
it as an argument to <tt>svn merge</tt> should you want to undo the
change or port it to another branch.</p>
<p><em>Book reference:</em> "Subversion and Changesets" sidebar,
within <a
href="http://svnbook.red-bean.com/svnbook/ch04s03.html">chapter
4</a>.</p>
<p><em>Book reference:</em> <a
href="http://svnbook.red-bean.com/nightly/en/svn.branchmerge.basicmerging.html#svn.branchmerge.changesets">Changesets</a>.</p>
<!-- =================================================== -->
@ -91,8 +89,11 @@ and your issue-tracking database as possible:</p>
<!-- =================================================== -->
<div style="color:grey">
<h2>Track merges manually</h2>
<p><em>### OBSOLETE RECOMMENDATION ###</em></p>
<p>When committing the result of a merge, be sure to write a
descriptive log message that explains what was merged, something
like:</p>
@ -103,6 +104,7 @@ like:</p>
href="http://svnbook.red-bean.com/svnbook/ch04s03.html#svn-ch-4-sect-3.2">Tracking
merges manually</a>, and <a
href="http://svnbook.red-bean.com/svnbook/ch04s04.html#svn-ch-4-sect-4.1">Merging a whole branch to another</a>.</p>
</div>
<!-- =================================================== -->
@ -134,8 +136,7 @@ revision, and everything else is at an older revision.</li>
</ol>
<p><em>Book reference:</em> <a
href="http://svnbook.red-bean.com/svnbook/ch02s03.html#svn-ch-2-sect-3.4">The
limitation of mixed revisions</a>.</p>
href="http://svnbook.red-bean.com/nightly/en/svn.basic.in-action.html#svn.basic.in-action.mixedrevs">Mixed-revision working copies</a>.</p>
<!-- =================================================== -->
@ -180,39 +181,6 @@ of patient waiting while your client chugs away. You can rest
assured, however, that unlike CVS, your large files won't incapacitate
the server or affect other users.</p>
<!-- =================================================== -->
<h2>Work around commands that don't understand copies/renames</h2>
<p>When a file or directory is copied or renamed, the Subversion repository
tracks that history. Unfortunately in Subversion 1.0, the only client
subcommand which actually takes advantage of this feature is <tt>svn
log</tt>. A number of other commands (such as <tt>svn diff</tt> and
<tt>svn cat</tt>) ought to be automatically following rename-history,
but aren't doing so yet.</p>
<p>In all of these cases, a basic workaround is to use <tt>'svn log
-v'</tt> to discover the proper path within the older revision.</p>
<p>For example, suppose you copied <tt>/trunk</tt> to
<tt>/branches/mybranch</tt> in revision 200, and then committed some
changes to <tt>/branches/mybranch/foo.c</tt> in subsequent revisions.
Now you'd like to compare revisions 80 and 250 of the file.</p>
<p>If you have a working copy of the branch and run <tt>svn diff
-r80:250 foo.c</tt>, you'll see an error about
<tt>/branches/mybranch/foo.c</tt> not existing in revision 80. To
remedy, you would run <tt>svn log -v</tt> on your branch or file to
discover that it was named <tt>/trunk/foo.c</tt> prior to revision 200,
and then compare the two URLs directly:</p>
<pre>
$ svn diff http://.../trunk/foo.c@80 \
http://.../branches/mybranch/foo.c@200
</pre>
<!-- =================================================== -->
<h2>Know when to create branches</h2>

View File

@ -25,7 +25,9 @@
import os
import traceback
import sys
import getopt
try:
my_getopt = getopt.gnu_getopt
@ -64,6 +66,8 @@ def main(fname, gentype, verfname=None,
generator.write()
generator.write_sqlite_headers()
generator.write_errno_table()
generator.write_config_keys()
if ('--debug', '') in other_options:
for dep_type, target_dict in generator.graph.deps.items():
@ -192,12 +196,6 @@ def _usage_exit(err=None):
print(" --enable-nls")
print(" add support for gettext localization")
print("")
print(" --enable-bdb-in-apr-util")
print(" configure APR-Util to use Berkeley DB")
print("")
print(" --enable-ml")
print(" enable use of ML assembler with zlib")
print("")
print(" --disable-shared")
print(" only build static libraries")
print("")
@ -208,11 +206,18 @@ def _usage_exit(err=None):
print(" Use static openssl")
print("")
print(" --vsnet-version=VER")
print(" generate for VS.NET version VER (2002, 2003, 2005, 2008, 2010 or 2012)")
print(" generate for VS.NET version VER (2002, 2003, 2005, 2008,")
print(" 2010, 2012, 2013 or 2015)")
print(" [only valid in combination with '-t vcproj']")
print("")
print(" -D NAME[=value]")
print(" define NAME macro during compilation")
print(" [only valid in combination with '-t vcproj']")
print("")
print(" --with-apr_memcache=DIR")
print(" the apr_memcache sources are in DIR")
print(" --disable-gmock")
print(" do not use Googlemock")
sys.exit(1)
@ -221,16 +226,17 @@ def __init__(self):
self.list = []
self.dict = {}
def add(self, opt, val):
def add(self, opt, val, overwrite=True):
if opt in self.dict:
self.list[self.dict[opt]] = (opt, val)
if overwrite:
self.list[self.dict[opt]] = (opt, val)
else:
self.dict[opt] = len(self.list)
self.list.append((opt, val))
if __name__ == '__main__':
try:
opts, args = my_getopt(sys.argv[1:], 'st:',
opts, args = my_getopt(sys.argv[1:], 'st:D:',
['debug',
'release',
'reload',
@ -256,23 +262,17 @@ def add(self, opt, val):
'enable-purify',
'enable-quantify',
'enable-nls',
'enable-bdb-in-apr-util',
'enable-ml',
'disable-shared',
'installed-libs=',
'vsnet-version=',
# Keep distributions that help by adding a path
# working. On unix this would be filtered by
# configure, but on Windows gen-make.py is used
# directly.
'with-neon=',
'without-neon',
'disable-gmock',
])
if len(args) > 1:
_usage_exit("Too many arguments")
except getopt.GetoptError, e:
_usage_exit(str(e))
except getopt.GetoptError:
typ, val, tb = sys.exc_info()
msg = ''.join(traceback.format_exception_only(typ, val))
_usage_exit(msg)
conf = 'build.conf'
skip = 0
@ -306,9 +306,12 @@ def add(self, opt, val):
gentype = val
else:
if opt == '--with-httpd':
rest.add('--with-apr', os.path.join(val, 'srclib', 'apr'))
rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util'))
rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv'))
rest.add('--with-apr', os.path.join(val, 'srclib', 'apr'),
overwrite=False)
rest.add('--with-apr-util', os.path.join(val, 'srclib', 'apr-util'),
overwrite=False)
rest.add('--with-apr-iconv', os.path.join(val, 'srclib', 'apr-iconv'),
overwrite=False)
# Remember all options so that --reload and other scripts can use them
opt_conf = open('gen-make.opts', 'w')

View File

@ -36,7 +36,7 @@ APU_VERSION=${APU_VERSION:-"1.5.1"}
SERF_VERSION=${SERF_VERSION:-"1.3.8"}
ZLIB_VERSION=${ZLIB_VERSION:-"1.2.8"}
SQLITE_VERSION=${SQLITE_VERSION:-"3.7.15.1"}
GTEST_VERSION=${GTEST_VERSION:-"1.6.0"}
GMOCK_VERSION=${GMOCK_VERSION:-"1.6.0"}
HTTPD_VERSION=${HTTPD_VERSION:-"2.4.10"}
APR_ICONV_VERSION=${APR_ICONV_VERSION:-"1.2.1"}
@ -46,8 +46,8 @@ SERF=serf-${SERF_VERSION}
ZLIB=zlib-${ZLIB_VERSION}
SQLITE_VERSION_LIST=`echo $SQLITE_VERSION | sed -e 's/\./ /g'`
SQLITE=sqlite-amalgamation-`printf %d%02d%02d%02d $SQLITE_VERSION_LIST`
GTEST=gtest-${GTEST_VERSION}
GTEST_URL=http://googletest.googlecode.com/files/
GMOCK=gmock-${GMOCK_VERSION}
GMOCK_URL=https://googlemock.googlecode.com/files/
HTTPD=httpd-${HTTPD_VERSION}
APR_ICONV=apr-iconv-${APR_ICONV_VERSION}
@ -67,7 +67,7 @@ APACHE_MIRROR=http://archive.apache.org/dist
# helpers
usage() {
echo "Usage: $0"
echo "Usage: $0 [ apr | serf | zlib | sqlite | gtest ] ..."
echo "Usage: $0 [ apr | serf | zlib | sqlite | gmock ] ..."
exit $1
}
@ -122,23 +122,24 @@ get_sqlite() {
}
get_gtest() {
test -d $BASEDIR/gtest && return
get_gmock() {
test -d $BASEDIR/gmock-fused && return
cd $TEMPDIR
$HTTP_FETCH ${GTEST_URL}/${GTEST}.zip
$HTTP_FETCH ${GMOCK_URL}/${GMOCK}.zip
cd $BASEDIR
unzip -q $TEMPDIR/$GTEST.zip
unzip -q $TEMPDIR/$GMOCK.zip
mv $GTEST gtest
mv $GMOCK/fused-src gmock-fused
rm -fr $GMOCK
}
# main()
get_deps() {
mkdir -p $TEMPDIR
for i in zlib serf sqlite-amalgamation apr apr-util gtest; do
for i in zlib serf sqlite-amalgamation apr apr-util gmock-fused; do
if [ -d $i ]; then
echo "Local directory '$i' already exists; the downloaded copy won't be used" >&2
fi

View File

@ -40,7 +40,7 @@ extern "C" {
/**
Given an apache request @a r, a @a uri, and a @a root_path to the svn
location block, process @a uri and return many things, allocated in
@a r->pool:
@a pool:
- @a cleaned_uri: The uri with duplicate and trailing slashes removed.
@ -74,7 +74,25 @@ extern "C" {
- @a relative_path: /!svn/blah/13/A/B/alpha
- @a repos_path: A/B/alpha
- @a trailing_slash: FALSE
NOTE: The returned dav_error will be also allocated in @a pool, not
in @a r->pool.
@since New in 1.9
*/
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri2(request_rec *r,
const char *uri_to_split,
const char *root_path,
const char **cleaned_uri,
int *trailing_slash,
const char **repos_basename,
const char **relative_path,
const char **repos_path,
apr_pool_t *pool);
/**
* Same as dav_svn_split_uri2() but allocates the result in @a r->pool.
*/
AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
const char *uri,
const char *root_path,
@ -87,7 +105,22 @@ AP_MODULE_DECLARE(dav_error *) dav_svn_split_uri(request_rec *r,
/**
* Given an apache request @a r and a @a root_path to the svn location
* block, set @a *repos_path to the path of the repository on disk. */
* block, set @a *repos_path to the path of the repository on disk.
* Perform all allocations in @a pool.
*
* NOTE: The returned dav_error will be also allocated in @a pool, not
* in @a r->pool.
*
* @since New in 1.9
*/
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path2(request_rec *r,
const char *root_path,
const char **repos_path,
apr_pool_t *pool);
/**
* Same as dav_svn_get_repos_path2() but allocates the result in@a r->pool.
*/
AP_MODULE_DECLARE(dav_error *) dav_svn_get_repos_path(request_rec *r,
const char *root_path,
const char **repos_path);

View File

@ -46,39 +46,19 @@ extern "C" {
*/
/** The type used by all the other atomic operations. */
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_t apr_uint32_t
#else
#define svn_atomic_t apr_atomic_t
#endif
/** Atomically read an #svn_atomic_t from memory. */
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_read(mem) apr_atomic_read32((mem))
#else
#define svn_atomic_read(mem) apr_atomic_read((mem))
#endif
/** Atomically set an #svn_atomic_t in memory. */
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_set(mem, val) apr_atomic_set32((mem), (val))
#else
#define svn_atomic_set(mem, val) apr_atomic_set((mem), (val))
#endif
/** Atomically increment an #svn_atomic_t. */
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_inc(mem) apr_atomic_inc32(mem)
#else
#define svn_atomic_inc(mem) apr_atomic_inc(mem)
#endif
/** Atomically decrement an #svn_atomic_t. */
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_dec(mem) apr_atomic_dec32(mem)
#else
#define svn_atomic_dec(mem) apr_atomic_dec(mem)
#endif
/**
* Atomic compare-and-swap.
@ -91,13 +71,8 @@ extern "C" {
* that on some platforms, the CAS function is implemented in a
* way that is incompatible with the other atomic operations.
*/
#if APR_VERSION_AT_LEAST(1, 0, 0)
#define svn_atomic_cas(mem, with, cmp) \
apr_atomic_cas32((mem), (with), (cmp))
#else
#define svn_atomic_cas(mem, with, cmp) \
apr_atomic_cas((mem), (with), (cmp))
#endif
/** @} */
/**

View File

@ -231,6 +231,16 @@ svn_auth__ssl_client_cert_pw_set(svn_boolean_t *done,
svn_boolean_t non_interactive,
apr_pool_t *pool);
/* Apply the specified configuration for connecting with SERVER_NAME
to the auth baton */
svn_error_t *
svn_auth__make_session_auth(svn_auth_baton_t **session_auth_baton,
const svn_auth_baton_t *auth_baton,
apr_hash_t *config,
const char *server_name,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN)
/**
* Set @a *provider to an authentication provider that implements

View File

@ -173,6 +173,12 @@ typedef struct svn_cache__info_t
* May be 0 if that information is not available.
*/
apr_uint64_t total_entries;
/** Number of index buckets with the given number of entries.
* Bucket sizes larger than the array will saturate into the
* highest array index.
*/
apr_uint64_t histogram[32];
} svn_cache__info_t;
/**
@ -251,7 +257,8 @@ svn_cache__create_memcache(svn_cache__t **cache_p,
* Given @a config, returns an APR memcached interface in @a
* *memcache_p allocated in @a result_pool if @a config contains entries in
* the SVN_CACHE_CONFIG_CATEGORY_MEMCACHED_SERVERS section describing
* memcached servers; otherwise, sets @a *memcache_p to NULL.
* memcached servers; otherwise, sets @a *memcache_p to NULL. Use
* @a scratch_pool for temporary allocations.
*
* If Subversion was not built with apr_memcache_support, then raises
* SVN_ERR_NO_APR_MEMCACHE if and only if @a config is configured to
@ -260,7 +267,8 @@ svn_cache__create_memcache(svn_cache__t **cache_p,
svn_error_t *
svn_cache__make_memcache_from_config(svn_memcache_t **memcache_p,
svn_config_t *config,
apr_pool_t *result_pool);
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Creates a new membuffer cache object in @a *cache. It will contain
@ -302,6 +310,33 @@ svn_cache__membuffer_cache_create(svn_membuffer_t **cache,
svn_boolean_t allow_blocking_writes,
apr_pool_t *result_pool);
/**
* @defgroup Standard priority classes for #svn_cache__create_membuffer_cache.
* @{
*/
/**
* Data in this priority class should not be removed from the cache unless
* absolutely necessary. Use of this should be very restricted.
*/
#define SVN_CACHE__MEMBUFFER_HIGH_PRIORITY 10000
/**
* Data in this priority class has a good chance to remain in cache unless
* there is more data in this class than the cache's capacity. Use of this
* as the default for all information that is costly to fetch from disk.
*/
#define SVN_CACHE__MEMBUFFER_DEFAULT_PRIORITY 1000
/**
* Data in this priority class will be removed as soon as the cache starts
* filling up. Use of this for ephemeral data that can easily be acquired
* again from other sources.
*/
#define SVN_CACHE__MEMBUFFER_LOW_PRIORITY 100
/** @} */
/**
* Creates a new cache in @a *cache_p, storing the data in a potentially
* shared @a membuffer object. The elements in the cache will be indexed
@ -310,7 +345,10 @@ svn_cache__membuffer_cache_create(svn_membuffer_t **cache,
* serialize_func and deserialized using @a deserialize_func. Because
* the same memcache object may cache many different kinds of values
* form multiple caches, @a prefix should be specified to differentiate
* this cache from other caches. @a *cache_p will be allocated in @a result_pool.
* this cache from other caches. All entries written through this cache
* interface will be assigned into the given @a priority class. @a *cache_p
* will be allocated in @a result_pool. @a scratch_pool is used for
* temporary allocations.
*
* If @a deserialize_func is NULL, then the data is returned as an
* svn_stringbuf_t; if @a serialize_func is NULL, then the data is
@ -329,8 +367,10 @@ svn_cache__create_membuffer_cache(svn_cache__t **cache_p,
svn_cache__deserialize_func_t deserialize,
apr_ssize_t klen,
const char *prefix,
apr_uint32_t priority,
svn_boolean_t thread_safe,
apr_pool_t *result_pool);
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Sets @a handler to be @a cache's error handling routine. If any
@ -374,6 +414,18 @@ svn_cache__get(void **value,
const void *key,
apr_pool_t *result_pool);
/**
* Looks for an entry indexed by @a key in @a cache, setting @a *found
* to TRUE if an entry has been found and FALSE otherwise. @a key may be
* NULL in which case @a *found will be FALSE. Temporary allocations will
* be made from @a scratch_pool.
*/
svn_error_t *
svn_cache__has_key(svn_boolean_t *found,
svn_cache__t *cache,
const void *key,
apr_pool_t *scratch_pool);
/**
* Stores the value @a value under the key @a key in @a cache. Uses @a
* scratch_pool for temporary allocations. The cache makes copies of
@ -465,13 +517,16 @@ svn_cache__get_info(svn_cache__t *cache,
/**
* Return the information given in @a info formatted as a multi-line string.
* Allocations take place in @a result_pool.
* If @a access_only has been set, size and fill-level statistics will be
* omitted. Allocations take place in @a result_pool.
*/
svn_string_t *
svn_cache__format_info(const svn_cache__info_t *info,
svn_boolean_t access_only,
apr_pool_t *result_pool);
/* Access the process-global (singleton) membuffer cache. The first call
/**
* Access the process-global (singleton) membuffer cache. The first call
* will automatically allocate the cache using the current cache config.
* NULL will be returned if the desired cache size is 0.
*
@ -480,6 +535,22 @@ svn_cache__format_info(const svn_cache__info_t *info,
struct svn_membuffer_t *
svn_cache__get_global_membuffer_cache(void);
/**
* Return total access and size stats over all membuffer caches as they
* share the underlying data buffer. The result will be allocated in POOL.
*/
svn_cache__info_t *
svn_cache__membuffer_get_global_info(apr_pool_t *pool);
/**
* Remove all current contents from CACHE.
*
* NOTE: In a multi-threaded environment, new contents may have been put
* into the cache by the time this function returns.
*/
svn_error_t *
svn_cache__membuffer_clear(svn_membuffer_t *cache);
/** @} */

View File

@ -0,0 +1,226 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_client_mtcc.h
* @brief Subversion multicommand client support
*
* Requires: The working copy library and client library.
* Provides: High level multicommand api.
* Used By: Client programs, svnmucc.
*/
#ifndef SVN_CLIENT_MTCC_H
#define SVN_CLIENT_MTCC_H
#include "svn_client.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
*
* @defgroup clnt_mtcc Multi Command Context related functions
*
* @{
*
*/
/** This is a structure which stores a list of repository commands
* that can be played to a repository as a single operation
*
* Use svn_client__mtcc_create() to create instances
*
* @since New in 1.9.
*/
typedef struct svn_client__mtcc_t svn_client__mtcc_t;
/** Creates a new multicommand context for an operation on @a anchor_url and
* its descendants.
*
* Allocate the context in @a result_pool and perform temporary allocations in
* @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_create(svn_client__mtcc_t **mtcc,
const char *anchor_url,
svn_revnum_t base_revision,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** Adds a file add operation of @a relpath to @a mtcc. If @a src_checksum
* is not null it will be provided to the repository to verify if the file
* was transferred successfully.
*
* Perform temporary allocations in @a scratch_pool.
*
* @note The current implementation keeps @a src_stream open until @a mtcc
* is committed.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_add_file(const char *relpath,
svn_stream_t *src_stream,
const svn_checksum_t *src_checksum,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds a copy operation of the node @a src_relpath at revision @a revision
* to @a dst_relpath to @a mtcc.
*
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_copy(const char *src_relpath,
svn_revnum_t revision,
const char *dst_relpath,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds a delete of @a relpath to @a mtcc.
*
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_delete(const char *relpath,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds an mkdir operation of @a relpath to @a mtcc.
*
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_mkdir(const char *relpath,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds a move operation of the node @a src_relpath to @a dst_relpath to
* @a mtcc.
*
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_move(const char *src_relpath,
const char *dst_relpath,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds a propset operation for the property @a propname to @a propval
* (which can be NULL for a delete) on @a relpath to @a mtcc.
*
* If @a skip_checks is not FALSE Subversion defined properties are verified
* for correctness like svn_client_propset_remote()
*
* Perform temporary allocations in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_propset(const char *relpath,
const char *propname,
const svn_string_t *propval,
svn_boolean_t skip_checks,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Adds an update file operation for @a relpath to @a mtcc.
*
* The final version of the file is provided with @a src_stream. If @a
* src_checksum is provided it will be provided to the repository to verify
* the final result.
*
* If @a base_checksum is provided it will be used by the repository to verify
* if the base file matches this checksum.
*
* If @a base_stream is not NULL only the binary diff from @a base_stream to
* @a src_stream is written to the repository.
*
* Perform temporary allocations in @a scratch_pool.
*
* @note Callers should assume that the mtcc requires @a src_stream and @a
* base_stream to be valid until @a mtcc is committed.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_add_update_file(const char *relpath,
svn_stream_t *src_stream,
const svn_checksum_t *src_checksum,
svn_stream_t *base_stream,
const svn_checksum_t *base_checksum,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Obtains the kind of node at @a relpath in the current state of @a mtcc.
* This value might be from the cache (in case of modifications, copies)
* or fetched from the repository.
*
* If @a check_repository is TRUE, verify the node type with the repository at
* least once and cache the result for further checks.
*
* When a node does not exist this functions sets @a *kind to @c svn_node_node.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_check_path(svn_node_kind_t *kind,
const char *relpath,
svn_boolean_t check_repository,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** Commits all operations stored in @a mtcc as a new revision and destroys
* @a mtcc.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client__mtcc_commit(apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
void *commit_baton,
svn_client__mtcc_t *mtcc,
apr_pool_t *scratch_pool);
/** @} end group: Multi Command Context related functions */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_CLIENT_MTCC_H */

View File

@ -33,11 +33,58 @@
#include "svn_client.h"
#include "svn_types.h"
#include "private/svn_diff_tree.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Set *REVNUM to the revision number identified by REVISION.
If REVISION->kind is svn_opt_revision_number, just use
REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
Else if REVISION->kind is svn_opt_revision_committed,
svn_opt_revision_previous, or svn_opt_revision_base, or
svn_opt_revision_working, then the revision can be identified
purely based on the working copy's administrative information for
LOCAL_ABSPATH, so RA_SESSION is ignored. If LOCAL_ABSPATH is not
under revision control, return SVN_ERR_UNVERSIONED_RESOURCE, or if
LOCAL_ABSPATH is null, return SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED.
Else if REVISION->kind is svn_opt_revision_date or
svn_opt_revision_head, then RA_SESSION is used to retrieve the
revision from the repository (using REVISION->value.date in the
former case), and LOCAL_ABSPATH is ignored. If RA_SESSION is null,
return SVN_ERR_CLIENT_RA_ACCESS_REQUIRED.
Else if REVISION->kind is svn_opt_revision_unspecified, set
*REVNUM to SVN_INVALID_REVNUM.
If YOUNGEST_REV is non-NULL, it is an in/out parameter. If
*YOUNGEST_REV is valid, use it as the youngest revision in the
repository (regardless of reality) -- don't bother to lookup the
true value for HEAD, and don't return any value in *REVNUM greater
than *YOUNGEST_REV. If *YOUNGEST_REV is not valid, and a HEAD
lookup is required to populate *REVNUM, then also populate
*YOUNGEST_REV with the result. This is useful for making multiple
serialized calls to this function with a basically static view of
the repository, avoiding race conditions which could occur between
multiple invocations with HEAD lookup requests.
Else return SVN_ERR_CLIENT_BAD_REVISION.
Use SCRATCH_POOL for any temporary allocation. */
svn_error_t *
svn_client__get_revision_number(svn_revnum_t *revnum,
svn_revnum_t *youngest_rev,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_ra_session_t *ra_session,
const svn_opt_revision_t *revision,
apr_pool_t *scratch_pool);
/* Return true if KIND is a revision kind that is dependent on the working
* copy. Otherwise, return false. */
#define SVN_CLIENT__REVKIND_NEEDS_WC(kind) \
@ -200,29 +247,6 @@ svn_client__create_status(svn_client_status_t **cst,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Set *ANCESTOR_URL and *ANCESTOR_REVISION to the URL and revision,
* respectively, of the youngest common ancestor of the two locations
* PATH_OR_URL1@REV1 and PATH_OR_URL2@REV2. Set *ANCESTOR_RELPATH to
* NULL and *ANCESTOR_REVISION to SVN_INVALID_REVNUM if they have no
* common ancestor. This function assumes that PATH_OR_URL1@REV1 and
* PATH_OR_URL2@REV2 both refer to the same repository.
*
* Use the authentication baton cached in CTX to authenticate against
* the repository.
*
* See also svn_client__get_youngest_common_ancestor().
*/
svn_error_t *
svn_client__youngest_common_ancestor(const char **ancestor_url,
svn_revnum_t *ancestor_rev,
const char *path_or_url1,
const svn_opt_revision_t *revision1,
const char *path_or_url2,
const svn_opt_revision_t *revision2,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Get the repository location of the base node at LOCAL_ABSPATH.
*
* A pathrev_t wrapper around svn_wc__node_get_base().
@ -257,20 +281,6 @@ svn_client__wc_node_get_origin(svn_client__pathrev_t **origin_p,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Produce a diff with depth DEPTH between two files or two directories at
* LOCAL_ABSPATH1 and LOCAL_ABSPATH2, using the provided diff callbacks to
* show changes in files. The files and directories involved may be part of
* a working copy or they may be unversioned. For versioned files, show
* property changes, too. */
svn_error_t *
svn_client__arbitrary_nodes_diff(const char *local_abspath1,
const char *local_abspath2,
svn_depth_t depth,
const svn_wc_diff_callbacks4_t *callbacks,
void *callback_baton,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/* Copy the file or directory on URL in some repository to DST_ABSPATH,
* copying node information and properties. Resolve URL using PEG_REV and
* REVISION.

View File

@ -88,11 +88,15 @@ typedef struct svn_cmdline__config_argument_t
* containing svn_cmdline__config_argument_t* elements, allocating the option
* data in @a pool
*
* [Since 1.9/1.10:] If the file, section, or option value is not recognized,
* warn to @c stderr, using @a prefix as in svn_handle_warning2().
*
* @since New in 1.7.
*/
svn_error_t *
svn_cmdline__parse_config_option(apr_array_header_t *config_options,
const char *opt_arg,
const char *prefix,
apr_pool_t *pool);
/** Sets the config options in @a config_options, an apr array containing
@ -220,6 +224,20 @@ svn_boolean_t
svn_cmdline__be_interactive(svn_boolean_t non_interactive,
svn_boolean_t force_interactive);
/* Parses the argument value of '--trust-server-cert-failures' OPT_ARG into
* the expected booleans for passing to svn_cmdline_create_auth_baton2()
*
* @since New in 1.9.
*/
svn_error_t *
svn_cmdline__parse_trust_options(
svn_boolean_t *trust_server_cert_unknown_ca,
svn_boolean_t *trust_server_cert_cn_mismatch,
svn_boolean_t *trust_server_cert_expired,
svn_boolean_t *trust_server_cert_not_yet_valid,
svn_boolean_t *trust_server_cert_other_failure,
const char *opt_arg,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}

View File

@ -101,25 +101,12 @@ svn_delta__delta_from_editor(const svn_delta_editor_t **deditor,
struct svn_delta__extra_baton *exb,
apr_pool_t *pool);
/**
* Get the data from IN, compress it according to the specified
* COMPRESSION_LEVEL and write the result to OUT.
* SVN_DELTA_COMPRESSION_LEVEL_NONE is valid for COMPRESSION_LEVEL.
*/
/** Read the txdelta window header from @a stream and return the total
length of the unparsed window data in @a *window_len. */
svn_error_t *
svn__compress(svn_string_t *in,
svn_stringbuf_t *out,
int compression_level);
/**
* Get the compressed data from IN, decompress it and write the result to
* OUT. Return an error if the decompressed size is larger than LIMIT.
*/
svn_error_t *
svn__decompress(svn_string_t *in,
svn_stringbuf_t *out,
apr_size_t limit);
svn_txdelta__read_raw_window_len(apr_size_t *window_len,
svn_stream_t *stream,
apr_pool_t *pool);
#ifdef __cplusplus
}

View File

@ -20,7 +20,7 @@
* ====================================================================
* @endcopyright
*
* @file svn_compat.h
* @file svn_dep_compat.h
* @brief Compatibility macros and functions.
* @since New in 1.5.0.
*/
@ -35,71 +35,30 @@ extern "C" {
#endif /* __cplusplus */
/**
* Check at compile time if the APR version is at least a certain
* level.
* @param major The major version component of the version checked
* for (e.g., the "1" of "1.3.0").
* @param minor The minor version component of the version checked
* for (e.g., the "3" of "1.3.0").
* @param patch The patch level component of the version checked
* for (e.g., the "0" of "1.3.0").
* We assume that 'int' and 'unsigned' are at least 32 bits wide.
* This also implies that long (rev numbers) is 32 bits or wider.
*
* @since New in 1.5.
* @since New in 1.9.
*/
#ifndef APR_VERSION_AT_LEAST /* Introduced in APR 1.3.0 */
#define APR_VERSION_AT_LEAST(major,minor,patch) \
(((major) < APR_MAJOR_VERSION) \
|| ((major) == APR_MAJOR_VERSION && (minor) < APR_MINOR_VERSION) \
|| ((major) == APR_MAJOR_VERSION && (minor) == APR_MINOR_VERSION && \
(patch) <= APR_PATCH_VERSION))
#endif /* APR_VERSION_AT_LEAST */
#if defined(APR_HAVE_LIMITS_H) \
&& !defined(SVN_ALLOW_SHORT_INTS) \
&& (INT_MAX < 0x7FFFFFFFl)
#error int is shorter than 32 bits and may break Subversion. Define SVN_ALLOW_SHORT_INTS to skip this check.
#endif
/**
* If we don't have a recent enough APR, emulate the behavior of the
* apr_array_clear() API.
* We assume that 'char' is 8 bits wide. The critical interfaces are
* our repository formats and RA encodings. E.g. a 32 bit wide char may
* mess up UTF8 parsing, how we interpret size values etc.
*
* @since New in 1.9.
*/
#if !APR_VERSION_AT_LEAST(1,3,0)
#define apr_array_clear(arr) (arr)->nelts = 0
#if defined(CHAR_BIT) \
&& !defined(SVN_ALLOW_NON_8_BIT_CHARS) \
&& (CHAR_BIT != 8)
#error char is not 8 bits and may break Subversion. Define SVN_ALLOW_NON_8_BIT_CHARS to skip this check.
#endif
#if !APR_VERSION_AT_LEAST(1,3,0)
/* Equivalent to the apr_hash_clear() function in APR >= 1.3.0. Used to
* implement the 'apr_hash_clear' macro if the version of APR that
* we build against does not provide the apr_hash_clear() function. */
void svn_hash__clear(struct apr_hash_t *ht);
/**
* If we don't have a recent enough APR, emulate the behavior of the
* apr_hash_clear() API.
*/
#define apr_hash_clear(ht) svn_hash__clear(ht)
#endif
#if !APR_VERSION_AT_LEAST(1,0,0)
#define APR_UINT64_C(val) UINT64_C(val)
#define APR_FPROT_OS_DEFAULT APR_OS_DEFAULT
#define apr_hash_make_custom(pool,hash_func) apr_hash_make(pool)
#endif
#if !APR_VERSION_AT_LEAST(1,3,0)
#define APR_UINT16_MAX 0xFFFFU
#define APR_INT16_MAX 0x7FFF
#define APR_INT16_MIN (-APR_INT16_MAX-1)
#define APR_UINT32_MAX 0xFFFFFFFFU
#define APR_INT32_MAX 0x7FFFFFFF
#define APR_INT32_MIN (-APR_INT32_MAX-1)
#define APR_UINT64_MAX APR_UINT64_C(0xFFFFFFFFFFFFFFFF)
#define APR_INT64_MAX APR_INT64_C(0x7FFFFFFFFFFFFFFF)
#define APR_INT64_MIN (-APR_INT64_MAX-1)
#define APR_SIZE_MAX (~(apr_size_t)0)
#if APR_SIZEOF_VOIDP == 8
typedef apr_uint64_t apr_uintptr_t;
#else
typedef apr_uint32_t apr_uintptr_t;
#endif
#endif /* !APR_VERSION_AT_LEAST(1,3,0) */
/**
* Work around a platform dependency issue. apr_thread_rwlock_trywrlock()
* will make APR_STATUS_IS_EBUSY() return TRUE if the lock could not be
@ -115,6 +74,19 @@ typedef apr_uint32_t apr_uintptr_t;
#define SVN_LOCK_IS_BUSY(x) APR_STATUS_IS_EBUSY(x)
#endif
/**
* APR keeps a few interesting defines hidden away in its private
* headers apr_arch_file_io.h, so we redefined them here.
*
* @since New in 1.9
*/
#ifndef APR_FREADONLY
#define APR_FREADONLY 0x10000000
#endif
#ifndef APR_OPENINFO
#define APR_OPENINFO 0x00100000
#endif
#if !APR_VERSION_AT_LEAST(1,4,0)
#ifndef apr_time_from_msec
#define apr_time_from_msec(msec) ((apr_time_t)(msec) * 1000)

View File

@ -97,6 +97,9 @@ svn_diff__unidiff_write_header(svn_stream_t *output_stream,
* merged or reverse merged; otherwise (or if the mergeinfo property values
* don't parse correctly) display them just like any other property.
*
* Pass @a context_size, @a cancel_func and @a cancel_baton to the diff
* output functions.
*
* Use @a scratch_pool for temporary allocations.
*/
svn_error_t *
@ -105,6 +108,9 @@ svn_diff__display_prop_diffs(svn_stream_t *outstream,
const apr_array_header_t *propchanges,
apr_hash_t *original_props,
svn_boolean_t pretty_print_mergeinfo,
int context_size,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);

View File

@ -103,18 +103,22 @@ extern "C" {
* Note that it is possible for nodes to be described as a delete followed by
* an add at the same place within one parent. (Iff the diff is reversed you
* can see an add followed by a delete!)
* ### "An add followed by a delete" sounds wrong.
*
* The directory batons live between the open and close events of a directory
* and are thereby guaranteed to outlive the batons of their descendants.
*/
/* Describes the source of a merge */
/* ### You mean a diff?
* ### How come many users don't set the 'repos_relpath' field? */
typedef struct svn_diff_source_t
{
/* Always available */
svn_revnum_t revision;
/* Depending on the driver available for copyfrom */
/* ### What? */
const char *repos_relpath;
} svn_diff_source_t;
@ -137,9 +141,10 @@ typedef struct svn_diff_tree_processor_t
{
/** The value passed to svn_diff__tree_processor_create() as BATON.
*/
void *baton; /* To avoid an additional in some places */
void *baton; /* To avoid an additional in some places
* ### What? */
/* Called before a directories children are processed.
/* Called before a directory's children are processed.
*
* Set *SKIP_CHILDREN to TRUE, to skip calling callbacks for all
* children.
@ -319,7 +324,7 @@ svn_diff__tree_processor_filter_create(const svn_diff_tree_processor_t *processo
apr_pool_t *result_pool);
/**
* Create a new svn_diff_tree_processor_t instace with all function setup
* Create a new svn_diff_tree_processor_t instance with all function setup
* to call into processor with all adds with copyfrom information transformed
* to simple node changes.
*

View File

@ -270,7 +270,6 @@ svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
* svn_editor_setcb_delete() \n
* svn_editor_setcb_copy() \n
* svn_editor_setcb_move() \n
* svn_editor_setcb_rotate() \n
* svn_editor_setcb_complete() \n
* svn_editor_setcb_abort()
*
@ -293,7 +292,6 @@ svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
* svn_editor_delete() \n
* svn_editor_copy() \n
* svn_editor_move() \n
* svn_editor_rotate()
* \n\n
* Just before each callback invocation is carried out, the @a cancel_func
* that was passed to svn_editor_create() is invoked to poll any
@ -325,7 +323,7 @@ svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
* In order to reduce complexity of callback receivers, the editor callbacks
* must be driven in adherence to these rules:
*
* - If any path is added (with add_*) or deleted/moved/rotated, then
* - If any path is added (with add_*) or deleted/moved, then
* an svn_editor_alter_directory() call must be made for its parent
* directory with the target/eventual set of children.
*
@ -344,15 +342,13 @@ svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
* its children, if a directory) may be copied many times, and are
* otherwise subject to the Once Rule. The destination path of a copy
* or move may have alter_* operations applied, but not add_* or delete.
* If the destination path of a copy, move, or rotate is a directory,
* If the destination path of a copy or move is a directory,
* then its children are subject to the Once Rule. The source path of
* a move (and its child paths) may be referenced in add_*, or as the
* destination of a copy (where these new or copied nodes are subject
* to the Once Rule). Paths listed in a rotation are both sources and
* destinations, so they may not be referenced again in an add_* or a
* deletion; these paths may have alter_* operations applied.
* to the Once Rule).
*
* - The ancestor of an added, copied-here, moved-here, rotated, or
* - The ancestor of an added, copied-here, moved-here, or
* modified node may not be deleted. The ancestor may not be moved
* (instead: perform the move, *then* the edits).
*
@ -375,10 +371,6 @@ svn_delta_shim_callbacks_default(apr_pool_t *result_pool);
* by a delete... that is fine. It is simply that svn_editor_move()
* should be used to describe a semantic move.
*
* - Paths mentioned in svn_editor_rotate() may have their properties
* and contents edited (via alter_* calls) by a previous or later call,
* but they may not be subject to a later move, rotate, or deletion.
*
* - One of svn_editor_complete() or svn_editor_abort() must be called
* exactly once, which must be the final call the driver invokes.
* Invoking svn_editor_complete() must imply that the set of changes has
@ -573,9 +565,9 @@ typedef svn_error_t *(*svn_editor_cb_alter_file_t)(
void *baton,
const char *relpath,
svn_revnum_t revision,
apr_hash_t *props,
const svn_checksum_t *checksum,
svn_stream_t *contents,
apr_hash_t *props,
apr_pool_t *scratch_pool);
/** @see svn_editor_alter_symlink(), svn_editor_t.
@ -585,8 +577,8 @@ typedef svn_error_t *(*svn_editor_cb_alter_symlink_t)(
void *baton,
const char *relpath,
svn_revnum_t revision,
apr_hash_t *props,
const char *target,
apr_hash_t *props,
apr_pool_t *scratch_pool);
/** @see svn_editor_delete(), svn_editor_t.
@ -620,15 +612,6 @@ typedef svn_error_t *(*svn_editor_cb_move_t)(
svn_revnum_t replaces_rev,
apr_pool_t *scratch_pool);
/** @see svn_editor_rotate(), svn_editor_t.
* @since New in 1.8.
*/
typedef svn_error_t *(*svn_editor_cb_rotate_t)(
void *baton,
const apr_array_header_t *relpaths,
const apr_array_header_t *revisions,
apr_pool_t *scratch_pool);
/** @see svn_editor_complete(), svn_editor_t.
* @since New in 1.8.
*/
@ -790,17 +773,6 @@ svn_editor_setcb_move(svn_editor_t *editor,
svn_editor_cb_move_t callback,
apr_pool_t *scratch_pool);
/** Sets the #svn_editor_cb_rotate_t callback in @a editor
* to @a callback.
* @a scratch_pool is used for temporary allocations (if any).
* @see also svn_editor_setcb_many().
* @since New in 1.8.
*/
svn_error_t *
svn_editor_setcb_rotate(svn_editor_t *editor,
svn_editor_cb_rotate_t callback,
apr_pool_t *scratch_pool);
/** Sets the #svn_editor_cb_complete_t callback in @a editor
* to @a callback.
* @a scratch_pool is used for temporary allocations (if any).
@ -841,7 +813,6 @@ typedef struct svn_editor_cb_many_t
svn_editor_cb_delete_t cb_delete;
svn_editor_cb_copy_t cb_copy;
svn_editor_cb_move_t cb_move;
svn_editor_cb_rotate_t cb_rotate;
svn_editor_cb_complete_t cb_complete;
svn_editor_cb_abort_t cb_abort;
@ -1020,9 +991,9 @@ svn_error_t *
svn_editor_alter_file(svn_editor_t *editor,
const char *relpath,
svn_revnum_t revision,
apr_hash_t *props,
const svn_checksum_t *checksum,
svn_stream_t *contents);
svn_stream_t *contents,
apr_hash_t *props);
/** Drive @a editor's #svn_editor_cb_alter_symlink_t callback.
*
@ -1047,8 +1018,8 @@ svn_error_t *
svn_editor_alter_symlink(svn_editor_t *editor,
const char *relpath,
svn_revnum_t revision,
apr_hash_t *props,
const char *target);
const char *target,
apr_hash_t *props);
/** Drive @a editor's #svn_editor_cb_delete_t callback.
*
@ -1093,7 +1064,7 @@ svn_editor_copy(svn_editor_t *editor,
* expect to find this node. That is, @a src_relpath at the start of
* the whole edit and @a src_relpath at @a src_revision must lie within
* the same node-rev (aka history-segment). This is just like the
* revisions specified to svn_editor_delete() and svn_editor_rotate().
* revisions specified to svn_editor_delete().
*
* For a description of @a replaces_rev, see svn_editor_add_file().
*
@ -1110,36 +1081,6 @@ svn_editor_move(svn_editor_t *editor,
const char *dst_relpath,
svn_revnum_t replaces_rev);
/** Drive @a editor's #svn_editor_cb_rotate_t callback.
*
* Perform a rotation among multiple nodes in the target tree.
*
* The @a relpaths and @a revisions arrays (pair-wise) specify nodes in the
* tree which are located at a path and expected to be at a specific
* revision. These nodes are simultaneously moved in a rotation pattern.
* For example, the node at index 0 of @a relpaths and @a revisions will
* be moved to the relpath specified at index 1 of @a relpaths. The node
* at index 1 will be moved to the location at index 2. The node at index
* N-1 will be moved to the relpath specified at index 0.
*
* The simplest form of this operation is to swap nodes A and B. One may
* think to move A to a temporary location T, then move B to A, then move
* T to B. However, this last move violations the Once Rule by moving T
* (which had already by edited by the move from A). In order to keep the
* restrictions against multiple moves of a single node, the rotation
* operation is needed for certain types of tree edits.
*
* ### what happens if one of the paths of the rotation is not "within" the
* ### receiver's set of paths?
*
* For all restrictions on driving the editor, see #svn_editor_t.
* @since New in 1.8.
*/
svn_error_t *
svn_editor_rotate(svn_editor_t *editor,
const apr_array_header_t *relpaths,
const apr_array_header_t *revisions);
/** Drive @a editor's #svn_editor_cb_complete_t callback.
*
* Send word that the edit has been completed successfully.

View File

@ -37,7 +37,7 @@ extern "C" {
* Returns if @a err is a "tracing" error.
*/
svn_boolean_t
svn_error__is_tracing_link(svn_error_t *err);
svn_error__is_tracing_link(const svn_error_t *err);
/**
* Converts a zlib error to an svn_error_t. zerr is the error code,

View File

@ -0,0 +1,355 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_fs_fs_private.h
* @brief Private API for tools that access FSFS internals and can't use
* the svn_fs_t API for that.
*/
#ifndef SVN_FS_FS_PRIVATE_H
#define SVN_FS_FS_PRIVATE_H
#include <apr_pools.h>
#include <apr_hash.h>
#include "svn_types.h"
#include "svn_error.h"
#include "svn_fs.h"
#include "svn_iter.h"
#include "svn_config.h"
#include "svn_string.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Description of one large representation. It's content will be reused /
* overwritten when it gets replaced by an even larger representation.
*/
typedef struct svn_fs_fs__large_change_info_t
{
/* size of the (deltified) representation */
apr_uint64_t size;
/* Revision of the representation. SVN_INVALID_REVNUM for unused entries. */
svn_revnum_t revision;
/* node path. "" for unused instances */
svn_stringbuf_t *path;
} svn_fs_fs__large_change_info_t;
/* Container for the largest representations found so far. The capacity
* is fixed and entries will be inserted by reusing the last one and
* reshuffling the entry pointers.
*/
typedef struct svn_fs_fs__largest_changes_t
{
/* number of entries allocated in CHANGES */
apr_size_t count;
/* size of the smallest change */
apr_uint64_t min_size;
/* changes kept in this struct */
svn_fs_fs__large_change_info_t **changes;
} svn_fs_fs__largest_changes_t;
/* Information we gather per size bracket.
*/
typedef struct svn_fs_fs__histogram_line_t
{
/* number of item that fall into this bracket */
apr_uint64_t count;
/* sum of values in this bracket */
apr_uint64_t sum;
} svn_fs_fs__histogram_line_t;
/* A histogram of 64 bit integer values.
*/
typedef struct svn_fs_fs__histogram_t
{
/* total sum over all brackets */
svn_fs_fs__histogram_line_t total;
/* one bracket per binary step.
* line[i] is the 2^(i-1) <= x < 2^i bracket */
svn_fs_fs__histogram_line_t lines[64];
} svn_fs_fs__histogram_t;
/* Information we collect per file ending.
*/
typedef struct svn_fs_fs__extension_info_t
{
/* file extension, including leading "."
* "(none)" in the container for files w/o extension. */
const char *extension;
/* histogram of representation sizes */
svn_fs_fs__histogram_t rep_histogram;
/* histogram of sizes of changed files */
svn_fs_fs__histogram_t node_histogram;
} svn_fs_fs__extension_info_t;
/* Compression statistics we collect over a given set of representations.
*/
typedef struct svn_fs_fs__rep_pack_stats_t
{
/* number of representations */
apr_uint64_t count;
/* total size after deltification (i.e. on disk size) */
apr_uint64_t packed_size;
/* total size after de-deltification (i.e. plain text size) */
apr_uint64_t expanded_size;
/* total on-disk header size */
apr_uint64_t overhead_size;
} svn_fs_fs__rep_pack_stats_t;
/* Statistics we collect over a given set of representations.
* We group them into shared and non-shared ("unique") reps.
*/
typedef struct svn_fs_fs__representation_stats_t
{
/* stats over all representations */
svn_fs_fs__rep_pack_stats_t total;
/* stats over those representations with ref_count == 1 */
svn_fs_fs__rep_pack_stats_t uniques;
/* stats over those representations with ref_count > 1 */
svn_fs_fs__rep_pack_stats_t shared;
/* sum of all ref_counts */
apr_uint64_t references;
/* sum of ref_count * expanded_size,
* i.e. total plaintext content if there was no rep sharing */
apr_uint64_t expanded_size;
} svn_fs_fs__representation_stats_t;
/* Basic statistics we collect over a given set of noderevs.
*/
typedef struct svn_fs_fs__node_stats_t
{
/* number of noderev structs */
apr_uint64_t count;
/* their total size on disk (structs only) */
apr_uint64_t size;
} svn_fs_fs__node_stats_t;
/* Comprises all the information needed to create the output of the
* 'svnfsfs stats' command.
*/
typedef struct svn_fs_fs__stats_t
{
/* sum total of all rev / pack file sizes in bytes */
apr_uint64_t total_size;
/* number of revisions in the repository */
apr_uint64_t revision_count;
/* total number of changed paths */
apr_uint64_t change_count;
/* sum of all changed path list sizes on disk in bytes */
apr_uint64_t change_len;
/* stats on all representations */
svn_fs_fs__representation_stats_t total_rep_stats;
/* stats on all file text representations */
svn_fs_fs__representation_stats_t file_rep_stats;
/* stats on all directory text representations */
svn_fs_fs__representation_stats_t dir_rep_stats;
/* stats on all file prop representations */
svn_fs_fs__representation_stats_t file_prop_rep_stats;
/* stats on all directory prop representations */
svn_fs_fs__representation_stats_t dir_prop_rep_stats;
/* size and count summary over all noderevs */
svn_fs_fs__node_stats_t total_node_stats;
/* size and count summary over all file noderevs */
svn_fs_fs__node_stats_t file_node_stats;
/* size and count summary over all directory noderevs */
svn_fs_fs__node_stats_t dir_node_stats;
/* the biggest single contributors to repo size */
svn_fs_fs__largest_changes_t *largest_changes;
/* histogram of representation sizes */
svn_fs_fs__histogram_t rep_size_histogram;
/* histogram of sizes of changed nodes */
svn_fs_fs__histogram_t node_size_histogram;
/* histogram of representation sizes */
svn_fs_fs__histogram_t added_rep_size_histogram;
/* histogram of sizes of changed nodes */
svn_fs_fs__histogram_t added_node_size_histogram;
/* histogram of unused representations */
svn_fs_fs__histogram_t unused_rep_histogram;
/* histogram of sizes of changed files */
svn_fs_fs__histogram_t file_histogram;
/* histogram of sizes of file representations */
svn_fs_fs__histogram_t file_rep_histogram;
/* histogram of sizes of changed file property sets */
svn_fs_fs__histogram_t file_prop_histogram;
/* histogram of sizes of file property representations */
svn_fs_fs__histogram_t file_prop_rep_histogram;
/* histogram of sizes of changed directories (in bytes) */
svn_fs_fs__histogram_t dir_histogram;
/* histogram of sizes of directories representations */
svn_fs_fs__histogram_t dir_rep_histogram;
/* histogram of sizes of changed directories property sets */
svn_fs_fs__histogram_t dir_prop_histogram;
/* histogram of sizes of directories property representations */
svn_fs_fs__histogram_t dir_prop_rep_histogram;
/* extension -> svn_fs_fs__extension_info_t* map */
apr_hash_t *by_extension;
} svn_fs_fs__stats_t;
/* Scan all contents of the repository FS and return statistics in *STATS,
* allocated in RESULT_POOL. Report progress through PROGRESS_FUNC with
* PROGRESS_BATON, if PROGRESS_FUNC is not NULL.
* Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
svn_fs_fs__get_stats(svn_fs_fs__stats_t **stats,
svn_fs_t *fs,
svn_fs_progress_notify_func_t progress_func,
void *progress_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Node-revision IDs in FSFS consist of 3 of sub-IDs ("parts") that consist
* of a creation REVISION number and some revision- / transaction-local
* counter value (NUMBER). Old-style ID parts use global counter values.
*
* The parts are: node_id, copy_id and txn_id for in-txn IDs as well as
* node_id, copy_id and rev_offset for in-revision IDs. This struct the
* data structure used for each of those parts.
*/
typedef struct svn_fs_fs__id_part_t
{
/* SVN_INVALID_REVNUM for txns -> not a txn, COUNTER must be 0.
SVN_INVALID_REVNUM for others -> not assigned to a revision, yet.
0 for others -> old-style ID or the root in rev 0. */
svn_revnum_t revision;
/* sub-id value relative to REVISION. Its interpretation depends on
the part itself. In rev_item, it is the index_index value, in others
it represents a unique counter value. */
apr_uint64_t number;
} svn_fs_fs__id_part_t;
/* (user visible) entry in the phys-to-log index. It describes a section
* of some packed / non-packed rev file as containing a specific item.
* There must be no overlapping / conflicting entries.
*/
typedef struct svn_fs_fs__p2l_entry_t
{
/* offset of the first byte that belongs to the item */
apr_off_t offset;
/* length of the item in bytes */
apr_off_t size;
/* type of the item (see SVN_FS_FS__ITEM_TYPE_*) defines */
apr_uint32_t type;
/* modified FNV-1a checksum. 0 if unknown checksum */
apr_uint32_t fnv1_checksum;
/* item in that block */
svn_fs_fs__id_part_t item;
} svn_fs_fs__p2l_entry_t;
/* Callback function type receiving a single P2L index ENTRY, a user
* provided BATON and a SCRATCH_POOL for temporary allocations.
* ENTRY's lifetime may end when the callback returns.
*/
typedef svn_error_t *
(*svn_fs_fs__dump_index_func_t)(const svn_fs_fs__p2l_entry_t *entry,
void *baton,
apr_pool_t *scratch_pool);
/* Read the P2L index for the rev / pack file containing REVISION in FS.
* For each index entry, invoke CALLBACK_FUNC with CALLBACK_BATON.
* If not NULL, call CANCEL_FUNC with CANCEL_BATON from time to time.
* Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
svn_fs_fs__dump_index(svn_fs_t *fs,
svn_revnum_t revision,
svn_fs_fs__dump_index_func_t callback_func,
void *callback_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/* Rewrite the respective index information of the rev / pack file in FS
* containing REVISION and use the svn_fs_fs__p2l_entry_t * array ENTRIES
* as the new index contents. Allocate temporaries from SCRATCH_POOL.
*
* Note that this becomes a no-op if ENTRIES is empty. You may use a zero-
* sized empty entry instead.
*/
svn_error_t *
svn_fs_fs__load_index(svn_fs_t *fs,
svn_revnum_t revision,
apr_array_header_t *entries,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_FS_FS_PRIVATE_H */

View File

@ -179,6 +179,23 @@ svn_fs__editor_commit(svn_revnum_t *revision,
apr_pool_t *scratch_pool);
/** Set @a *mergeinfo to the mergeinfo for @a path in @a root.
*
* If there is no mergeinfo, set @a *mergeinfo to NULL.
*
* See svn_fs_get_mergeinfo2() but for the meanings of @a inherit and
* @a adjust_inheritable_mergeinfo and other details.
*/
svn_error_t *
svn_fs__get_mergeinfo_for_path(svn_mergeinfo_t *mergeinfo,
svn_fs_root_t *root,
const char *path,
svn_mergeinfo_inheritance_t inherit,
svn_boolean_t adjust_inherited_mergeinfo,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/** @} */

View File

@ -29,12 +29,17 @@
#include "svn_types.h"
#include "svn_error.h"
#include "svn_version.h"
#include "svn_fs.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* Get libsvn_fs_util version information. */
const svn_version_t *
svn_fs_util__version(void);
/* Returns whether PATH is in canonical form as defined by
svn_fs__canonicalize_abspath().
*/
@ -210,6 +215,26 @@ svn_fs__append_to_merged_froms(svn_mergeinfo_t *output,
const char *rel_path,
apr_pool_t *pool);
/* Given the FS creation options in CONFIG, return the oldest version that
we shall be compatible with in *COMPATIBLE_VERSION. The patch level
is always set to 0 and the tag to "". Allocate the result in POOL.
Note that the result will always be compatible to the current tool
version, i.e. will be a version number not more recent than this tool. */
svn_error_t *
svn_fs__compatible_version(svn_version_t **compatible_version,
apr_hash_t *config,
apr_pool_t *pool);
/* Compare the property lists A and B using POOL for temporary allocations.
Return true iff both lists contain the same properties with the same
values. A and B may be NULL in which case they will be equal to and
empty list. */
svn_boolean_t
svn_fs__prop_lists_equal(apr_hash_t *a,
apr_hash_t *b,
apr_pool_t *pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -44,6 +44,15 @@ extern "C" {
#define SVN__APR_FINFO_MASK_OUT (0)
#endif
/* 90% of the lines we encounter will be less than this many chars.
*
* Line-based functions like svn_stream_readline should fetch data in
* blocks no longer than this. Although using a larger prefetch size is
* not illegal and must not break any functionality, it may be
* significantly less efficient in certain situations.
*/
#define SVN__LINE_CHUNK_SIZE 80
/** Set @a *executable TRUE if @a file_info is executable for the
* user, FALSE otherwise.
@ -64,6 +73,18 @@ svn_io__is_finfo_read_only(svn_boolean_t *read_only,
apr_pool_t *pool);
/**
* Lock file at @a lock_file. If that file does not exist, create an empty
* file.
*
* Lock will be automatically released when @a pool is cleared or destroyed.
* Use @a pool for memory allocations.
*/
svn_error_t *
svn_io__file_lock_autocreate(const char *lock_file,
apr_pool_t *pool);
/** Buffer test handler function for a generic stream. @see svn_stream_t
* and svn_stream__is_buffered().
*
@ -81,7 +102,7 @@ svn_stream__set_is_buffered(svn_stream_t *stream,
/** Return whether this generic @a stream uses internal buffering.
* This may be used to work around subtle differences between buffered
* an non-buffered APR files. A lazy-open stream cannot report the
* and non-buffered APR files. A lazy-open stream cannot report the
* true buffering state until after the lazy open: a stream that
* initially reports as non-buffered may report as buffered later.
*
@ -96,6 +117,82 @@ svn_stream__is_buffered(svn_stream_t *stream);
apr_file_t *
svn_stream__aprfile(svn_stream_t *stream);
/* Creates as *INSTALL_STREAM a stream that once completed can be installed
using Windows checkouts much slower than Unix.
While writing the stream is temporarily stored in TMP_ABSPATH.
*/
svn_error_t *
svn_stream__create_for_install(svn_stream_t **install_stream,
const char *tmp_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Installs a stream created with svn_stream__create_for_install in its final
location FINAL_ABSPATH, potentially using platform specific optimizations.
If MAKE_PARENTS is TRUE, this function will create missing parent
directories if needed.
*/
svn_error_t *
svn_stream__install_stream(svn_stream_t *install_stream,
const char *final_abspath,
svn_boolean_t make_parents,
apr_pool_t *scratch_pool);
/* Deletes the install stream (when installing is not necessary after all) */
svn_error_t *
svn_stream__install_delete(svn_stream_t *install_stream,
apr_pool_t *scratch_pool);
/* Optimized apr_file_stat / apr_file_info_get operating on a closed
install stream */
svn_error_t *
svn_stream__install_get_info(apr_finfo_t *finfo,
svn_stream_t *install_stream,
apr_int32_t wanted,
apr_pool_t *scratch_pool);
#if defined(WIN32)
/* ### Move to something like io.h or subr.h, to avoid making it
part of the DLL api */
/* This is semantically the same as the APR utf8_to_unicode_path
function, but reimplemented here because APR does not export it.
Note that this function creates "\\?\" paths so the resulting path
can only be used for WINAPI functions that explicitly document support
for this kind of paths. Newer Windows functions (Vista+) that support
long paths directly DON'T want this kind of escaping.
*/
svn_error_t*
svn_io__utf8_to_unicode_longpath(const WCHAR **result,
const char *source,
apr_pool_t *result_pool);
/* This Windows-specific function marks the file to be deleted on close using
an existing file handle. It can be used to avoid having to reopen the file
as part of the delete handling. Return SVN_ERR_UNSUPPORTED_FEATURE if
delete on close operation is not supported by OS. */
svn_error_t *
svn_io__win_delete_file_on_close(apr_file_t *file,
const char *path,
apr_pool_t *pool);
/* This Windows-specific function renames the file using an existing file
handle. It can be used to avoid having to reopen the file as part of the
rename operation. Return SVN_ERR_UNSUPPORTED_FEATURE if renaming open
file is not supported by OS.*/
svn_error_t *
svn_io__win_rename_open_file(apr_file_t *file,
const char *from_path,
const char *to_path,
apr_pool_t *pool);
#endif /* WIN32 */
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -204,7 +204,7 @@ svn_log__get_file_revs(const char *path, svn_revnum_t start, svn_revnum_t end,
* @since New in 1.6.
*/
const char *
svn_log__lock(const apr_array_header_t *paths, svn_boolean_t steal,
svn_log__lock(apr_hash_t *targets, svn_boolean_t steal,
apr_pool_t *pool);
/**
@ -213,7 +213,7 @@ svn_log__lock(const apr_array_header_t *paths, svn_boolean_t steal,
* @since New in 1.6.
*/
const char *
svn_log__unlock(const apr_array_header_t *paths, svn_boolean_t break_lock,
svn_log__unlock(apr_hash_t *targets, svn_boolean_t break_lock,
apr_pool_t *pool);
/**

View File

@ -30,14 +30,16 @@
/* An opaque struct that wraps a libmagic cookie. */
typedef struct svn_magic__cookie_t svn_magic__cookie_t;
/* This routine initialises libmagic.
/* This routine initialises libmagic. CONFIG is a config hash and
* may be NULL.
* Upon success a new *MAGIC_COOKIE is allocated in RESULT_POOL.
* On failure *MAGIC_COOKIE is set to NULL.
* All resources used by libmagic are freed by a cleanup handler
* installed on RESULT_POOL, i.e. *MAGIC_COOKIE becomes invalid when
* the pool is cleared! */
void
svn_error_t *
svn_magic__init(svn_magic__cookie_t **magic_cookie,
apr_hash_t *config,
apr_pool_t *result_pool);
/* Detect the mime-type of the file at LOCAL_ABSPATH using MAGIC_COOKIE.

View File

@ -119,13 +119,13 @@ svn_mergeinfo__equals(svn_boolean_t *is_equal,
svn_boolean_t consider_inheritance,
apr_pool_t *pool);
/* Examine MERGEINFO, removing all paths from the hash which map to
empty rangelists. POOL is used only to allocate the apr_hash_index_t
iterator. Returns TRUE if any paths were removed and FALSE if none were
/* Remove all paths from MERGEINFO which map to empty rangelists.
Return TRUE if any paths were removed and FALSE if none were
removed or MERGEINFO is NULL. */
svn_boolean_t
svn_mergeinfo__remove_empty_rangelists(svn_mergeinfo_t mergeinfo,
apr_pool_t *pool);
apr_pool_t *scratch_pool);
/* Make a shallow (ie, mergeinfos are not duped, or altered at all;
keys share storage) copy of IN_CATALOG in *OUT_CATALOG, removing

View File

@ -39,27 +39,23 @@ extern "C" {
* This is a simple wrapper around @c apr_thread_mutex_t and will be a
* valid identifier even if APR does not support threading.
*/
#if APR_HAS_THREADS
/** A mutex for synchronization between threads. It may be NULL, in
* which case no synchronization will take place. The latter is useful
* when implementing some functionality with optional synchronization.
*/
typedef apr_thread_mutex_t svn_mutex__t;
#else
/** Dummy definition. The content will never be actually accessed.
*/
typedef void svn_mutex__t;
#endif
typedef struct svn_mutex__t svn_mutex__t;
/** Initialize the @a *mutex. If @a mutex_required is TRUE, the mutex will
* actually be created with a lifetime defined by @a result_pool. Otherwise,
* the pointer will be set to @c NULL and svn_mutex__lock() as well as
* svn_mutex__unlock() will be no-ops.
*
* We don't support recursive locks, i.e. a thread may not acquire the same
* mutex twice without releasing it in between. Attempts to lock a mutex
* recursively will cause lock ups and other undefined behavior on some
* systems.
*
* If threading is not supported by APR, this function is a no-op.
*/
svn_error_t *

View File

@ -1,162 +0,0 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_named_atomics.h
* @brief Structures and functions for machine-wide named atomics.
* These atomics store 64 bit signed integer values and provide
* a number of basic operations on them. Instead of an address,
* these atomics are identified by strings / names. We also support
* namespaces - mainly to separate debug from production data.
*/
#ifndef SVN_NAMED_ATOMICS_H
#define SVN_NAMED_ATOMICS_H
#include "svn_error.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** An opaque structure that represents a namespace, i.e. a container
* for named atomics.
*/
typedef struct svn_atomic_namespace__t svn_atomic_namespace__t;
/** An opaque structure that represents a named, system-wide visible
* 64 bit integer with atomic access routines.
*/
typedef struct svn_named_atomic__t svn_named_atomic__t;
/** Maximum length of the name of any atomic (excluding the terminal NUL).
*/
#define SVN_NAMED_ATOMIC__MAX_NAME_LENGTH 30
/** Returns #FALSE when named atomics are not available to our process
* and svn_atomic_namespace__create is likely to fail.
*
* @note The actual check will be performed only once and later
* changes in process privileges will not reflect in the outcome of future
* calls to this function.
*/
svn_boolean_t
svn_named_atomic__is_supported(void);
/** Returns #TRUE on platforms that don't need expensive synchronization
* objects to serialize access to named atomics. If this returns #FALSE,
* reading from or modifying a #svn_named_atomic__t may be as expensive
* as a file system operation.
*/
svn_boolean_t
svn_named_atomic__is_efficient(void);
/** Create a namespace (i.e. access object) with the given @a name and
* return it in @a *ns.
*
* Multiple access objects with the same name may be created. They access
* the same shared memory region but have independent lifetimes.
*
* The access object will be allocated in @a result_pool and atomics gotten
* from this object will become invalid when the pool is being cleared.
*/
svn_error_t *
svn_atomic_namespace__create(svn_atomic_namespace__t **ns,
const char *name,
apr_pool_t *result_pool);
/** Removes persistent data structures (files in particular) that got
* created for the namespace given by @a name. Use @a pool for temporary
* allocations.
*
* @note You must not call this while the respective namespace is still
* in use. Calling this multiple times for the same namespace is safe.
*/
svn_error_t *
svn_atomic_namespace__cleanup(const char *name,
apr_pool_t *pool);
/** Find the atomic with the specified @a name in namespace @a ns and
* return it in @a *atomic. If no object with that name can be found, the
* behavior depends on @a auto_create. If it is @c FALSE, @a *atomic will
* be set to @c NULL. Otherwise, a new atomic will be created, its value
* set to 0 and the access structure be returned in @a *atomic.
*
* Note that @a name must not exceed #SVN_NAMED_ATOMIC__MAX_NAME_LENGTH
* characters and an error will be returned if the specified name is longer
* than supported.
*
* @note The lifetime of the atomic object is bound to the lifetime
* of the @a ns object, i.e. the pool the latter was created in.
* The data in the namespace persists as long as at least one process
* holds an #svn_atomic_namespace__t object corresponding to it.
*/
svn_error_t *
svn_named_atomic__get(svn_named_atomic__t **atomic,
svn_atomic_namespace__t *ns,
const char *name,
svn_boolean_t auto_create);
/** Read the @a atomic and return its current @a *value.
* An error will be returned if @a atomic is @c NULL.
*/
svn_error_t *
svn_named_atomic__read(apr_int64_t *value,
svn_named_atomic__t *atomic);
/** Set the data in @a atomic to @a new_value and return its old content
* in @a *old_value. @a old_value may be NULL.
*
* An error will be returned if @a atomic is @c NULL.
*/
svn_error_t *
svn_named_atomic__write(apr_int64_t *old_value,
apr_int64_t new_value,
svn_named_atomic__t *atomic);
/** Add @a delta to the data in @a atomic and return its new value in
* @a *new_value. @a new_value may be null.
*
* An error will be returned if @a atomic is @c NULL.
*/
svn_error_t *
svn_named_atomic__add(apr_int64_t *new_value,
apr_int64_t delta,
svn_named_atomic__t *atomic);
/** If the current data in @a atomic equals @a comperand, set it to
* @a new_value. Return the initial value in @a *old_value.
* @a old_value may be NULL.
*
* An error will be returned if @a atomic is @c NULL.
*/
svn_error_t *
svn_named_atomic__cmpxchg(apr_int64_t *old_value,
apr_int64_t new_value,
apr_int64_t comperand,
svn_named_atomic__t *atomic);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_NAMED_ATOMICS_H */

View File

@ -0,0 +1,154 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_object_pool.h
* @brief multithreaded object pool API
*
* This is the core data structure behind various object pools. It
* provides a thread-safe associative container for object instances of
* the same type.
*
* Memory and lifetime management for the objects are handled by the pool.
* Reference counting takes care that neither objects nor the object pool
* get actually destroyed while other parts depend on them. All objects
* are thought to be recycle-able and live in their own root memory pools
* making them (potentially) safe to be used from different threads.
* Currently unused objects may be kept around for a while and returned
* by the next lookup.
*
* Two modes are supported: shared use and exclusive use. In shared mode,
* any object can be handed out to multiple users and in potentially
* different threads at the same time. In exclusive mode, the same object
* will only be referenced at most once.
*
* Object creation and access must be provided outside this structure.
* In particular, the using container will usually wrap the actual object
* in a meta-data struct containing key information etc and must provide
* getters and setters for those wrapper structs.
*/
#ifndef SVN_OBJECT_POOL_H
#define SVN_OBJECT_POOL_H
#include <apr.h> /* for apr_int64_t */
#include <apr_pools.h> /* for apr_pool_t */
#include <apr_hash.h> /* for apr_hash_t */
#include "svn_types.h"
#include "private/svn_mutex.h"
#include "private/svn_string_private.h"
/* The opaque object container type. */
typedef struct svn_object_pool__t svn_object_pool__t;
/* Extract the actual object from the WRAPPER using optional information
* from BATON (provided through #svn_object_pool__lookup) and return it.
* The result will be used with POOL and must remain valid throughout
* POOL's lifetime.
*
* It is legal to return a copy, allocated in POOL, of the wrapped object.
*/
typedef void * (* svn_object_pool__getter_t)(void *wrapper,
void *baton,
apr_pool_t *pool);
/* Copy the information from the SOURCE object wrapper into the already
* existing *TARGET object wrapper using POOL for allocations and BATON
* for optional context (provided through #svn_object_pool__insert).
*/
typedef svn_error_t * (* svn_object_pool__setter_t)(void **target,
void *source,
void *baton,
apr_pool_t *pool);
/* Create a new object pool in POOL and return it in *OBJECT_POOL.
* Objects will be extracted using GETTER and updated using SETTER. Either
* one (or both) may be NULL and the default implementation assumes that
* wrapper == object and updating is a no-op.
*
* If THREAD_SAFE is not set, neither the object pool nor the object
* references returned from it may be accessed from multiple threads.
*
* It is not legal to call any API on the object pool after POOL got
* cleared or destroyed. However, existing object references handed out
* from the object pool remain valid and will keep the internal pool data
* structures alive for as long as such object references exist.
*/
svn_error_t *
svn_object_pool__create(svn_object_pool__t **object_pool,
svn_object_pool__getter_t getter,
svn_object_pool__setter_t setter,
svn_boolean_t thread_safe,
apr_pool_t *pool);
/* Return the root pool containing the OBJECT_POOL and all sub-structures.
*/
apr_pool_t *
svn_object_pool__new_wrapper_pool(svn_object_pool__t *object_pool);
/* Return the mutex used to serialize all OBJECT_POOL access.
*/
svn_mutex__t *
svn_object_pool__mutex(svn_object_pool__t *object_pool);
/* Return the number of object instances (used or unused) in OBJECT_POOL.
*/
unsigned
svn_object_pool__count(svn_object_pool__t *object_pool);
/* In OBJECT_POOL, look for an available object by KEY and return a
* reference to it in *OBJECT. If none can be found, *OBJECT will be NULL.
* BATON will be passed to OBJECT_POOL's getter function. The reference
* will be returned when *RESULT_POOL gets cleaned up or destroyed.
*/
svn_error_t *
svn_object_pool__lookup(void **object,
svn_object_pool__t *object_pool,
svn_membuf_t *key,
void *baton,
apr_pool_t *result_pool);
/* Store the wrapped object WRAPPER under KEY in OBJECT_POOL and return
* a reference to the object in *OBJECT (just like lookup).
*
* The object must have been created in WRAPPER_POOL and the latter must
* be a sub-pool of OBJECT_POOL's root POOL (see #svn_object_pool__pool).
*
* BATON will be passed to OBJECT_POOL's setter and getter functions.
* The reference will be returned when *RESULT_POOL gets cleaned up or
* destroyed.
*/
svn_error_t *
svn_object_pool__insert(void **object,
svn_object_pool__t *object_pool,
const svn_membuf_t *key,
void *wrapper,
void *baton,
apr_pool_t *wrapper_pool,
apr_pool_t *result_pool);
#endif /* SVN_OBJECT_POOL_H */

View File

@ -46,10 +46,6 @@ extern "C" {
* UTF8_TARGET need not be canonical. *TRUE_TARGET will not be canonical
* unless UTF8_TARGET is.
*
* It is an error if *TRUE_TARGET results in the empty string after the
* split, which happens in case UTF8_TARGET has a leading '@' character
* with no additional '@' characters to escape the first '@'.
*
* Note that *PEG_REVISION will still contain the '@' symbol as the first
* character if a peg revision was found. If a trailing '@' symbol was
* used to escape other '@' characters in UTF8_TARGET, *PEG_REVISION will

View File

@ -0,0 +1,255 @@
/* packed_data.h : Interface to the packed binary stream data structure
*
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
*/
#ifndef SVN_PACKED_DATA_H
#define SVN_PACKED_DATA_H
#include "svn_string.h"
#include "svn_io.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/* This API provides Yet Another Serialization Framework.
*
* It is geared towards efficiently encoding collections of structured
* binary data (e.g. an array of noderev objects). The basic idea is to
* transform them into hierarchies of streams with each stream usually
* corresponding to a single attribute in the original data structures.
* The user is free model the mapping structure <-> streams mapping as she
* sees fit.
*
* With all data inside the same (sub-)stream carrying similar attribute
* values, the whole stream lends itself to data compression. Strings /
* plain byte sequences will be stored as is. Numbers use a 7b/8b encoding
* scheme to eliminate leading zeros. Because values are often dependent
* (increasing offsets, roughly similar revision number, etc.), streams
* can be configured as storing (hopefully shorter) deltas instead of the
* original value.
*
* Two stream types are provided: integer and byte streams. While the
* first store 64 bit integers only and can be configured to assume
* signed and / or deltifyable data, the second will store arbitrary
* byte sequences including their length. At the root level, you may
* create an arbitrary number of integer and byte streams. Any stream
* may have an arbitrary number of sub-streams of the same kind. You
* should create the full stream hierarchy before writing any data to it.
*
* As a convenience, when an integer stream has sub-streams, you may write
* to the parent stream instead of all sub-streams individually and the
* values will be passed down automatically in a round-robin fashion.
* Reading from the parent stream is similarly supported.
*
* When all data has been added to the stream, it can be written to an
* ordinary svn_stream_t. First, we write a description of the stream
* structure (types, sub-streams, sizes and configurations) followed by
* zlib compressed stream content. For each top-level stream, all sub-
* stream data will be concatenated and then compressed as a single block.
* To maximize the effect of this, make sure all data in that stream
* hierarchy has a similar value distribution.
*
* Reading data starts with an svn_stream_t and automatically recreates
* the stream hierarchies. You only need to extract data from it in the
* same order as you wrote it.
*
* Although not enforced programmatically, you may either only write to a
* stream hierarchy or only read from it but you cannot do both on the
* same data structure.
*/
/* We pack / unpack integers en block to minimize calling and setup overhead.
* This is the number of integers we put into a buffer before writing them
* them to / after reading them from the 7b/8b stream. Under 64 bits, this
* value creates a 128 byte data structure (14 + 2 integers, 8 bytes each).
*/
#define SVN__PACKED_DATA_BUFFER_SIZE 14
/* Data types. */
/* Opaque type for the root object.
*/
typedef struct svn_packed__data_root_t svn_packed__data_root_t;
/* Opaque type for byte streams.
*/
typedef struct svn_packed__byte_stream_t svn_packed__byte_stream_t;
/* Semi-opaque type for integer streams. We expose the unpacked buffer
* to allow for replacing svn_packed__add_uint and friends by macros.
*/
typedef struct svn_packed__int_stream_t
{
/* pointer to the remainder of the data structure */
void *private_data;
/* number of value entries in BUFFER */
apr_size_t buffer_used;
/* unpacked integers (either yet to be packed or pre-fetched from the
* packed buffers). Only the first BUFFER_USED entries are valid. */
apr_uint64_t buffer[SVN__PACKED_DATA_BUFFER_SIZE];
} svn_packed__int_stream_t;
/* Writing data. */
/* Return a new serialization root object, allocated in POOL.
*/
svn_packed__data_root_t *
svn_packed__data_create_root(apr_pool_t *pool);
/* Create and return a new top-level integer stream in ROOT. If signed,
* negative numbers will be put into that stream, SIGNED_INTS should be
* TRUE as a more efficient encoding will be used in that case. Set
* DIFF to TRUE if you expect the difference between consecutive numbers
* to be much smaller (~100 times) than the actual numbers.
*/
svn_packed__int_stream_t *
svn_packed__create_int_stream(svn_packed__data_root_t *root,
svn_boolean_t diff,
svn_boolean_t signed_ints);
/* Create and return a sub-stream to the existing integer stream PARENT.
* If signed, negative numbers will be put into that stream, SIGNED_INTS
* should be TRUE as a more efficient encoding will be used in that case.
* Set DIFF to TRUE if you expect the difference between consecutive numbers
* to be much smaller (~100 times) than the actual numbers.
*/
svn_packed__int_stream_t *
svn_packed__create_int_substream(svn_packed__int_stream_t *parent,
svn_boolean_t diff,
svn_boolean_t signed_ints);
/* Create and return a new top-level byte sequence stream in ROOT.
*/
svn_packed__byte_stream_t *
svn_packed__create_bytes_stream(svn_packed__data_root_t *root);
/* Write the unsigned integer VALUE to STEAM.
*/
void
svn_packed__add_uint(svn_packed__int_stream_t *stream,
apr_uint64_t value);
/* Write the signed integer VALUE to STEAM.
*/
void
svn_packed__add_int(svn_packed__int_stream_t *stream,
apr_int64_t value);
/* Write the sequence stating at DATA containing LEN bytes to STEAM.
*/
void
svn_packed__add_bytes(svn_packed__byte_stream_t *stream,
const char *data,
apr_size_t len);
/* Write all contents of ROOT (including all sub-streams) to STREAM.
* Use SCRATCH_POOL for temporary allocations.
*/
svn_error_t *
svn_packed__data_write(svn_stream_t *stream,
svn_packed__data_root_t *root,
apr_pool_t *scratch_pool);
/* Reading data. */
/* Return the first integer stream in ROOT. Returns NULL in case there
* aren't any.
*/
svn_packed__int_stream_t *
svn_packed__first_int_stream(svn_packed__data_root_t *root);
/* Return the first byte sequence stream in ROOT. Returns NULL in case
* there aren't any.
*/
svn_packed__byte_stream_t *
svn_packed__first_byte_stream(svn_packed__data_root_t *root);
/* Return the next (sibling) integer stream to STREAM. Returns NULL in
* case there isn't any.
*/
svn_packed__int_stream_t *
svn_packed__next_int_stream(svn_packed__int_stream_t *stream);
/* Return the next (sibling) byte sequence stream to STREAM. Returns NULL
* in case there isn't any.
*/
svn_packed__byte_stream_t *
svn_packed__next_byte_stream(svn_packed__byte_stream_t *stream);
/* Return the first sub-stream of STREAM. Returns NULL in case there
* isn't any.
*/
svn_packed__int_stream_t *
svn_packed__first_int_substream(svn_packed__int_stream_t *stream);
/* Return the number of integers left to read from STREAM.
*/
apr_size_t
svn_packed__int_count(svn_packed__int_stream_t *stream);
/* Return the number of bytes left to read from STREAM.
*/
apr_size_t
svn_packed__byte_count(svn_packed__byte_stream_t *stream);
/* Return the next number from STREAM as unsigned integer. Returns 0 when
* reading beyond the end of the stream.
*/
apr_uint64_t
svn_packed__get_uint(svn_packed__int_stream_t *stream);
/* Return the next number from STREAM as signed integer. Returns 0 when
* reading beyond the end of the stream.
*/
apr_int64_t
svn_packed__get_int(svn_packed__int_stream_t *stream);
/* Return the next byte sequence from STREAM and set *LEN to the length
* of that sequence. Sets *LEN to 0 when reading beyond the end of the
* stream.
*/
const char *
svn_packed__get_bytes(svn_packed__byte_stream_t *stream,
apr_size_t *len);
/* Allocate a new packed data root in RESULT_POOL, read its structure and
* stream contents from STREAM and return it in *ROOT_P. Use SCRATCH_POOL
* for temporary allocations.
*/
svn_error_t *
svn_packed__data_read(svn_packed__data_root_t **root_p,
svn_stream_t *stream,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_PACKED_DATA_H */

View File

@ -1,83 +0,0 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_pseudo_md5.h
* @brief Subversion hash sum calculation for runtime data (only)
*/
#ifndef SVN_PSEUDO_MD5_H
#define SVN_PSEUDO_MD5_H
#include <apr.h> /* for apr_uint32_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/**
* Calculates a hash sum for 15 bytes in @a x and returns it in @a digest.
* The most significant byte in @a x must be 0 (independent of being on a
* little or big endian machine).
*
* @note Use for runtime data hashing only.
*
* @note The output is NOT an MD5 digest shares has the same basic
* cryptographic properties. Collisions with proper MD5 on the same
* or other input data is equally unlikely as any MD5 collision.
*/
void svn__pseudo_md5_15(apr_uint32_t digest[4],
const apr_uint32_t x[4]);
/**
* Calculates a hash sum for 31 bytes in @a x and returns it in @a digest.
* The most significant byte in @a x must be 0 (independent of being on a
* little or big endian machine).
*
* @note Use for runtime data hashing only.
*
* @note The output is NOT an MD5 digest shares has the same basic
* cryptographic properties. Collisions with proper MD5 on the same
* or other input data is equally unlikely as any MD5 collision.
*/
void svn__pseudo_md5_31(apr_uint32_t digest[4],
const apr_uint32_t x[8]);
/**
* Calculates a hash sum for 63 bytes in @a x and returns it in @a digest.
* The most significant byte in @a x must be 0 (independent of being on a
* little or big endian machine).
*
* @note Use for runtime data hashing only.
*
* @note The output is NOT an MD5 digest shares has the same basic
* cryptographic properties. Collisions with proper MD5 on the same
* or other input data is equally unlikely as any MD5 collision.
*/
void svn__pseudo_md5_63(apr_uint32_t digest[4],
const apr_uint32_t x[16]);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_PSEUDO_MD5_H */

View File

@ -39,6 +39,33 @@
extern "C" {
#endif /* __cplusplus */
/**
* Open a new ra session @a *new_session to the same repository as an existing
* ra session @a old_session, copying the callbacks, auth baton, etc. from the
* old session. This essentially limits the lifetime of the new, duplicated
* session to the lifetime of the old session. If the new session should
* outlive the new session, creating a new session using svn_ra_open4() is
* recommended.
*
* If @a session_url is not NULL, parent the new session at session_url. Note
* that @a session_url MUST BE in the same repository as @a old_session or an
* error will be returned. When @a session_url NULL the same session root
* will be used.
*
* Allocate @a new_session in @a result_pool. Perform temporary allocations
* in @a scratch_pool.
*
* @since New in 1.9.
*/
svn_error_t *
svn_ra__dup_session(svn_ra_session_t **new_session,
svn_ra_session_t *old_session,
const char *session_url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Equivalent to svn_ra__assert_capable_server()
for SVN_RA_CAPABILITY_MERGEINFO. */
svn_error_t *

View File

@ -42,6 +42,12 @@ svn_error_t *
svn_ra_svn__set_shim_callbacks(svn_ra_svn_conn_t *conn,
svn_delta_shim_callbacks_t *shim_callbacks);
/**
* Return the memory pool used to allocate @a conn.
*/
apr_pool_t *
svn_ra_svn__get_pool(svn_ra_svn_conn_t *conn);
/**
* @defgroup ra_svn_deprecated ra_svn low-level functions
* @{
@ -83,6 +89,15 @@ svn_ra_svn__write_word(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *word);
/** Write a boolean over the net.
*
* Writes will be buffered until the next read or flush.
*/
svn_error_t *
svn_ra_svn__write_boolean(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_boolean_t value);
/** Write a list of properties over the net. @a props is allowed to be NULL,
* in which case an empty list will be written out.
*
@ -186,6 +201,7 @@ svn_ra_svn__skip_leading_garbage(svn_ra_svn_conn_t *conn,
w const char ** Word
b svn_boolean_t * Word ("true" or "false")
B apr_uint64_t * Word ("true" or "false")
3 svn_tristate_t * Word ("true" or "false")
l apr_array_header_t ** List
( Begin tuple
) End tuple
@ -196,14 +212,18 @@ svn_ra_svn__skip_leading_garbage(svn_ra_svn_conn_t *conn,
* the end of the specification. So if @a fmt is "c?cc" and @a list
* contains two elements, an error will result.
*
* 'B' is similar to 'b', but may be used in the optional tuple specification.
* It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
* '3' is similar to 'b', but may be used in the optional tuple specification.
* It returns #svn_tristate_true, #svn_tristate_false or #svn_tristate_unknown.
*
* 'B' is similar to '3', but it returns @c TRUE, @c FALSE, or
* #SVN_RA_SVN_UNSPECIFIED_NUMBER. 'B' is deprecated; new code should
* use '3' instead.
*
* If an optional part of a tuple contains no data, 'r' values will be
* set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
* SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
* will be set to @c NULL. 'b' may not appear inside an optional
* tuple specification; use 'B' instead.
* set to @c SVN_INVALID_REVNUM; 'n' and 'B' values will be set to
* #SVN_RA_SVN_UNSPECIFIED_NUMBER; 's', 'c', 'w', and 'l' values
* will be set to @c NULL; and '3' values will be set to #svn_tristate_unknown
* 'b' may not appear inside an optional tuple specification; use '3' instead.
*/
svn_error_t *
svn_ra_svn__parse_tuple(const apr_array_header_t *list,
@ -236,6 +256,33 @@ svn_ra_svn__read_cmd_response(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
/** Check the receive buffer and socket of @a conn whether there is some
* unprocessed incoming data without waiting for new data to come in.
* If data is found, set @a *has_command to TRUE. If the connection does
* not contain any more data and has been closed, set @a *terminated to
* TRUE.
*/
svn_error_t *
svn_ra_svn__has_command(svn_boolean_t *has_command,
svn_boolean_t *terminated,
svn_ra_svn_conn_t *conn,
apr_pool_t *pool);
/** Accept a single command from @a conn and handle them according
* to @a cmd_hash. Command handlers will be passed @a conn, @a pool,
* the parameters of the command, and @a baton. @a *terminate will be
* set if either @a error_on_disconnect is FALSE and the connection got
* closed, or if the command being handled has the "terminate" flag set
* in the command table.
*/
svn_error_t *
svn_ra_svn__handle_command(svn_boolean_t *terminate,
apr_hash_t *cmd_hash,
void *baton,
svn_ra_svn_conn_t *conn,
svn_boolean_t error_on_disconnect,
apr_pool_t *pool);
/** Accept commands over the network and handle them according to @a
* commands. Command handlers will be passed @a conn, a subpool of @a
* pool (cleared after each command is handled), the parameters of the
@ -267,11 +314,13 @@ svn_ra_svn__write_cmd_response(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *fmt, ...);
/** Write an unsuccessful command response over the network. */
/** Write an unsuccessful command response over the network.
*
* @note This does not clear @a err. */
svn_error_t *
svn_ra_svn__write_cmd_failure(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_error_t *err);
const svn_error_t *err);
/**
* @}
@ -563,7 +612,11 @@ svn_ra_svn__write_cmd_get_dated_rev(svn_ra_svn_conn_t *conn,
/** Send a "change-rev-prop2" command over connection @a conn.
* Use @a pool for allocations.
*
* @see #svn_ra_change_rev_prop2 for a description.
* If @a dont_care is false then check that the old value matches
* @a old_value. If @a dont_care is true then do not check the old
* value; in this case @a old_value must be NULL.
*
* @see #svn_ra_change_rev_prop2 for the rest of the description.
*/
svn_error_t *
svn_ra_svn__write_cmd_change_rev_prop2(svn_ra_svn_conn_t *conn,
@ -819,6 +872,77 @@ svn_ra_svn__write_cmd_finish_replay(svn_ra_svn_conn_t *conn,
/**
* @}
*/
/**
* @defgroup svn_send_data sending data structures over ra_svn
* @{
*/
/** Send a changed path (as part of transmitting a log entry) over connection
* @a conn. Use @a pool for allocations.
*
* @see svn_log_changed_path2_t for a description of the other parameters.
*/
svn_error_t *
svn_ra_svn__write_data_log_changed_path(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
const char *path,
char action,
const char *copyfrom_path,
svn_revnum_t copyfrom_rev,
svn_node_kind_t node_kind,
svn_boolean_t text_modified,
svn_boolean_t props_modified);
/** Send a the details of a log entry (as part of transmitting a log entry
* and without revprops and changed paths) over connection @a conn.
* Use @a pool for allocations.
*
* @a author, @a date and @a message have been extracted and removed from
* the revprops to follow. @a has_children is taken directly from the
* #svn_log_entry_t struct. @a revision is too, except when it equals
* #SVN_INVALID_REVNUM. In that case, @a revision must be 0 and
* @a invalid_revnum be set to TRUE. @a revprop_count is the number of
* revprops that will follow in the revprops list.
*/
svn_error_t *
svn_ra_svn__write_data_log_entry(svn_ra_svn_conn_t *conn,
apr_pool_t *pool,
svn_revnum_t revision,
const svn_string_t *author,
const svn_string_t *date,
const svn_string_t *message,
svn_boolean_t has_children,
svn_boolean_t invalid_revnum,
unsigned revprop_count);
/**
* @}
*/
/**
* @defgroup svn_read_data reading data structures from ra_svn
* @{
*/
/** Take the data tuple ITEMS received over ra_svn and convert it to the
* a changed path (as part of receiving a log entry).
*
* @see svn_log_changed_path2_t for a description of the output parameters.
*/
svn_error_t *
svn_ra_svn__read_data_log_changed_entry(const apr_array_header_t *items,
svn_string_t **cpath,
const char **action,
const char **copy_path,
svn_revnum_t *copy_rev,
const char **kind_str,
apr_uint64_t *text_mods,
apr_uint64_t *prop_mods);
/**
* @}
*/
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -32,16 +32,30 @@
#include "svn_types.h"
#include "svn_repos.h"
#include "svn_editor.h"
#include "svn_config.h"
#include "private/svn_string_private.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** Validate that property @a name is valid for use in a Subversion
* repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't. For some
* "svn:" properties, also validate the @a value, and return
* @c SVN_ERR_BAD_PROPERTY_VALUE if it is not valid.
/** Validate that property @a name with @a value is valid (as an addition
* or edit or deletion) in a Subversion repository. Return an error if not.
*
* If @a value is NULL, return #SVN_NO_ERROR to indicate that any property
* may be deleted, even an invalid one. Otherwise, if the @a name is not
* of kind #svn_prop_regular_kind (see #svn_prop_kind_t), return
* #SVN_ERR_REPOS_BAD_ARGS. Otherwise, for some "svn:" properties, also
* perform some validations on the @a value (e.g., for such properties,
* typically the @a value must be in UTF-8 with LF linefeeds), and return
* #SVN_ERR_BAD_PROPERTY_VALUE if it is not valid.
*
* Validations may be added in future releases, for example, for
* newly-added #SVN_PROP_PREFIX properties. However, user-defined
* (non-#SVN_PROP_PREFIX) properties will never have their @a value
* validated in any way.
*
* Use @a pool for temporary allocations.
*
@ -113,10 +127,260 @@ svn_repos__replay_ev2(svn_fs_root_t *root,
void *authz_read_baton,
apr_pool_t *scratch_pool);
/* A private addition to svn_repos_notify_warning_t. */
#define svn_repos__notify_warning_invalid_mergeinfo \
((svn_repos_notify_warning_t)(-1))
/* Given a PATH which might be a relative repo URL (^/), an absolute
* local repo URL (file://), an absolute path outside of the repo
* or a location in the Windows registry.
*
* Retrieve the configuration data that PATH points at and parse it into
* CFG_P allocated in POOL.
*
* If PATH cannot be parsed as a config file then an error is returned. The
* contents of CFG_P is then undefined. If MUST_EXIST is TRUE, a missing
* authz file is also an error. The CASE_SENSITIVE controls the lookup
* behavior for section and option names alike.
*
* REPOS_ROOT points at the root of the repos you are
* going to apply the authz against, can be NULL if you are sure that you
* don't have a repos relative URL in PATH. */
svn_error_t *
svn_repos__retrieve_config(svn_config_t **cfg_p,
const char *path,
svn_boolean_t must_exist,
svn_boolean_t case_sensitive,
apr_pool_t *pool);
/**
* @defgroup svn_config_pool Configuration object pool API
* @{
*/
/* Opaque thread-safe factory and container for configuration objects.
*
* Instances handed out are read-only and may be given to multiple callers
* from multiple threads. Configuration objects no longer referenced by
* any user may linger for a while before being cleaned up.
*/
typedef struct svn_repos__config_pool_t svn_repos__config_pool_t;
/* Create a new configuration pool object with a lifetime determined by
* POOL and return it in *CONFIG_POOL.
*
* The THREAD_SAFE flag indicates whether the pool actually needs to be
* thread-safe and POOL must be also be thread-safe if this flag is set.
*/
svn_error_t *
svn_repos__config_pool_create(svn_repos__config_pool_t **config_pool,
svn_boolean_t thread_safe,
apr_pool_t *pool);
/* Set *CFG to a read-only reference to the current contents of the
* configuration specified by PATH. If the latter is a URL, we read the
* data from a local repository. CONFIG_POOL will store the configuration
* and make further callers use the same instance if the content matches.
* If KEY is not NULL, *KEY will be set to a unique ID - if available.
*
* If MUST_EXIST is TRUE, a missing config file is also an error, *CFG
* is otherwise simply NULL. The CASE_SENSITIVE controls the lookup
* behavior for section and option names alike.
*
* PREFERRED_REPOS is only used if it is not NULL and PATH is a URL.
* If it matches the URL, access the repository through this object
* instead of creating a new repo instance. Note that this might not
* return the latest content.
*
* POOL determines the minimum lifetime of *CFG (may remain cached after
* release) but must not exceed the lifetime of the pool provided to
* #svn_repos__config_pool_create.
*/
svn_error_t *
svn_repos__config_pool_get(svn_config_t **cfg,
svn_membuf_t **key,
svn_repos__config_pool_t *config_pool,
const char *path,
svn_boolean_t must_exist,
svn_boolean_t case_sensitive,
svn_repos_t *preferred_repos,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_authz_pool Authz object pool API
* @{
*/
/* Opaque thread-safe factory and container for authorization objects.
*
* Instances handed out are read-only and may be given to multiple callers
* from multiple threads. Authorization objects no longer referenced by
* any user may linger for a while before being cleaned up.
*/
typedef struct svn_repos__authz_pool_t svn_repos__authz_pool_t;
/* Create a new authorization pool object with a lifetime determined by
* POOL and return it in *AUTHZ_POOL. CONFIG_POOL will be the common
* source for the configuration data underlying the authz objects and must
* remain valid at least until POOL cleanup.
*
* The THREAD_SAFE flag indicates whether the pool actually needs to be
* thread-safe and POOL must be also be thread-safe if this flag is set.
*/
svn_error_t *
svn_repos__authz_pool_create(svn_repos__authz_pool_t **authz_pool,
svn_repos__config_pool_t *config_pool,
svn_boolean_t thread_safe,
apr_pool_t *pool);
/* Set *AUTHZ_P to a read-only reference to the current contents of the
* authorization specified by PATH and GROUPS_PATH. If these are URLs,
* we read the data from a local repository (see #svn_repos_authz_read2).
* AUTHZ_POOL will store the authz data and make further callers use the
* same instance if the content matches.
*
* If MUST_EXIST is TRUE, a missing config file is also an error, *AUTHZ_P
* is otherwise simply NULL.
*
* PREFERRED_REPOS is only used if it is not NULL and PATH is a URL.
* If it matches the URL, access the repository through this object
* instead of creating a new repo instance. Note that this might not
* return the latest content.
*
* POOL determines the minimum lifetime of *AUTHZ_P (may remain cached
* after release) but must not exceed the lifetime of the pool provided to
* svn_repos__authz_pool_create.
*/
svn_error_t *
svn_repos__authz_pool_get(svn_authz_t **authz_p,
svn_repos__authz_pool_t *authz_pool,
const char *path,
const char *groups_path,
svn_boolean_t must_exist,
svn_repos_t *preferred_repos,
apr_pool_t *pool);
/** @} */
/* Adjust mergeinfo paths and revisions in ways that are useful when loading
* a dump stream.
*
* Set *NEW_VALUE_P to an adjusted version of the mergeinfo property value
* supplied in OLD_VALUE, with the following adjustments.
*
* - Normalize line endings: if all CRLF, change to LF; but error if
* mixed. If this normalization is performed, send a notification type
* svn_repos_notify_load_normalized_mergeinfo to NOTIFY_FUNC/NOTIFY_BATON.
*
* - Prefix all the merge source paths with PARENT_DIR, if not null.
*
* - Adjust any mergeinfo revisions not older than OLDEST_DUMPSTREAM_REV
* by using REV_MAP which maps (svn_revnum_t) old rev to (svn_revnum_t)
* new rev.
*
* - Adjust any mergeinfo revisions older than OLDEST_DUMPSTREAM_REV by
* (-OLDER_REVS_OFFSET), dropping any revisions that become <= 0.
*
* Allocate *NEW_VALUE_P in RESULT_POOL.
*/
svn_error_t *
svn_repos__adjust_mergeinfo_property(svn_string_t **new_value_p,
const svn_string_t *old_value,
const char *parent_dir,
apr_hash_t *rev_map,
svn_revnum_t oldest_dumpstream_rev,
apr_int32_t older_revs_offset,
svn_repos_notify_func_t notify_func,
void *notify_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* A (nearly) opaque representation of an ordered list of header lines.
*/
typedef struct apr_array_header_t svn_repos__dumpfile_headers_t;
/* Create an empty set of headers.
*/
svn_repos__dumpfile_headers_t *
svn_repos__dumpfile_headers_create(apr_pool_t *pool);
/* Push the header (KEY, VAL) onto HEADERS.
*
* Duplicate the key and value into HEADERS's pool.
*/
void
svn_repos__dumpfile_header_push(svn_repos__dumpfile_headers_t *headers,
const char *key,
const char *val);
/* Push the header (KEY, val = VAL_FMT ...) onto HEADERS.
*
* Duplicate the key and value into HEADERS's pool.
*/
void
svn_repos__dumpfile_header_pushf(svn_repos__dumpfile_headers_t *headers,
const char *key,
const char *val_fmt,
...)
__attribute__((format(printf, 3, 4)));
/* Write to STREAM the headers in HEADERS followed by a blank line.
*/
svn_error_t *
svn_repos__dump_headers(svn_stream_t *stream,
svn_repos__dumpfile_headers_t *headers,
apr_pool_t *scratch_pool);
/* Write a revision record to DUMP_STREAM for revision REVISION with revision
* properies REVPROPS, creating appropriate headers.
*
* Include all of the headers in EXTRA_HEADERS (if non-null), ignoring
* the revision number header and the three content length headers (which
* will be recreated as needed). EXTRA_HEADERS maps (char *) key to
* (char *) value.
*
* REVPROPS maps (char *) key to (svn_string_t *) value.
*
* Iff PROPS_SECTION_ALWAYS is true, include a prop content section (and
* corresponding header) even when REVPROPS is empty. This option exists
* to support a historical difference between svndumpfilter and svnadmin
* dump.
*
* Finally write another blank line.
*/
svn_error_t *
svn_repos__dump_revision_record(svn_stream_t *dump_stream,
svn_revnum_t revision,
apr_hash_t *extra_headers,
apr_hash_t *revprops,
svn_boolean_t props_section_always,
apr_pool_t *scratch_pool);
/* Output node headers and props.
*
* Output HEADERS, content length headers, blank line, and
* then PROPS_STR (if non-null) to DUMP_STREAM.
*
* HEADERS is an array of headers as struct {const char *key, *val;}.
* Write them all in the given order.
*
* PROPS_STR is the property content block, including a terminating
* 'PROPS_END\n' line. Iff PROPS_STR is non-null, write a
* Prop-content-length header and the prop content block.
*
* Iff HAS_TEXT is true, write a Text-content length, using the value
* TEXT_CONTENT_LENGTH.
*
* Write a Content-length header, its value being the sum of the
* Prop- and Text- content length headers, if props and/or text are present
* or if CONTENT_LENGTH_ALWAYS is true.
*/
svn_error_t *
svn_repos__dump_node_record(svn_stream_t *dump_stream,
svn_repos__dumpfile_headers_t *headers,
svn_stringbuf_t *props_str,
svn_boolean_t has_text,
svn_filesize_t text_content_length,
svn_boolean_t content_length_always,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}

View File

@ -0,0 +1,227 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_sorts_private.h
* @brief all sorts of sorts.
*/
#ifndef SVN_SORTS_PRIVATE_H
#define SVN_SORTS_PRIVATE_H
#include "../svn_sorts.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** This structure is used to hold a key/value from a hash table.
* @note Private. For use by Subversion's own code only. See issue #1644.
*/
struct svn_sort__item_t {
/** pointer to the key */
const void *key;
/** size of the key */
apr_ssize_t klen;
/** pointer to the value */
void *value;
};
/** Sort @a ht according to its keys, return an @c apr_array_header_t
* containing @c svn_sort__item_t structures holding those keys and values
* (i.e. for each @c svn_sort__item_t @a item in the returned array,
* @a item->key and @a item->size are the hash key, and @a item->value points to
* the hash value).
*
* Storage is shared with the original hash, not copied.
*
* @a comparison_func should take two @c svn_sort__item_t's and return an
* integer greater than, equal to, or less than 0, according as the first item
* is greater than, equal to, or less than the second.
*
* @note Private. For use by Subversion's own code only. See issue #1644.
*
* @note This function and the @c svn_sort__item_t should go over to APR.
*/
apr_array_header_t *
svn_sort__hash(apr_hash_t *ht,
int (*comparison_func)(const svn_sort__item_t *,
const svn_sort__item_t *),
apr_pool_t *pool);
/* Sort APR array @a array using ordering defined by @a comparison_func.
* @a comparison_func is defined as for the C stdlib function qsort().
*/
void
svn_sort__array(apr_array_header_t *array,
int (*comparison_func)(const void *,
const void *));
/* Return the lowest index at which the element @a *key should be inserted into
* the array @a array, according to the ordering defined by @a compare_func.
* The array must already be sorted in the ordering defined by @a compare_func.
* @a compare_func is defined as for the C stdlib function bsearch(); the
* @a key will always passed to it as the second parameter.
*
* @note Private. For use by Subversion's own code only.
*/
int
svn_sort__bsearch_lower_bound(const apr_array_header_t *array,
const void *key,
int (*compare_func)(const void *, const void *));
/* Find the lowest index at which the element @a *key should be inserted into
* the array @a array, according to the ordering defined by @a compare_func.
* The array must already be sorted in the ordering defined by @a compare_func.
* @a compare_func is defined as for the C stdlib function bsearch(); the
* @a key will always passed to it as the second parameter.
*
* Returns a reference to the array element at the insertion location if
* that matches @a key and return NULL otherwise. If you call this function
* multiple times for the same array and expect the results to often be
* consecutive array elements, provide @a hint. It should be initialized
* with -1 for the first call and receives the array index if the returned
* element. If the return value is NULL, @a *hint is the location where
* the respective key would be inserted.
*
* @note Private. For use by Subversion's own code only.
*/
void *
svn_sort__array_lookup(const apr_array_header_t *array,
const void *key,
int *hint,
int (*compare_func)(const void *, const void *));
/* Insert a shallow copy of @a *new_element into the array @a array at the index
* @a insert_index, growing the array and shuffling existing elements along to
* make room.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_insert(apr_array_header_t *array,
const void *new_element,
int insert_index);
/* Remove @a elements_to_delete elements starting at @a delete_index from the
* array @a arr. If @a delete_index is not a valid element of @a arr,
* @a elements_to_delete is not greater than zero, or
* @a delete_index + @a elements_to_delete is greater than @a arr->nelts,
* then do nothing.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_delete(apr_array_header_t *arr,
int delete_index,
int elements_to_delete);
/* Reverse the order of elements in @a array, in place.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_reverse(apr_array_header_t *array,
apr_pool_t *scratch_pool);
/** Priority queues.
*
* @defgroup svn_priority_queue__t Priority Queues
* @{
*/
/**
* We implement priority queues on top of existing ELEMENTS arrays. They
* provide us with memory management and very basic element type information.
*
* The extraction order is being defined by a comparison function similar
* to the ones used with qsort. The first element in the queue is always
* on with COMPARISON_FUNC(first,element) <= 0, for all elements in the
* queue.
*/
/**
* Opaque data type for priority queues.
*/
typedef struct svn_priority_queue__t svn_priority_queue__t;
/**
* Return a priority queue containing all provided @a elements and prioritize
* them according to @a compare_func.
*
* @note The priority queue will use the existing @a elements array for data
* storage. So, you must not manipulate that array while using the queue.
* Also, the lifetime of the queue is bound to that of the array.
*/
svn_priority_queue__t *
svn_priority_queue__create(apr_array_header_t *elements,
int (*compare_func)(const void *, const void *));
/**
* Returns the number of elements in the @a queue.
*/
apr_size_t
svn_priority_queue__size(svn_priority_queue__t *queue);
/**
* Returns a reference to the first element in the @a queue. The queue
* contents remains unchanged. If the @a queue is empty, #NULL will be
* returned.
*/
void *
svn_priority_queue__peek(svn_priority_queue__t *queue);
/**
* Notify the @a queue after modifying the first item as returned by
* #svn_priority_queue__peek.
*/
void
svn_priority_queue__update(svn_priority_queue__t *queue);
/**
* Remove the first element from the @a queue. This is a no-op for empty
* queues.
*/
void
svn_priority_queue__pop(svn_priority_queue__t *queue);
/**
* Append the new @a element to the @a queue. @a element must neither be
* #NULL nor the first element as returned by #svn_priority_queue__peek.
*/
void
svn_priority_queue__push(svn_priority_queue__t *queue, const void *element);
/** @} */
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* SVN_SORTS_PRIVATE_H */

View File

@ -63,7 +63,7 @@ typedef enum svn_sqlite__mode_e {
typedef svn_error_t *(*svn_sqlite__func_t)(svn_sqlite__context_t *sctx,
int argc,
svn_sqlite__value_t *values[],
apr_pool_t *scatch_pool);
void *baton);
/* Step the given statement; if it returns SQLITE_DONE, reset the statement.
@ -117,12 +117,16 @@ svn_sqlite__read_schema_version(int *version,
STATEMENTS itself may be NULL, in which case it has no impact.
See svn_sqlite__get_statement() for how these strings are used.
TIMEOUT defines the SQLite busy timeout, values <= 0 cause a Subversion
default to be used.
The statements will be finalized and the SQLite database will be closed
when RESULT_POOL is cleaned up. */
svn_error_t *
svn_sqlite__open(svn_sqlite__db_t **db, const char *repos_path,
svn_sqlite__open(svn_sqlite__db_t **db, const char *path,
svn_sqlite__mode_t mode, const char * const statements[],
int latest_schema, const char * const *upgrade_sql,
apr_int32_t timeout,
apr_pool_t *result_pool, apr_pool_t *scratch_pool);
/* Explicitly close the connection in DB. */
@ -130,11 +134,16 @@ svn_error_t *
svn_sqlite__close(svn_sqlite__db_t *db);
/* Add a custom function to be used with this database connection. The data
in BATON should live at least as long as the connection in DB. */
in BATON should live at least as long as the connection in DB.
Pass TRUE if the result of the function is constant within a statement with
a specific set of argument values and FALSE if not (or when in doubt). When
TRUE newer Sqlite versions use this knowledge for query optimizations. */
svn_error_t *
svn_sqlite__create_scalar_function(svn_sqlite__db_t *db,
const char *func_name,
int argc,
svn_boolean_t deterministic,
svn_sqlite__func_t func,
void *baton);
@ -345,6 +354,11 @@ svn_sqlite__column_is_null(svn_sqlite__stmt_t *stmt, int column);
int
svn_sqlite__column_bytes(svn_sqlite__stmt_t *stmt, int column);
/* When Subversion is compiled in maintainer mode: enables the sqlite error
logging to SVN_DBG_OUTPUT. */
void
svn_sqlite__dbg_enable_errorlog(void);
/* --------------------------------------------------------------------- */
@ -372,6 +386,9 @@ svn_sqlite__result_null(svn_sqlite__context_t *sctx);
void
svn_sqlite__result_int64(svn_sqlite__context_t *sctx, apr_int64_t val);
void
svn_sqlite__result_error(svn_sqlite__context_t *sctx, const char *msg, int num);
/* --------------------------------------------------------------------- */
@ -522,7 +539,7 @@ svn_sqlite__with_immediate_transaction(svn_sqlite__db_t *db,
SCRATCH_POOL will be passed to the callback (NULL is valid).
### Since we now require SQLite >= 3.6.18, this function has the effect of
always behaving like a defered transaction. Can it be combined with
always behaving like a deferred transaction. Can it be combined with
svn_sqlite__with_transaction()?
*/
svn_error_t *

View File

@ -131,10 +131,13 @@ svn_membuf__nzero(svn_membuf_t *membuf, apr_size_t size);
svn_string_t *
svn_stringbuf__morph_into_string(svn_stringbuf_t *strbuf);
/** Like apr_strtoff but provided here for backward compatibility
* with APR 0.9 */
apr_status_t
svn__strtoff(apr_off_t *offset, const char *buf, char **end, int base);
/** Like strtoul but with a fixed base of 10 and without overflow checks.
* This allows the compiler to generate massively faster (4x on 64bit LINUX)
* code. Overflow checks may be added on the caller side where you might
* want to test for a more specific value range anyway.
*/
unsigned long
svn__strtoul(const char *buffer, const char **end);
/** Number of chars needed to represent signed (19 places + sign + NUL) or
* unsigned (20 places + NUL) integers as strings.
@ -156,22 +159,55 @@ apr_size_t
svn__i64toa(char * dest, apr_int64_t number);
/** Returns a decimal string for @a number allocated in @a pool. Put in
* the @a seperator at each third place.
* the @a separator at each third place.
*/
char *
svn__ui64toa_sep(apr_uint64_t number, char seperator, apr_pool_t *pool);
svn__ui64toa_sep(apr_uint64_t number, char separator, apr_pool_t *pool);
/** Returns a decimal string for @a number allocated in @a pool. Put in
* the @a seperator at each third place.
* the @a separator at each third place.
*/
char *
svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
svn__i64toa_sep(apr_int64_t number, char separator, apr_pool_t *pool);
/** Writes the @a number as base36-encoded string into @a dest. The latter
* must provide space for at least #SVN_INT64_BUFFER_SIZE characters.
* Returns the number chars written excluding the terminating NUL.
*
* @note The actual maximum buffer requirement is much shorter than
* #SVN_INT64_BUFFER_SIZE but introducing yet another constant is only
* marginally useful and may open the door to security issues when e.g.
* switching between base10 and base36 encoding.
*/
apr_size_t
svn__ui64tobase36(char *dest, apr_uint64_t number);
/** Returns the value of the base36 encoded unsigned integer starting at
* @a source. If @a next is not NULL, @a *next will be set to the first
* position after the integer.
*
* The data in @a source will be considered part of the number to parse
* as long as the characters are within the base36 range. If there are
* no such characters to begin with, 0 is returned. Inputs with more than
* #SVN_INT64_BUFFER_SIZE digits will not be fully parsed, i.e. the value
* of @a *next as well as the return value are undefined.
*/
apr_uint64_t
svn__base36toui64(const char **next, const char *source);
/**
* The upper limit of the similarity range returned by
* svn_cstring__similarity() and svn_string__similarity().
*/
#define SVN_STRING__SIM_RANGE_MAX 1000000
/**
* Computes the similarity score of STRA and STRB. Returns the ratio
* of the length of their longest common subsequence and the average
* length of the strings, normalized to the range [0..1000].
* The result is equivalent to Python's
* length of the strings, normalized to the range
* [0..SVN_STRING__SIM_RANGE_MAX]. The result is equivalent to
* Python's
*
* difflib.SequenceMatcher.ratio
*
@ -196,7 +232,7 @@ svn__i64toa_sep(apr_int64_t number, char seperator, apr_pool_t *pool);
* has O(strlen(STRA) * strlen(STRB)) worst-case performance,
* so do keep a rein on your enthusiasm.
*/
unsigned int
apr_size_t
svn_cstring__similarity(const char *stra, const char *strb,
svn_membuf_t *buffer, apr_size_t *rlcs);
@ -204,12 +240,82 @@ svn_cstring__similarity(const char *stra, const char *strb,
* Like svn_cstring__similarity, but accepts svn_string_t's instead
* of NUL-terminated character strings.
*/
unsigned int
apr_size_t
svn_string__similarity(const svn_string_t *stringa,
const svn_string_t *stringb,
svn_membuf_t *buffer, apr_size_t *rlcs);
/* Return the lowest position at which A and B differ. If no difference
* can be found in the first MAX_LEN characters, MAX_LEN will be returned.
*/
apr_size_t
svn_cstring__match_length(const char *a,
const char *b,
apr_size_t max_len);
/* Return the number of bytes before A and B that don't differ. If no
* difference can be found in the first MAX_LEN characters, MAX_LEN will
* be returned. Please note that A-MAX_LEN and B-MAX_LEN must both be
* valid addresses.
*/
apr_size_t
svn_cstring__reverse_match_length(const char *a,
const char *b,
apr_size_t max_len);
/** @} */
/** Prefix trees.
*
* Prefix trees allow for a space-efficient representation of a set of path-
* like strings, i.e. those that share common prefixes. Any given string
* value will be stored only once, i.e. two strings stored in the same tree
* are equal if and only if the point to the same #svn_prefix_string__t.
*
* @defgroup svn_prefix_string Strings in prefix trees.
* @{
*/
/**
* Opaque data type for prefix-tree-based strings.
*/
typedef struct svn_prefix_string__t svn_prefix_string__t;
/**
* Opaque data type representing a prefix tree
*/
typedef struct svn_prefix_tree__t svn_prefix_tree__t;
/**
* Return a new prefix tree allocated in @a pool.
*/
svn_prefix_tree__t *
svn_prefix_tree__create(apr_pool_t *pool);
/**
* Return a string with the value @a s stored in @a tree. If no such string
* exists yet, add it automatically.
*/
svn_prefix_string__t *
svn_prefix_string__create(svn_prefix_tree__t *tree,
const char *s);
/**
* Return the contents of @a s as a new string object allocated in @a pool.
*/
svn_string_t *
svn_prefix_string__expand(const svn_prefix_string__t *s,
apr_pool_t *pool);
/**
* Compare the two strings @a lhs and @a rhs that must be part of the same
* tree.
*/
int
svn_prefix_string__compare(const svn_prefix_string__t *lhs,
const svn_prefix_string__t *rhs);
/** @} */
/** @} */

View File

@ -26,7 +26,7 @@
#include "svn_types.h"
#include "svn_io.h"
#include "svn_version.h"
#include "svn_config.h"
#ifdef __cplusplus
@ -95,11 +95,32 @@ svn_spillbuf__create(apr_size_t blocksize,
apr_size_t maxsize,
apr_pool_t *result_pool);
/* Create a spill buffer, with extra parameters. */
svn_spillbuf_t *
svn_spillbuf__create_extended(apr_size_t blocksize,
apr_size_t maxsize,
svn_boolean_t delete_on_close,
svn_boolean_t spill_all_contents,
const char* dirpath,
apr_pool_t *result_pool);
/* Determine how much content is stored in the spill buffer. */
svn_filesize_t
svn_spillbuf__get_size(const svn_spillbuf_t *buf);
/* Determine how much content the spill buffer is caching in memory. */
svn_filesize_t
svn_spillbuf__get_memory_size(const svn_spillbuf_t *buf);
/* Retrieve the name of the spill file. The returned value can be NULL
if the file has not been created yet. */
const char *
svn_spillbuf__get_filename(const svn_spillbuf_t *buf);
/* Retrieve the handle of the spill file. The returned value can be
NULL if the file has not been created yet. */
apr_file_t *
svn_spillbuf__get_file(const svn_spillbuf_t *buf);
/* Write some data into the spill buffer. */
svn_error_t *
@ -153,13 +174,13 @@ svn_spillbuf__process(svn_boolean_t *exhausted,
typedef struct svn_spillbuf_reader_t svn_spillbuf_reader_t;
/* Create a spill-buffer and a reader for it. */
/* Create a spill-buffer and a reader for it, using the same arguments as
svn_spillbuf__create(). */
svn_spillbuf_reader_t *
svn_spillbuf__reader_create(apr_size_t blocksize,
apr_size_t maxsize,
apr_pool_t *result_pool);
/* Read @a len bytes from @a reader into @a data. The number of bytes
actually read is stored in @a amt. If the content is exhausted, then
@a amt is set to zero. It will always be non-zero if the spill-buffer
@ -191,17 +212,23 @@ svn_spillbuf__reader_write(svn_spillbuf_reader_t *reader,
apr_pool_t *scratch_pool);
/* Return a stream built on top of a spillbuf, using the same arguments as
svn_spillbuf__create(). This stream can be used for reading and writing,
but implements the same basic sematics of a spillbuf for the underlying
storage. */
/* Return a stream built on top of a spillbuf.
This stream can be used for reading and writing, but implements the
same basic semantics of a spillbuf for the underlying storage. */
svn_stream_t *
svn_stream__from_spillbuf(apr_size_t blocksize,
apr_size_t maxsize,
svn_stream__from_spillbuf(svn_spillbuf_t *buf,
apr_pool_t *result_pool);
/** @} */
/*----------------------------------------------------*/
/**
* @defgroup svn_checksum_private Checksumming helper APIs
* @{
*/
/**
* Internal function for creating a MD5 checksum from a binary digest.
*
@ -221,6 +248,76 @@ svn_checksum_t *
svn_checksum__from_digest_sha1(const unsigned char *digest,
apr_pool_t *result_pool);
/**
* Internal function for creating a 32 bit FNV-1a checksum from a binary
* digest.
*
* @since New in 1.9
*/
svn_checksum_t *
svn_checksum__from_digest_fnv1a_32(const unsigned char *digest,
apr_pool_t *result_pool);
/**
* Internal function for creating a modified 32 bit FNV-1a checksum from
* a binary digest.
*
* @since New in 1.9
*/
svn_checksum_t *
svn_checksum__from_digest_fnv1a_32x4(const unsigned char *digest,
apr_pool_t *result_pool);
/**
* Return a stream that calculates a checksum of type @a kind over all
* data written to the @a inner_stream. When the returned stream gets
* closed, write the checksum to @a *checksum.
* Allocate the result in @a pool.
*
* @note The stream returned only supports #svn_stream_write and
* #svn_stream_close.
*/
svn_stream_t *
svn_checksum__wrap_write_stream(svn_checksum_t **checksum,
svn_stream_t *inner_stream,
svn_checksum_kind_t kind,
apr_pool_t *pool);
/**
* Return a stream that calculates a 32 bit modified FNV-1a checksum
* over all data written to the @a inner_stream and writes the digest
* to @a *digest when the returned stream gets closed.
* Allocate the stream in @a pool.
*/
svn_stream_t *
svn_checksum__wrap_write_stream_fnv1a_32x4(apr_uint32_t *digest,
svn_stream_t *inner_stream,
apr_pool_t *pool);
/**
* Return a 32 bit FNV-1a checksum for the first @a len bytes in @a input.
*
* @since New in 1.9
*/
apr_uint32_t
svn__fnv1a_32(const void *input, apr_size_t len);
/**
* Return a 32 bit modified FNV-1a checksum for the first @a len bytes in
* @a input.
*
* @note This is a proprietary checksumming algorithm based FNV-1a with
* approximately the same strength. It is up to 4 times faster
* than plain FNV-1a for longer data blocks.
*
* @since New in 1.9
*/
apr_uint32_t
svn__fnv1a_32x4(const void *input, apr_size_t len);
/** @} */
/**
* @defgroup svn_hash_support Hash table serialization support
@ -285,6 +382,54 @@ svn_hash__make(apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_hash_read Reading serialized hash tables
* @{
*/
/** Struct that represents a key value pair read from a serialized hash
* representation. There are special cases that can also be represented:
* a #NULL @a key signifies the end of the hash, a #NULL @a val for non-
* NULL keys is only possible in incremental mode describes a deletion.
*
* @since New in 1.9.
*/
typedef struct svn_hash__entry_t
{
/** 0-terminated Key. #NULL if this contains no data at all because we
* encountered the end of the hash. */
char *key;
/** Length of @a key. Must be 0 if @a key is #NULL. */
apr_size_t keylen;
/** 0-terminated value stored with the key. If this is #NULL for a
* non-NULL @a key, then this means that the key shall be removed from
* the hash (only used in incremental mode). Must be #NULL if @a key is
* #NULL. */
char *val;
/** Length of @a val. Must be 0 if @a val is #NULL. */
apr_size_t vallen;
} svn_hash__entry_t;
/** Reads a single key-value pair from @a stream and returns it in the
* caller-provided @a *entry (members don't need to be pre-initialized).
* @a pool is used to allocate members of @a *entry and for tempoaries.
*
* @see #svn_hash_read2 for more details.
*
* @since New in 1.9.
*/
svn_error_t *
svn_hash__read_entry(svn_hash__entry_t *entry,
svn_stream_t *stream,
const char *terminator,
svn_boolean_t incremental,
apr_pool_t *pool);
/** @} */
/** @} */
@ -332,20 +477,230 @@ svn_version__at_least(svn_version_t *version,
int minor,
int patch);
/** Like svn_ver_check_list(), but with a @a comparator parameter.
* Private backport of svn_ver_check_list2() from trunk.
/** @} */
/**
* @defgroup svn_compress Data (de-)compression API
* @{
*/
/* This is at least as big as the largest size of an integer that
svn__encode_uint() can generate; it is sufficient for creating buffers
for it to write into. This assumes that integers are at most 64 bits,
and so 10 bytes (with 7 bits of information each) are sufficient to
represent them. */
#define SVN__MAX_ENCODED_UINT_LEN 10
/* Compression method parameters for svn__encode_uint. */
/* No compression (but a length prefix will still be added to the buffer) */
#define SVN__COMPRESSION_NONE 0
/* Fastest, least effective compression method & level provided by zlib. */
#define SVN__COMPRESSION_ZLIB_MIN 1
/* Default compression method & level provided by zlib. */
#define SVN__COMPRESSION_ZLIB_DEFAULT 5
/* Slowest, best compression method & level provided by zlib. */
#define SVN__COMPRESSION_ZLIB_MAX 9
/* Encode VAL into the buffer P using the variable-length 7b/8b unsigned
integer format. Return the incremented value of P after the
encoded bytes have been written. P must point to a buffer of size
at least SVN__MAX_ENCODED_UINT_LEN.
This encoding uses the high bit of each byte as a continuation bit
and the other seven bits as data bits. High-order data bits are
encoded first, followed by lower-order bits, so the value can be
reconstructed by concatenating the data bits from left to right and
interpreting the result as a binary number. Examples (brackets
denote byte boundaries, spaces are for clarity only):
1 encodes as [0 0000001]
33 encodes as [0 0100001]
129 encodes as [1 0000001] [0 0000001]
2000 encodes as [1 0001111] [0 1010000]
*/
unsigned char *
svn__encode_uint(unsigned char *p, apr_uint64_t val);
/* Decode an unsigned 7b/8b-encoded integer into *VAL and return a pointer
to the byte after the integer. The bytes to be decoded live in the
range [P..END-1]. If these bytes do not contain a whole encoded
integer, return NULL; in this case *VAL is undefined.
See the comment for svn__encode_uint() earlier in this file for more
detail on the encoding format. */
const unsigned char *
svn__decode_uint(apr_uint64_t *val,
const unsigned char *p,
const unsigned char *end);
/* Get the data from IN, compress it according to the specified
* COMPRESSION_METHOD and write the result to OUT.
* SVN__COMPRESSION_NONE is valid for COMPRESSION_METHOD.
*/
svn_error_t *
svn_ver__check_list2(const svn_version_t *my_version,
const svn_version_checklist_t *checklist,
svn_boolean_t (*comparator)(const svn_version_t *,
const svn_version_t *));
svn__compress(svn_stringbuf_t *in,
svn_stringbuf_t *out,
int compression_method);
/** To minimize merge churn in callers, alias the trunk name privately. */
#define svn_ver_check_list2 svn_ver__check_list2
/* Get the compressed data from IN, decompress it and write the result to
* OUT. Return an error if the decompressed size is larger than LIMIT.
*/
svn_error_t *
svn__decompress(svn_stringbuf_t *in,
svn_stringbuf_t *out,
apr_size_t limit);
/** @} */
/**
* @defgroup svn_root_pools Recycle-able root pools API
* @{
*/
/* Opaque thread-safe container for unused / recylcleable root pools.
*
* Recyling root pools (actually, their allocators) circumvents a
* scalability bottleneck in the OS memory management when multi-threaded
* applications frequently create and destroy allocators.
*/
typedef struct svn_root_pools__t svn_root_pools__t;
/* Create a new root pools container and return it in *POOLS.
*/
svn_error_t *
svn_root_pools__create(svn_root_pools__t **pools);
/* Return a currently unused pool from POOLS. If POOLS is empty, create a
* new root pool and return that. The pool returned is not thread-safe.
*/
apr_pool_t *
svn_root_pools__acquire_pool(svn_root_pools__t *pools);
/* Clear and release the given root POOL and put it back into POOLS.
* If that fails, destroy POOL.
*/
void
svn_root_pools__release_pool(apr_pool_t *pool,
svn_root_pools__t *pools);
/** @} */
/**
* @defgroup svn_config_private Private configuration handling API
* @{
*/
/* Future attempts to modify CFG will trigger an assertion. */
void
svn_config__set_read_only(svn_config_t *cfg,
apr_pool_t *scratch_pool);
/* Return TRUE, if CFG cannot be modified. */
svn_boolean_t
svn_config__is_read_only(svn_config_t *cfg);
/* Return TRUE, if OPTION in SECTION in CFG exists and does not require
* further expansion (due to either containing no placeholders or already
* having been expanded). */
svn_boolean_t
svn_config__is_expanded(svn_config_t *cfg,
const char *section,
const char *option);
/* Return a shallow copy of SCR in POOL. If SRC is read-only, different
* shallow copies may be used from different threads.
*
* Any single r/o svn_config_t or shallow copy is not thread-safe because
* it contains shared buffers for tempoary data.
*/
svn_config_t *
svn_config__shallow_copy(svn_config_t *src,
apr_pool_t *pool);
/* Add / replace SECTION in TARGET with the same section from SOURCE by
* simply adding a reference to it. If TARGET is read-only, the sections
* list in target gets duplicated before the modification.
*
* This is an API tailored for use by the svn_repos__authz_pool_t API to
* prevent breach of encapsulation.
*/
void
svn_config__shallow_replace_section(svn_config_t *target,
svn_config_t *source,
const char *section);
/* Allocate *CFG_HASH and populate it with default, empty,
* svn_config_t for the configuration categories (@c
* SVN_CONFIG_CATEGORY_SERVERS, @c SVN_CONFIG_CATEGORY_CONFIG, etc.).
* This returns a hash equivalent to svn_config_get_config when the
* config files are empty.
*/
svn_error_t *
svn_config__get_default_config(apr_hash_t **cfg_hash,
apr_pool_t *pool);
/** @} */
/**
* @defgroup svn_bit_array Packed bit array handling API
* @{
*/
/* This opaque data struct is an alternative to an INT->VOID hash.
*
* Technically, it is an automatically growing packed bit array.
* All indexes not previously set are implicitly 0 and setting it will
* grow the array as needed.
*/
typedef struct svn_bit_array__t svn_bit_array__t;
/* Return a new bit array allocated in POOL. MAX is a mere hint for
* the initial size of the array in bits.
*/
svn_bit_array__t *
svn_bit_array__create(apr_size_t max,
apr_pool_t *pool);
/* Set bit at index IDX in ARRAY to VALUE. If necessary, grow the
* underlying data buffer, i.e. any IDX is valid unless we run OOM.
*/
void
svn_bit_array__set(svn_bit_array__t *array,
apr_size_t idx,
svn_boolean_t value);
/* Get the bit value at index IDX in ARRAY. Bits not previously accessed
* are implicitly 0 (or FALSE). That implies IDX can never be out-of-range.
*/
svn_boolean_t
svn_bit_array__get(svn_bit_array__t *array,
apr_size_t idx);
/* Return the global pool used by the DSO loader, this may be NULL if
no DSOs have been loaded. */
apr_pool_t *
svn_dso__pool(void);
/** @} */
/* Return the xml (expat) version we compiled against. */
const char *svn_xml__compiled_version(void);
/* Return the xml (expat) version we run against. */
const char *svn_xml__runtime_version(void);
/* Return the zlib version we compiled against. */
const char *svn_zlib__compiled_version(void);
/* Return the zlib version we run against. */
const char *svn_zlib__runtime_version(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -142,6 +142,22 @@ svn_temp_serializer__push(svn_temp_serializer__context_t *context,
void
svn_temp_serializer__pop(svn_temp_serializer__context_t *context);
/**
* Serialize a referenced sub-structure within the serialization
* @a context. @a source_struct must be a reference to the
* pointer in the original parent structure so that the correspondence in
* the serialized structure can be established. @a struct_size must match
* the result of @c sizeof() of the actual structure.
*
* This function is equivalent but more efficient than calling
* #svn_temp_serializer__push() immediately followed by
* #svn_temp_serializer__pop().
*/
void
svn_temp_serializer__add_leaf(svn_temp_serializer__context_t *context,
const void * const * source_struct,
apr_size_t struct_size);
/**
* Serialize a string referenced from the current structure within the
* serialization @a context. @a s must be a reference to the @c char*

View File

@ -21,7 +21,7 @@
* @endcopyright
*
* @file svn_utf_private.h
* @brief UTF validation routines
* @brief UTF validation and normalization routines
*/
#ifndef SVN_UTF_PRIVATE_H
@ -31,6 +31,8 @@
#include <apr_pools.h>
#include "svn_types.h"
#include "svn_string.h"
#include "svn_string_private.h"
#ifdef __cplusplus
extern "C" {
@ -71,6 +73,18 @@ svn_utf__last_valid(const char *src, apr_size_t len);
const char *
svn_utf__last_valid2(const char *src, apr_size_t len);
/* Copy LENGTH bytes of SRC, converting characters as follows:
- Pass characters from the ASCII subset to the result
- Strip all combining marks from the string
- Represent other valid Unicode chars as {U+XXXX}
- Replace invalid Unicode chars with {U?XXXX}
- Represent chars that are not valid UTF-8 as ?\XX
- Replace codes outside the Unicode range with a sequence of ?\XX
- Represent the null byte as \0
Allocate the result in POOL. */
const char *
svn_utf__fuzzy_escape(const char *src, apr_size_t length, apr_pool_t *pool);
const char *
svn_utf__cstring_from_utf8_fuzzy(const char *src,
apr_pool_t *pool,
@ -80,6 +94,166 @@ svn_utf__cstring_from_utf8_fuzzy(const char *src,
apr_pool_t *));
#if defined(WIN32)
/* On Windows: Convert the UTF-8 string SRC to UTF-16.
If PREFIX is not NULL, prepend it to the converted result.
The result, if not empty, will be allocated in RESULT_POOL. */
svn_error_t *
svn_utf__win32_utf8_to_utf16(const WCHAR **result,
const char *src,
const WCHAR *prefix,
apr_pool_t *result_pool);
/* On Windows: Convert the UTF-16 string SRC to UTF-8.
If PREFIX is not NULL, prepend it to the converted result.
The result, if not empty, will be allocated in RESULT_POOL. */
svn_error_t *
svn_utf__win32_utf16_to_utf8(const char **result,
const WCHAR *src,
const char *prefix,
apr_pool_t *result_pool);
#endif /* WIN32*/
/* A constant used for many length parameters in the utf8proc wrappers
* to indicate that the length of a string is unknonw. */
#define SVN_UTF__UNKNOWN_LENGTH ((apr_size_t) -1)
/* Compare two UTF-8 strings, ignoring normalization, using buffers
* BUF1 and BUF2 for temporary storage. If either of LEN1 or LEN2 is
* SVN_UTF__UNKNOWN_LENGTH, assume the associated string is
* null-terminated; otherwise, consider the string only up to the
* given length.
*
* Return compare value in *RESULT.
*/
svn_error_t *
svn_utf__normcmp(int *result,
const char *str1, apr_size_t len1,
const char *str2, apr_size_t len2,
svn_membuf_t *buf1, svn_membuf_t *buf2);
/* Normalize the UTF-8 string STR to form C, using BUF for temporary
* storage. If LEN is SVN_UTF__UNKNOWN_LENGTH, assume STR is
* null-terminated; otherwise, consider the string only up to the
* given length.
*
* Return the normalized string in *RESULT, which shares storage with
* BUF and is valid only until the next time BUF is modified.
*
* A returned error may indicate that STRING contains invalid UTF-8 or
* invalid Unicode codepoints.
*/
svn_error_t*
svn_utf__normalize(const char **result,
const char *str, apr_size_t len,
svn_membuf_t *buf);
/* Check if STRING is a valid, NFC-normalized UTF-8 string. Note that
* a FALSE return value may indicate that STRING is not valid UTF-8 at
* all.
*
* Use SCRATCH_POOL for temporary allocations.
*/
svn_boolean_t
svn_utf__is_normalized(const char *string, apr_pool_t *scratch_pool);
/* Encode an UCS-4 string to UTF-8, placing the result into BUFFER.
* While utf8proc does have a similar function, it does more checking
* and processing than we want here; this function does not attempt
* any normalizations but just encodes the individual code points.
* The encoded string will always be NUL-terminated.
*
* Return the length of the result (excluding the NUL terminator) in
* *result_length.
*
* A returned error indicates that a codepoint is invalid.
*/
svn_error_t *
svn_utf__encode_ucs4_string(svn_membuf_t *buffer,
const apr_int32_t *ucs4str,
apr_size_t length,
apr_size_t *result_length);
/* Pattern matching similar to the the SQLite LIKE and GLOB
* operators. PATTERN, KEY and ESCAPE must all point to UTF-8
* strings. Furthermore, ESCAPE, if provided, must be a character from
* the ASCII subset.
*
* If any of PATTERN_LEN, STRING_LEN or ESCAPE_LEN are
* SVN_UTF__UNKNOWN_LENGTH, assume the associated string is
* null-terminated; otherwise, consider the string only up to the
* given length.
*
* Use buffers PATTERN_BUF, STRING_BUF and TEMP_BUF for temporary storage.
*
* If SQL_LIKE is true, interpret PATTERN as a pattern used by the SQL
* LIKE operator and notice ESCAPE. Otherwise it's a Unix fileglob
* pattern, and ESCAPE must be NULL.
*
* Set *MATCH to the result of the comparison.
*/
svn_error_t *
svn_utf__glob(svn_boolean_t *match,
const char *pattern, apr_size_t pattern_len,
const char *string, apr_size_t string_len,
const char *escape, apr_size_t escape_len,
svn_boolean_t sql_like,
svn_membuf_t *pattern_buf,
svn_membuf_t *string_buf,
svn_membuf_t *temp_buf);
/* Return the compiled version of the wrapped utf8proc library. */
const char *
svn_utf__utf8proc_compiled_version(void);
/* Return the runtime version of the wrapped utf8proc library. */
const char *
svn_utf__utf8proc_runtime_version(void);
/* Convert an UTF-16 (or UCS-2) string to UTF-8, returning the pointer
* in RESULT. If BIG_ENDIAN is set, then UTF16STR is big-endian;
* otherwise, it's little-endian.
*
* If UTF16LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF16STR must be
* terminated with a zero; otherwise, it is the number of 16-bit codes
* to convert, and the source string may contain NUL values.
*
* Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
* intermediate allocation.
*
* This function combines UTF-16 surrogate pairs into single code
* points, but will leave single lead or trail surrogates unchanged.
*/
svn_error_t *
svn_utf__utf16_to_utf8(const svn_string_t **result,
const apr_uint16_t *utf16str,
apr_size_t utf16len,
svn_boolean_t big_endian,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Convert an UTF-32 string to UTF-8, returning the pointer in
* RESULT. If BIG_ENDIAN is set, then UTF32STR is big-endian;
* otherwise, it's little-endian.
*
* If UTF32LEN is SVN_UTF__UNKNOWN_LENGTH, then UTF32STR must be
* terminated with a zero; otherwise, it is the number of 32-bit codes
* to convert, and the source string may contain NUL values.
*
* Allocate RESULT in RESULT_POOL and use SCRATCH_POOL for
* intermediate allocation.
*/
svn_error_t *
svn_utf__utf32_to_utf8(const svn_string_t **result,
const apr_int32_t *utf32str,
apr_size_t utf32len,
svn_boolean_t big_endian,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -82,8 +82,6 @@ svn_wc__get_file_external_editor(const svn_delta_editor_t **editor,
const char *recorded_url,
const svn_opt_revision_t *recorded_peg_rev,
const svn_opt_revision_t *recorded_rev,
svn_wc_conflict_resolver_func2_t conflict_func,
void *conflict_baton,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
@ -354,7 +352,6 @@ svn_wc__get_wcroot(const char **wcroot_abspath,
* before the 1.7 release.
*/
/*
* Convert from svn_wc_conflict_description2_t to
* svn_wc_conflict_description_t. This is needed by some backwards-compat
@ -370,7 +367,11 @@ svn_wc__cd2_to_cd(const svn_wc_conflict_description2_t *conflict,
/*
* Convert from svn_wc_status3_t to svn_wc_status2_t.
* Allocate the result in RESULT_POOL.
*
* Deprecated because svn_wc_status2_t is deprecated and the only
* calls are from other deprecated functions.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc__status2_from_3(svn_wc_status2_t **status,
const svn_wc_status3_t *old_status,
@ -379,15 +380,13 @@ svn_wc__status2_from_3(svn_wc_status2_t **status,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Set @a *children to a new array of the immediate children of the working
* node at @a dir_abspath. The elements of @a *children are (const char *)
* absolute paths.
*
* Include children that are scheduled for deletion. Iff @a show_hidden
* is true, also include children that are 'excluded' or 'server-excluded' or
* 'not-present'.
* Include children that are scheduled for deletion, but not those that
* are excluded, server-excluded or not-present.
*
* Return every path that refers to a child of the working node at
* @a dir_abspath. Do not include a path just because it was a child of a
@ -401,24 +400,20 @@ svn_error_t *
svn_wc__node_get_children_of_working_node(const apr_array_header_t **children,
svn_wc_context_t *wc_ctx,
const char *dir_abspath,
svn_boolean_t show_hidden,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Like svn_wc__node_get_children_of_working_node(), except also include any
* path that was a child of a deleted directory that existed at
* @a dir_abspath, even if that directory is now scheduled to be replaced by
* the working node at @a dir_abspath.
* Gets the immediate 'not-present' children of a node.
*
* #### Needed during 'svn cp WC URL' to handle mixed revision cases
*/
svn_error_t *
svn_wc__node_get_children(const apr_array_header_t **children,
svn_wc_context_t *wc_ctx,
const char *dir_abspath,
svn_boolean_t show_hidden,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
svn_wc__node_get_not_present_children(const apr_array_header_t **children,
svn_wc_context_t *wc_ctx,
const char *dir_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Fetch the repository information for the working version
@ -442,18 +437,6 @@ svn_wc__node_get_repos_info(svn_revnum_t *revision,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Get the depth of @a local_abspath using @a wc_ctx. If @a local_abspath is
* not in the working copy, return @c SVN_ERR_WC_PATH_NOT_FOUND.
*/
svn_error_t *
svn_wc__node_get_depth(svn_depth_t *depth,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/**
* Get the changed revision, date and author for @a local_abspath using @a
* wc_ctx. Allocate the return values in @a result_pool; use @a scratch_pool
@ -501,6 +484,8 @@ svn_wc__node_get_url(const char **url,
* If not NULL, sets @a revision, @a repos_relpath, @a repos_root_url and
* @a repos_uuid to the original (if a copy) or their current values.
*
* If not NULL, set @a depth, to the recorded depth on @a local_abspath.
*
* If @a copy_root_abspath is not NULL, and @a *is_copy indicates that the
* node was copied, set @a *copy_root_abspath to the local absolute path of
* the root of the copied subtree containing the node. If the copied node is
@ -519,6 +504,7 @@ svn_wc__node_get_origin(svn_boolean_t *is_copy,
const char **repos_relpath,
const char **repos_root_url,
const char **repos_uuid,
svn_depth_t *depth,
const char **copy_root_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
@ -526,38 +512,6 @@ svn_wc__node_get_origin(svn_boolean_t *is_copy,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Set @a *is_deleted to TRUE if @a local_abspath is deleted, using
* @a wc_ctx. If @a local_abspath is not in the working copy, return
* @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a scratch_pool for all temporary
* allocations.
*/
svn_error_t *
svn_wc__node_is_status_deleted(svn_boolean_t *is_deleted,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/**
* Set @a *deleted_ancestor_abspath to the root of the delete operation
* that deleted @a local_abspath. If @a local_abspath itself was deleted
* and has no deleted ancestor, @a *deleted_ancestor_abspath will equal
* @a local_abspath. If @a local_abspath was not deleted,
* set @a *deleted_ancestor_abspath to @c NULL.
*
* A node is considered 'deleted' if it is deleted or moved-away, and is
* not replaced.
*
* @a *deleted_ancestor_abspath is allocated in @a result_pool.
* Use @a scratch_pool for all temporary allocations.
*/
svn_error_t *
svn_wc__node_get_deleted_ancestor(const char **deleted_ancestor_abspath,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Set @a *not_present to TRUE when @a local_abspath has status
* svn_wc__db_status_not_present. Set @a *user_excluded to TRUE when
@ -641,7 +595,6 @@ svn_wc__node_get_base(svn_node_kind_t *kind,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t ignore_enoent,
svn_boolean_t show_hidden,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@ -771,20 +724,6 @@ svn_wc__call_with_write_lock(svn_wc__with_write_lock_func_t func,
} while (0)
/**
* Calculates the schedule and copied status of a node as that would
* have been stored in an svn_wc_entry_t instance.
*
* If not @c NULL, @a schedule and @a copied are set to their calculated
* values.
*/
svn_error_t *
svn_wc__node_get_schedule(svn_wc_schedule_t *schedule,
svn_boolean_t *copied,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
apr_pool_t *scratch_pool);
/** A callback invoked by svn_wc__prop_list_recursive().
* It is equivalent to svn_proplist_receiver_t declared in svn_client.h,
* but kept private within the svn_wc__ namespace because it is used within
@ -978,15 +917,17 @@ svn_wc__get_excluded_subtrees(apr_hash_t **server_excluded_subtrees,
/* Indicate in @a *is_modified whether the working copy has local
* modifications, using context @a wc_ctx.
* Use @a scratch_pool for temporary allocations.
*
* This function provides a subset of the functionality of
* svn_wc_revision_status2() and is more efficient if the caller
* doesn't need all information returned by svn_wc_revision_status2(). */
* If IGNORE_UNVERSIONED, unversioned paths inside the tree rooted by
* LOCAL_ABSPATH are not seen as a change, otherwise they are.
* (svn:ignored paths are always ignored)
*
* Use @a scratch_pool for temporary allocations. */
svn_error_t *
svn_wc__has_local_mods(svn_boolean_t *is_modified,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t ignore_unversioned,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
@ -1294,6 +1235,44 @@ svn_wc__resolve_relative_external_url(const char **resolved_url,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
typedef enum svn_wc__external_description_format_t
{
/* LOCALPATH [-r PEG] URL */
svn_wc__external_description_format_1 = 0,
/* [-r REV] URL[@PEG] LOCALPATH, introduced in Subversion 1.5 */
svn_wc__external_description_format_2
} svn_wc__external_description_format_t;
/* Additional information about what the external's parser has parsed. */
typedef struct svn_wc__externals_parser_info_t
{
/* The syntax format used by the external description. */
svn_wc__external_description_format_t format;
/* The string used for defining the operative revision, i.e.
"-rN", "-rHEAD", or "-r{DATE}".
NULL if revision was not given. */
const char *rev_str;
/* The string used for defining the peg revision (equals rev_str in
format 1, is "@N", or "@HEAD" or "@{DATE}" in format 2).
NULL if peg revision was not given. */
const char *peg_rev_str;
} svn_wc__externals_parser_info_t;
/* Like svn_wc_parse_externals_description3() but returns an additional array
* with elements of type svn_wc__externals_parser_info_t in @a *parser_infos_p.
* @a parser_infos_p may be NULL if not required by the caller.
*/
svn_error_t *
svn_wc__parse_externals_description(apr_array_header_t **externals_p,
apr_array_header_t **parser_infos_p,
const char *defining_directory,
const char *desc,
svn_boolean_t canonicalize_url,
apr_pool_t *pool);
/**
* Set @a *editor and @a *edit_baton to an editor that generates
@ -1318,8 +1297,8 @@ svn_wc__resolve_relative_external_url(const char **resolved_url,
*
* Assuming the target is a directory, then:
*
* - If @a get_all is FALSE, then only locally-modified entries will be
* returned. If TRUE, then all entries will be returned.
* - If @a get_all is @c FALSE, then only locally-modified entries will be
* returned. If @c TRUE, then all entries will be returned.
*
* - If @a depth is #svn_depth_empty, a status structure will
* be returned for the target only; if #svn_depth_files, for the
@ -1334,6 +1313,9 @@ svn_wc__resolve_relative_external_url(const char **resolved_url,
* If the given @a depth is incompatible with the depth found in a
* working copy directory, the found depth always governs.
*
* If @a check_working_copy is not set, do not scan the working copy
* for local modifications, taking only the BASE tree into account.
*
* If @a no_ignore is set, statuses that would typically be ignored
* will instead be reported.
*
@ -1368,6 +1350,7 @@ svn_wc__get_status_editor(const svn_delta_editor_t **editor,
const char *target_basename,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t check_working_copy,
svn_boolean_t no_ignore,
svn_boolean_t depth_as_sticky,
svn_boolean_t server_performs_filtering,
@ -1557,7 +1540,7 @@ svn_wc__get_switch_editor(const svn_delta_editor_t **editor,
* Diffs will be reported as valid relpaths, with @a anchor_abspath being
* the root ("").
*
* @a callbacks/@a callback_baton is the callback table to use.
* @a diff_processor will retrieve the diff report.
*
* If @a depth is #svn_depth_empty, just diff exactly @a target or
* @a anchor_path if @a target is empty. If #svn_depth_files then do the same
@ -1583,8 +1566,12 @@ svn_wc__get_switch_editor(const svn_delta_editor_t **editor,
* if they weren't modified after being copied. This allows the callbacks
* to generate appropriate --git diff headers for such files.
*
* Normally, the difference from repository->working_copy is shown.
* If @a reverse_order is TRUE, then show working_copy->repository diffs.
* Normally, the difference from repository->working_copy is shown. If
* @a reverse_order is TRUE, then we want to show working_copy->repository
* diffs. Most of the reversal is done by the caller; here we just swap the
* order of reporting a replacement so that the local addition is reported
* before the remote delete. (The caller's diff processor can then transform
* adds into deletes and deletes into adds, but it can't reorder the output.)
*
* If @a cancel_func is non-NULL, it will be used along with @a cancel_baton
* to periodically check if the client has canceled the operation.
@ -1628,14 +1615,11 @@ svn_wc__get_diff_editor(const svn_delta_editor_t **editor,
const char *target,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
svn_boolean_t show_copies_as_adds,
svn_boolean_t use_git_diff_format,
svn_boolean_t use_text_base,
svn_boolean_t reverse_order,
svn_boolean_t server_performs_filtering,
const apr_array_header_t *changelist_filter,
const svn_wc_diff_callbacks4_t *callbacks,
void *callback_baton,
const svn_diff_tree_processor_t *diff_processor,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
@ -1840,6 +1824,29 @@ svn_wc__acquire_write_lock_for_resolve(const char **lock_root_abspath,
const char *local_abspath,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* The implemementation of svn_wc_diff6(), but reporting to a diff processor
*
* If ROOT_RELPATH is not NULL, set *ROOT_RELPATH to the target of the diff
* within the diff namespace. ("" or a single path component).
*
* If ROOT_IS_FILE is NOT NULL set it
* the first processor call. (The anchor is LOCAL_ABSPATH or an ancestor of it)
*/
svn_error_t *
svn_wc__diff7(const char **root_relpath,
svn_boolean_t *root_is_dir,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
svn_boolean_t ignore_ancestry,
const apr_array_header_t *changelist_filter,
const svn_diff_tree_processor_t *diff_processor,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -884,7 +884,11 @@ svn_auth_get_platform_specific_client_providers(
* @note An administrative password reset may invalidate the account's
* secret key. This function will detect that situation and behave as
* if the password were not cached at all.
* @deprecated Provided for backwards compatibility with the 1.8 API. Use
* svn_auth_get_platform_specific_provider with provider_name of "windows"
* and provider_type of "simple".
*/
SVN_DEPRECATED
void
svn_auth_get_windows_simple_provider(svn_auth_provider_object_t **provider,
apr_pool_t *pool);
@ -906,7 +910,11 @@ svn_auth_get_windows_simple_provider(svn_auth_provider_object_t **provider,
* @note An administrative password reset may invalidate the account's
* secret key. This function will detect that situation and behave as
* if the password were not cached at all.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "windows" and provider_type of "ssl_client_cert_pw".
*/
SVN_DEPRECATED
void
svn_auth_get_windows_ssl_client_cert_pw_provider(
svn_auth_provider_object_t **provider,
@ -923,7 +931,11 @@ svn_auth_get_windows_ssl_client_cert_pw_provider(
*
* @since New in 1.5.
* @note This function is only available on Windows.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "windows" and provider_type of "ssl_server_trust".
*/
SVN_DEPRECATED
void
svn_auth_get_windows_ssl_server_trust_provider(
svn_auth_provider_object_t **provider,
@ -943,7 +955,11 @@ svn_auth_get_windows_ssl_server_trust_provider(
*
* @since New in 1.4
* @note This function is only available on Mac OS 10.2 and higher.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "keychain" and provider_type of "simple".
*/
SVN_DEPRECATED
void
svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider,
apr_pool_t *pool);
@ -959,7 +975,11 @@ svn_auth_get_keychain_simple_provider(svn_auth_provider_object_t **provider,
*
* @since New in 1.6
* @note This function is only available on Mac OS 10.2 and higher.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "keychain" and provider_type of "ssl_client_cert_pw".
*/
SVN_DEPRECATED
void
svn_auth_get_keychain_ssl_client_cert_pw_provider(
svn_auth_provider_object_t **provider,
@ -1029,7 +1049,11 @@ svn_auth_gnome_keyring_version(void);
* @since New in 1.6
* @note This function actually works only on systems with
* libsvn_auth_gnome_keyring and GNOME Keyring installed.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "gnome_keyring" and provider_type of "simple".
*/
SVN_DEPRECATED
void
svn_auth_get_gnome_keyring_simple_provider(
svn_auth_provider_object_t **provider,
@ -1056,7 +1080,11 @@ svn_auth_get_gnome_keyring_simple_provider(
* @since New in 1.6
* @note This function actually works only on systems with
* libsvn_auth_gnome_keyring and GNOME Keyring installed.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "gnome_keyring" and provider_type of "ssl_client_cert_pw".
*/
SVN_DEPRECATED
void
svn_auth_get_gnome_keyring_ssl_client_cert_pw_provider(
svn_auth_provider_object_t **provider,
@ -1084,7 +1112,11 @@ svn_auth_kwallet_version(void);
* @since New in 1.6
* @note This function actually works only on systems with libsvn_auth_kwallet
* and KWallet installed.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "kwallet" and provider_type of "simple".
*/
SVN_DEPRECATED
void
svn_auth_get_kwallet_simple_provider(svn_auth_provider_object_t **provider,
apr_pool_t *pool);
@ -1102,7 +1134,11 @@ svn_auth_get_kwallet_simple_provider(svn_auth_provider_object_t **provider,
* @since New in 1.6
* @note This function actually works only on systems with libsvn_auth_kwallet
* and KWallet installed.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "kwallet" and provider_type of "ssl_client_cert_pw".
*/
SVN_DEPRECATED
void
svn_auth_get_kwallet_ssl_client_cert_pw_provider(
svn_auth_provider_object_t **provider,
@ -1124,7 +1160,11 @@ svn_auth_get_kwallet_ssl_client_cert_pw_provider(
* @since New in 1.8
* @note This function actually works only on systems with
* GNU Privacy Guard installed.
* @deprecated Provided for backwards compatibility with the 1.8 API.
* Use svn_auth_get_platform_specific_provider with provider_name
* of "gpg_agent" and provider_type of "simple".
*/
SVN_DEPRECATED
void
svn_auth_get_gpg_agent_simple_provider
(svn_auth_provider_object_t **provider,

View File

@ -41,6 +41,9 @@ extern "C" {
/** Cache resource settings. It controls what caches, in what size and
how they will be created. The settings apply for the whole process.
@note Do not extend this data structure as this would break binary
compatibility.
@since New in 1.7.
*/
typedef struct svn_cache_config_t
@ -56,6 +59,8 @@ typedef struct svn_cache_config_t
/** is this application guaranteed to be single-threaded? */
svn_boolean_t single_threaded;
/* DON'T add new members here. Bump struct and API version instead. */
} svn_cache_config_t;
/** Get the current cache configuration. If it has not been set,

View File

@ -48,7 +48,17 @@ typedef enum svn_checksum_kind_t
svn_checksum_md5,
/** The checksum is (or should be set to) a SHA1 checksum. */
svn_checksum_sha1
svn_checksum_sha1,
/** The checksum is (or should be set to) a FNV-1a 32 bit checksum,
* in big endian byte order.
* @since New in 1.9. */
svn_checksum_fnv1a_32,
/** The checksum is (or should be set to) a modified FNV-1a 32 bit,
* in big endian byte order.
* @since New in 1.9. */
svn_checksum_fnv1a_32x4
} svn_checksum_kind_t;
/**

View File

@ -465,13 +465,19 @@ typedef struct svn_client_commit_item3_t
{
/* IMPORTANT: If you extend this structure, add new fields to the end. */
/** absolute working-copy path of item */
/** absolute working-copy path of item. Always set during normal commits
* (and copies from a working copy) to the repository. Can only be NULL
* when stub commit items are created for operations that only involve
* direct repository operations. During WC->REPOS copy operations, this
* path is the WC source path of the operation. */
const char *path;
/** node kind (dir, file) */
svn_node_kind_t kind;
/** commit URL for this item */
/** commit URL for this item. Points to the repository location of PATH
* during commits, or to the final URL of the item when copying from the
* working copy to the repository. */
const char *url;
/** revision of textbase */
@ -1014,6 +1020,31 @@ typedef struct svn_client_ctx_t
* @since New in 1.7. */
svn_wc_context_t *wc_ctx;
/** Check-tunnel callback
*
* If not @c NULL, and open_tunnel_func is also not @c NULL, this
* callback will be invoked to check if open_tunnel_func should be
* used to create a specific tunnel, or if the default tunnel
* implementation (either built-in or configured in the client
* configuration file) should be used instead.
* @since New in 1.9.
*/
svn_ra_check_tunnel_func_t check_tunnel_func;
/** Open-tunnel callback
*
* If not @c NULL, this callback will be invoked to create a tunnel
* for a ra_svn connection that needs one, overriding any tunnel
* definitions in the client config file. This callback is used only
* for ra_svn and ignored by the other RA modules.
* @since New in 1.9.
*/
svn_ra_open_tunnel_func_t open_tunnel_func;
/** The baton used with check_tunnel_func and open_tunnel_func.
* @since New in 1.9.
*/
void *tunnel_baton;
} svn_client_ctx_t;
/** Initialize a client context.
@ -1051,20 +1082,15 @@ svn_client_create_context(svn_client_ctx_t **ctx,
/** @} end group: Client context management */
/**
* @name Authentication information file names
*
* Names of files that contain authentication information.
*
* These filenames are decided by libsvn_client, since this library
* implements all the auth-protocols; libsvn_wc does nothing but
* blindly store and retrieve these files from protected areas.
*
* @defgroup clnt_auth_filenames Client authentication file names
* @{
* @deprecated Provided for backward compatibility. This constant was never
* used in released versions.
*/
#define SVN_CLIENT_AUTH_USERNAME "username"
/**
* @deprecated Provided for backward compatibility. This constant was never
* used in released versions.
*/
#define SVN_CLIENT_AUTH_PASSWORD "password"
/** @} group end: Authentication information file names */
/** Client argument processing
*
@ -1100,6 +1126,12 @@ svn_client_create_context(svn_client_ctx_t **ctx,
* error, and if this is the only type of error encountered, complete
* the operation before returning the error(s).
*
* Return an error if a target is just a peg specifier with no path, such as
* "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path;
* it is now ambiguous. The form "@abc@" should now be used to refer to the
* literal path "@abc" with no peg revision, or the form ".@abc" to refer to
* the empty path with peg revision "abc".
*
* @since New in 1.7
*/
svn_error_t *
@ -1114,6 +1146,9 @@ svn_client_args_to_target_array2(apr_array_header_t **targets_p,
* Similar to svn_client_args_to_target_array2() but with
* @a keep_last_origpath_on_truepath_collision always set to FALSE.
*
* @since Since 1.6.5, this returns an error if a path contains a peg
* specifier with no path before it, such as "@abc".
*
* @deprecated Provided for backward compatibility with the 1.6 API.
*/
SVN_DEPRECATED
@ -2471,12 +2506,20 @@ typedef svn_error_t *(*svn_client_status_func_t)(
* retrieve only "interesting" entries (local mods and/or
* out of date).
*
* - If @a update is set, contact the repository and augment the
* status structures with information about out-of-dateness (with
* respect to @a revision). Also, if @a result_rev is not @c NULL,
* set @a *result_rev to the actual revision against which the
* working copy was compared (@a *result_rev is not meaningful unless
* @a update is set).
* - If @a check_out_of_date is set, contact the repository and
* augment the status structures with information about
* out-of-dateness (with respect to @a revision). Also, if @a
* result_rev is not @c NULL, set @a *result_rev to the actual
* revision against which the working copy was compared (@a
* *result_rev is not meaningful unless @a check_out_of_date is
* set).
*
* - If @a check_working_copy is not set, do not scan the working
* copy for local modifications. This parameter will be ignored
* unless @a check_out_of_date is set. When set, the status
* report will not contain any information about local changes in
* the working copy; this includes local deletions and
* replacements.
*
* If @a no_ignore is @c FALSE, don't report any file or directory (or
* recurse into any directory) that is found by recursion (as opposed to
@ -2507,9 +2550,35 @@ typedef svn_error_t *(*svn_client_status_func_t)(
*
* All temporary allocations are performed in @a scratch_pool.
*
* @since New in 1.7.
* @since New in 1.9.
*/
svn_error_t *
svn_client_status6(svn_revnum_t *result_rev,
svn_client_ctx_t *ctx,
const char *path,
const svn_opt_revision_t *revision,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t check_out_of_date,
svn_boolean_t check_working_copy,
svn_boolean_t no_ignore,
svn_boolean_t ignore_externals,
svn_boolean_t depth_as_sticky,
const apr_array_header_t *changelists,
svn_client_status_func_t status_func,
void *status_baton,
apr_pool_t *scratch_pool);
/**
* Same as svn_client_status6(), but with @a check_out_of_date set to
* @a update and @a check_working_copy set to @c TRUE.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_status5(svn_revnum_t *result_rev,
svn_client_ctx_t *ctx,
const char *path,
@ -2641,8 +2710,8 @@ svn_client_status(svn_revnum_t *result_rev,
* #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
* for URLs or #svn_opt_revision_working for WC paths.
*
* If @a limit is non-zero only invoke @a receiver on the first @a limit
* logs.
* If @a limit is greater than zero only invoke @a receiver on the first
* @a limit logs.
*
* If @a discover_changed_paths is set, then the @c changed_paths and @c
* changed_paths2 fields in the @c log_entry argument to @a receiver will be
@ -2814,6 +2883,11 @@ svn_client_log(const apr_array_header_t *targets,
* in which case blame information will be generated regardless of the
* MIME types of the revisions.
*
* @a start may resolve to a revision number greater (younger) than @a end
* only if the server is 1.8.0 or greater (supports
* #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or
* newer.
*
* Use @a diff_options to determine how to compare different revisions of the
* target.
*
@ -3919,8 +3993,15 @@ svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
* If a depth other than #svn_depth_empty or #svn_depth_infinity is
* requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
*
* @a discover_changed_paths and @a revprops are the same as for
* svn_client_log5(). Use @a scratch_pool for all temporary allocations.
* In addition to the behavior of @a discover_changed_paths described in
* svn_client_log5(), if set to TRUE it enables detection of sub-tree
* merges that are complete but can't be detected as complete without
* access to the changed paths. Sub-tree merges detected as complete will
* be included if @a finding_merged is TRUE or filtered if @a finding_merged
* is FALSE.
*
* @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for
* all temporary allocations.
*
* @a ctx is a context used for authentication.
*
@ -4017,8 +4098,29 @@ svn_client_mergeinfo_log_eligible(const char *path_or_url,
* @{
*/
/** Recursively cleanup a working copy directory @a dir, finishing any
* incomplete operations, removing lockfiles, etc.
/** Recursively vacuum a working copy directory @a dir, removing unnecessary
* data.
*
* If @a include_externals is @c TRUE, recurse into externals and vacuum them
* as well.
*
* If @a remove_unversioned_items is @c TRUE, remove unversioned items
* in @a dir after successful working copy cleanup.
* If @a remove_ignored_items is @c TRUE, remove ignored unversioned items
* in @a dir after successful working copy cleanup.
*
* If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
* timestamps for unmodified files in the working copy, reducing comparision
* time on future checks.
*
* If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
* copy root unreferenced files in the pristine store are removed.
*
* When asked to remove unversioned or ignored items, and the working copy
* is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental
* working copy corruption in case users run the cleanup operation to
* remove unversioned items while another client is performing some other
* operation on the working copy.
*
* If @a ctx->cancel_func is non-NULL, invoke it with @a
* ctx->cancel_baton at various points during the operation. If it
@ -4026,8 +4128,66 @@ svn_client_mergeinfo_log_eligible(const char *path_or_url,
* immediately.
*
* Use @a scratch_pool for any temporary allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client_vacuum(const char *dir_abspath,
svn_boolean_t remove_unversioned_items,
svn_boolean_t remove_ignored_items,
svn_boolean_t fix_recorded_timestamps,
svn_boolean_t vacuum_pristines,
svn_boolean_t include_externals,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/** Recursively cleanup a working copy directory @a dir_abspath, finishing any
* incomplete operations, removing lockfiles, etc.
*
* If @a break_locks is @c TRUE, existing working copy locks at or below @a
* dir_abspath are broken, otherwise a normal write lock is obtained.
*
* If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
* timestamps for unmodified files in the working copy, reducing comparision
* time on future checks.
*
* If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
* mod_dav served repositories is cleared. This clearing invalidates some
* cached information used for pre-HTTPv2 repositories.
*
* If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
* copy root unreferenced files in the pristine store are removed.
*
* If @a include_externals is @c TRUE, recurse into externals and clean
* them up as well.
*
* If @a ctx->cancel_func is non-NULL, invoke it with @a
* ctx->cancel_baton at various points during the operation. If it
* returns an error (typically #SVN_ERR_CANCELLED), return that error
* immediately.
*
* Use @a scratch_pool for any temporary allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client_cleanup2(const char *dir_abspath,
svn_boolean_t break_locks,
svn_boolean_t fix_recorded_timestamps,
svn_boolean_t clear_dav_cache,
svn_boolean_t vacuum_pristines,
svn_boolean_t include_externals,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/** Like svn_client_cleanup2(), but no support for not breaking locks and
* cleaning up externals and using a potentially non absolute path.
*
* @deprecated Provided for limited backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_cleanup(const char *dir,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
@ -4133,6 +4293,13 @@ svn_client_relocate(const char *dir,
* changelists. If @a changelists is empty (or altogether @c NULL),
* no changelist filtering occurs.
*
* 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.
@ -4141,9 +4308,25 @@ svn_client_relocate(const char *dir,
* then do not error, just invoke @a ctx->notify_func2 with @a
* ctx->notify_baton2, using notification code #svn_wc_notify_skip.
*
* @since New in 1.5.
* @since New in 1.9.
*/
svn_error_t *
svn_client_revert3(const apr_array_header_t *paths,
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 and @a metadata_only set to FALSE.
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_revert2(const apr_array_header_t *paths,
svn_depth_t depth,
const apr_array_header_t *changelists,
@ -4160,7 +4343,7 @@ svn_client_revert2(const apr_array_header_t *paths,
* @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
* revert is deliberately different.
*
* @deprecated Provided for backwards compatibility with the 1.0 API.
* @deprecated Provided for backwards compatibility with the 1.4 API.
*/
SVN_DEPRECATED
svn_error_t *
@ -4316,6 +4499,41 @@ typedef struct svn_client_copy_source_t
* If @a ignore_externals is set, don't process externals definitions
* as part of this operation.
*
* If @a metadata_only is @c TRUE and copying a file in a working copy,
* everything in the metadata is updated as if the node is moved, but the
* actual disk copy operation is not performed. This feature is useful for
* clients that want to keep the working copy in sync while the actual working
* copy is updated by some other task.
*
* If @a pin_externals is set, pin URLs in copied externals definitions
* to their current revision unless they were already pinned to a
* particular revision. A pinned external uses a URL which points at a
* fixed revision, rather than the HEAD revision. Externals in the copy
* destination are pinned to either a working copy base revision or the
* HEAD revision of a repository (as of the time the copy operation is
* performed), depending on the type of the copy source:
<pre>
copy source: working copy (WC) REPOS
------------+------------------------+---------------------------+
copy WC | external's WC BASE rev | external's repos HEAD rev |
dest: |------------------------+---------------------------+
REPOS | external's WC BASE rev | external's repos HEAD rev |
------------+------------------------+---------------------------+
</pre>
* If the copy source is a working copy, then all externals must be checked
* out, be at a single-revision, contain no local modifications, and contain
* no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned.
*
* If non-NULL, @a externals_to_pin restricts pinning to a subset of externals.
* It is a hash table keyed by either a local absolute path or a URL at which
* an svn:externals property is set. The hash table contains apr_array_header_t*
* elements as returned by svn_wc_parse_externals_description3(). These arrays
* contain elements of type svn_wc_external_item2_t*, each of which corresponds
* to a single line of an svn:externals definition. Externals corresponding to
* these items will be pinned, other externals will not be pinned.
* If @a externals_to_pin is @c NULL then all externals are pinned.
* If @a pin_externals is @c FALSE then @a externals_to_pin is ignored.
*
* If non-NULL, @a revprop_table is a hash table holding additional,
* custom revision properties (<tt>const char *</tt> names mapped to
* <tt>svn_string_t *</tt> values) to be set on the new revision in
@ -4334,9 +4552,33 @@ typedef struct svn_client_copy_source_t
* @a commit_callback with @a commit_baton and a #svn_commit_info_t for
* the commit.
*
* @since New in 1.7.
* @since New in 1.9.
*/
svn_error_t *
svn_client_copy7(const apr_array_header_t *sources,
const char *dst_path,
svn_boolean_t copy_as_child,
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
svn_boolean_t metadata_only,
svn_boolean_t pin_externals,
const apr_hash_t *externals_to_pin,
const apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
/**
* Similar to svn_client_copy7(), but doesn't support meta_data_only
* and cannot pin externals.
*
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_copy6(const apr_array_header_t *sources,
const char *dst_path,
svn_boolean_t copy_as_child,
@ -5065,6 +5307,8 @@ svn_client_propget(apr_hash_t **props,
* in @a ctx for authentication, and @a pool for all memory allocation.
* Return the actual rev queried in @a *set_rev.
*
* If @a propname does not exist on @a revision, set @a *propval to @c NULL.
*
* Note that unlike its cousin svn_client_propget(), this routine
* doesn't affect the working copy at all; it's a pure network
* operation that queries an *unversioned* property attached to a
@ -5616,15 +5860,14 @@ svn_client_ls(apr_hash_t **dirents,
/**
* Output the content of a file.
*
* @param[in] out The stream to which the content will be written.
* @param[in] path_or_url The path or URL of the file.
* @param[in] peg_revision The peg revision.
* @param[in] revision The operative revision.
* @param[out] props Optional output argument to obtain properties.
* @param[in] out The stream to which the content will be written.
* @param[in] path_or_url The path or URL of the file.
* @param[in] peg_revision The peg revision.
* @param[in] revision The operative revision.
* @param[in] expand_keywords When true, keywords (when set) are expanded.
* @param[in] ctx The standard client context, used for possible
* authentication.
* @param[in] pool Used for any temporary allocation.
*
* @todo Add an expansion/translation flag?
*
* @return A pointer to an #svn_error_t of the type (this list is not
* exhaustive): <br>
@ -5634,12 +5877,35 @@ svn_client_ls(apr_hash_t **dirents,
* determined. <br>
* If no error occurred, return #SVN_NO_ERROR.
*
* @since New in 1.2.
* If @a *props is not NULL it is set to a hash of all the file's
* non-inherited properties. If it is NULL, the properties are only
* used for determining how and if the file should be translated.
*
* @see #svn_client_ctx_t <br> @ref clnt_revisions for
* a discussion of operative and peg revisions.
*
* @since New in 1.9.
*/
svn_error_t *
svn_client_cat3(apr_hash_t **props,
svn_stream_t *out,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_boolean_t expand_keywords,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Similar to svn_client_cat3() except without the option of directly
* reading the properties, and with @a expand_keywords always TRUE.
*
* @since New in 1.2.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_cat2(svn_stream_t *out,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
@ -6110,15 +6376,39 @@ typedef svn_error_t *(*svn_client_info_receiver2_t)(
* is TRUE also send nodes that don't exist as versioned but are still
* tree conflicted.
*
* If @a include_externals is @c TRUE, recurse into externals and report about
* them as well.
*
* @a changelists is an array of <tt>const char *</tt> changelist
* names, used as a restrictive filter on items whose info is
* reported; that is, don't report info about any item unless
* it's a member of one of those changelists. If @a changelists is
* empty (or altogether @c NULL), no changelist filtering occurs.
*
* @since New in 1.7.
* @since New in 1.9.
*/
svn_error_t *
svn_client_info4(const char *abspath_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_depth_t depth,
svn_boolean_t fetch_excluded,
svn_boolean_t fetch_actual_only,
svn_boolean_t include_externals,
const apr_array_header_t *changelists,
svn_client_info_receiver2_t receiver,
void *receiver_baton,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/** Similar to svn_client_info4, but doesn't support walking externals.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_client_info3(const char *abspath_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,

View File

@ -320,8 +320,28 @@ svn_cmdline_auth_plaintext_passphrase_prompt(svn_boolean_t *may_save_plaintext,
* by the command line client.
*
* @a non_interactive, @a username, @a password, @a config_dir,
* @a no_auth_cache, and @a trust_server_cert are the values of the
* command line options of the corresponding names.
* and @a no_auth_cache are the values of the command line options
* of the corresponding names.
*
* If @a non_interactive is @c TRUE, then the following parameters
* control whether an invalid SSL certificate will be accepted
* regardless of a specific verification failure:
*
* @a trust_server_cert_unknown_ca: If @c TRUE, accept certificates
* from unknown certificate authorities.
*
* @a trust_server_cert_cn_mismatch: If @c TRUE, accept certificates
* even if the Common Name attribute of the certificate differs from
* the hostname of the server.
*
* @a trust_server_cert_expired: If @c TRUE, accept certificates even
* if they are expired.
*
* @a trust_server_cert_not_yet_valid: If @c TRUE, accept certificates
* from the future.
*
* @a trust_server_cert_other_failure: If @c TRUE, accept certificates
* even if any other verification failure than the above occured.
*
* @a cfg is the @c SVN_CONFIG_CATEGORY_CONFIG configuration, and
* @a cancel_func and @a cancel_baton control the cancellation of the
@ -329,6 +349,29 @@ svn_cmdline_auth_plaintext_passphrase_prompt(svn_boolean_t *may_save_plaintext,
*
* Use @a pool for all allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_cmdline_create_auth_baton2(svn_auth_baton_t **ab,
svn_boolean_t non_interactive,
const char *username,
const char *password,
const char *config_dir,
svn_boolean_t no_auth_cache,
svn_boolean_t trust_server_cert_unknown_ca,
svn_boolean_t trust_server_cert_cn_mismatch,
svn_boolean_t trust_server_cert_expired,
svn_boolean_t trust_server_cert_not_yet_valid,
svn_boolean_t trust_server_cert_other_failure,
svn_config_t *cfg,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool);
/* Like svn_cmdline_create_auth_baton2, but with only one trust_server_cert
* option which corresponds to trust_server_cert_unknown_ca.
*
* @deprecated Provided for backward compatibility with the 1.8 API.
* @since New in 1.6.
*/
svn_error_t *

View File

@ -32,6 +32,7 @@
#include <apr_tables.h>
#include "svn_types.h"
#include "svn_string.h"
#ifdef __cplusplus
extern "C" {
@ -75,6 +76,17 @@ svn_compat_log_revprops_in(apr_pool_t *pool);
* revprops is NULL, all return values are NULL. Any return value may be
* NULL if the corresponding property is not set in @a revprops.
*
* @since New in 1.9.
*/
void
svn_compat_log_revprops_out_string(const svn_string_t **author,
const svn_string_t **date,
const svn_string_t **message,
apr_hash_t *revprops);
/** Simiar to svn_compat_log_revprops_out_string() but returns C-style strings
* instead of #svn_string_t.
*
* @since New in 1.5.
*/
void

View File

@ -95,6 +95,14 @@ typedef struct svn_config_t svn_config_t;
#define SVN_CONFIG_OPTION_HTTP_BULK_UPDATES "http-bulk-updates"
/** @since New in 1.8. */
#define SVN_CONFIG_OPTION_HTTP_MAX_CONNECTIONS "http-max-connections"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_HTTP_CHUNKED_REQUESTS "http-chunked-requests"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_SERF_LOG_COMPONENTS "serf-log-components"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_SERF_LOG_LEVEL "serf-log-level"
#define SVN_CONFIG_CATEGORY_CONFIG "config"
#define SVN_CONFIG_SECTION_AUTH "auth"
@ -123,6 +131,8 @@ typedef struct svn_config_t svn_config_t;
/** @deprecated Not used by Subversion since 2003/r847039 (well before 1.0) */
#define SVN_CONFIG_OPTION_TEMPLATE_ROOT "template-root"
#define SVN_CONFIG_OPTION_ENABLE_AUTO_PROPS "enable-auto-props"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_ENABLE_MAGIC_FILE "enable-magic-file"
#define SVN_CONFIG_OPTION_NO_UNLOCK "no-unlock"
#define SVN_CONFIG_OPTION_MIMETYPES_FILE "mime-types-file"
#define SVN_CONFIG_OPTION_PRESERVED_CF_EXTS "preserved-conflict-file-exts"
@ -130,6 +140,8 @@ typedef struct svn_config_t svn_config_t;
#define SVN_CONFIG_OPTION_INTERACTIVE_CONFLICTS "interactive-conflicts"
/** @since New in 1.7. */
#define SVN_CONFIG_OPTION_MEMORY_CACHE_SIZE "memory-cache-size"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_DIFF_IGNORE_CONTENT_TYPE "diff-ignore-content-type"
#define SVN_CONFIG_SECTION_TUNNELS "tunnels"
#define SVN_CONFIG_SECTION_AUTO_PROPS "auto-props"
/** @since New in 1.8. */
@ -138,6 +150,8 @@ typedef struct svn_config_t svn_config_t;
#define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE "exclusive-locking"
/** @since New in 1.8. */
#define SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE_CLIENTS "exclusive-locking-clients"
/** @since New in 1.9. */
#define SVN_CONFIG_OPTION_SQLITE_BUSY_TIMEOUT "busy-timeout"
/** @} */
/** @name Repository conf directory configuration files strings
@ -177,7 +191,7 @@ typedef struct svn_config_t svn_config_t;
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
"*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
"*.rej *~ #*# .#* .*.swp .DS_Store"
"*.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db"
#endif
#define SVN_CONFIG_DEFAULT_GLOBAL_IGNORES \
@ -659,11 +673,67 @@ svn_config_ensure(const char *config_dir,
*/
/** A hash-key pointing to a realmstring. Every file containing
* authentication data should have this key.
/**
* Attributes of authentication credentials.
*
* The values of these keys are C strings.
*
* @note Some of these hash keys were also used in versions < 1.9 but were
* not part of the public API (except #SVN_CONFIG_REALMSTRING_KEY which
* has been present since 1.0).
*
* @defgroup cached_authentication_data_attributes Cached authentication data attributes
* @{
*/
/** A hash-key pointing to a realmstring. This attribute is mandatory.
*
* @since New in 1.0.
*/
#define SVN_CONFIG_REALMSTRING_KEY "svn:realmstring"
/** A hash-key for usernames.
* @since New in 1.9.
*/
#define SVN_CONFIG_AUTHN_USERNAME_KEY "username"
/** A hash-key for passwords.
* The password may be in plaintext or encrypted form, depending on
* the authentication provider.
* @since New in 1.9.
*/
#define SVN_CONFIG_AUTHN_PASSWORD_KEY "password"
/** A hash-key for passphrases,
* such as SSL client ceritifcate passphrases. The passphrase may be in
* plaintext or encrypted form, depending on the authentication provider.
* @since New in 1.9.
*/
#define SVN_CONFIG_AUTHN_PASSPHRASE_KEY "passphrase"
/** A hash-key for the type of a password or passphrase. The type
* indicates which provider owns the credential.
* @since New in 1.9.
*/
#define SVN_CONFIG_AUTHN_PASSTYPE_KEY "passtype"
/** A hash-key for SSL certificates. The value is the base64-encoded DER form
* certificate.
* @since New in 1.9.
* @note The value is not human readable.
*/
#define SVN_CONFIG_AUTHN_ASCII_CERT_KEY "ascii_cert"
/** A hash-key for recorded SSL certificate verification
* failures. Failures encoded as an ASCII integer containing any of the
* SVN_AUTH_SSL_* SSL server certificate failure bits defined in svn_auth.h.
* @since New in 1.9.
*/
#define SVN_CONFIG_AUTHN_FAILURES_KEY "failures"
/** @} */
/** Use @a cred_kind and @a realmstring to locate a file within the
* ~/.subversion/auth/ area. If the file exists, initialize @a *hash
* and load the file contents into the hash, using @a pool. If the
@ -712,7 +782,8 @@ svn_config_write_auth_data(apr_hash_t *hash,
* fully purged) to allow perusal and selective removal of credentials.
*
* @a cred_kind and @a realmstring specify the key of the credential.
* @a hash contains the hash data associated with the record.
* @a hash contains the hash data associated with the record. @a walk_baton
* is the baton passed to svn_config_walk_auth_data().
*
* Before returning set @a *delete_cred to TRUE to remove the credential from
* the cache; leave @a *delete_cred unchanged or set it to FALSE to keep the
@ -728,7 +799,7 @@ svn_config_write_auth_data(apr_hash_t *hash,
*/
typedef svn_error_t *
(*svn_config_auth_walk_func_t)(svn_boolean_t *delete_cred,
void *cleanup_baton,
void *walk_baton,
const char *cred_kind,
const char *realmstring,
apr_hash_t *hash,
@ -747,7 +818,7 @@ typedef svn_error_t *
*
* @note Removing credentials from the config-based disk store will
* not purge them from any open svn_auth_baton_t instance. Consider
* using svn_auth_forget_credentials() -- from the @a cleanup_func,
* using svn_auth_forget_credentials() -- from the @a walk_func,
* even -- for this purpose.
*
* @note Removing credentials from the config-based disk store will
@ -799,7 +870,7 @@ svn_config_get_user_config_path(const char **path,
*/
svn_error_t *
svn_config_dup(svn_config_t **cfgp,
svn_config_t *src,
const svn_config_t *src,
apr_pool_t *pool);
/** Create a deep copy of the config hash @a src_hash and return

View File

@ -249,6 +249,7 @@ svn_txdelta_compose_windows(const svn_txdelta_window_t *window_A,
*
* @since New in 1.4
*
* @since Since 1.9, @a tbuf may be NULL if @a *tlen is 0.
*/
void
svn_txdelta_apply_instructions(svn_txdelta_window_t *window,
@ -545,10 +546,26 @@ svn_txdelta_to_svndiff(svn_stream_t *output,
/** Return a writable generic stream which will parse svndiff-format
* data into a text delta, invoking @a handler with @a handler_baton
* whenever a new window is ready. If @a error_on_early_close is @c
* TRUE, attempting to close this stream before it has handled the entire
* svndiff data set will result in #SVN_ERR_SVNDIFF_UNEXPECTED_END,
* else this error condition will be ignored.
* whenever a new window is ready.
*
* When the caller closes this stream, this will signal completion to
* the window handler by invoking @a handler once more, passing zero for
* the @c window argument.
*
* If @a error_on_early_close is @c TRUE, then attempt to avoid
* signaling completion to the window handler if the delta was
* incomplete. Specifically, attempting to close the stream will be
* successful only if the data written to the stream consisted of one or
* more complete windows of svndiff data and no extra bytes. Otherwise,
* closing the stream will not signal completion to the window handler,
* and will return a #SVN_ERR_SVNDIFF_UNEXPECTED_END error. Note that if
* no data at all was written, the delta is considered incomplete.
*
* If @a error_on_early_close is @c FALSE, closing the stream will
* signal completion to the window handler, regardless of how much data
* was written, and discard any pending incomplete data.
*
* Allocate the stream in @a pool.
*/
svn_stream_t *
svn_txdelta_parse_svndiff(svn_txdelta_window_handler_t handler,

View File

@ -55,6 +55,7 @@
#include "svn_types.h"
#include "svn_io.h" /* for svn_stream_t */
#include "svn_string.h"
#include "svn_mergeinfo.h"
#ifdef __cplusplus
extern "C" {
@ -402,13 +403,33 @@ typedef enum svn_diff_conflict_display_style_t
/** Like svn_diff_conflict_display_modified_original_latest, but
*only* showing conflicts. */
svn_diff_conflict_display_only_conflicts
/* IMPORTANT: If you extend this enum note that it is mapped in
tools/diff/diff3.c. */
} svn_diff_conflict_display_style_t;
/** Given a vtable of @a output_fns/@a output_baton for consuming
* differences, output the differences in @a diff.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* @since New in 1.9.
*/
svn_error_t *
svn_diff_output2(svn_diff_t *diff,
void *output_baton,
const svn_diff_output_fns_t *output_fns,
svn_cancel_func_t cancel_func,
void *cancel_baton);
/** Similar to svn_diff_output2(), but without cancel support.
*
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_output(svn_diff_t *diff,
void *output_baton,
const svn_diff_output_fns_t *output_fns);
@ -457,8 +478,15 @@ typedef struct svn_diff_file_options_t
* of the nearest preceding line that starts with a character that might be
* the initial character of a C language identifier. The default is
* @c FALSE.
* @since New in 1.5.
*/
svn_boolean_t show_c_function;
/** The number of context lines produced above and below modifications, if
* available. The number of context lines must be >= 0.
*
* @since New in 1.9 */
int context_size;
} svn_diff_file_options_t;
/** Allocate a @c svn_diff_file_options_t structure in @a pool, initializing
@ -481,6 +509,7 @@ svn_diff_file_options_create(apr_pool_t *pool);
* - --ignore-all-space, -w
* - --ignore-eol-style
* - --show-c-function, -p @since New in 1.5.
* - --context, -U ARG @since New in 1.9.
* - --unified, -u (for compatibility, does nothing).
*/
svn_error_t *
@ -585,8 +614,6 @@ svn_diff_file_diff4(svn_diff_t **diff,
/** A convenience function to produce unified diff output from the
* diff generated by svn_diff_file_diff().
*
* @since New in 1.5.
*
* Output a @a diff between @a original_path and @a modified_path in unified
* context diff format to @a output_stream. Optionally supply
* @a original_header and/or @a modified_header to be displayed in the header
@ -599,8 +626,39 @@ svn_diff_file_diff4(svn_diff_t **diff,
* @a relative_to_dir is not @c NULL but @a relative_to_dir is not a parent
* path of the target, an error is returned. Finally, if @a relative_to_dir
* is a URL, an error will be returned.
*
* If @a context_size is not negative, then this number of context lines
* will be used in the generated diff output. Otherwise the legacy compile
* time default will be used.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* @since New in 1.9.
*/
svn_error_t *
svn_diff_file_output_unified4(svn_stream_t *output_stream,
svn_diff_t *diff,
const char *original_path,
const char *modified_path,
const char *original_header,
const char *modified_header,
const char *header_encoding,
const char *relative_to_dir,
svn_boolean_t show_c_function,
int context_size,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_diff_file_output_unified4(), but without cancel
* support and with @a context_size set to -1.
*
* @since New in 1.5.
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_file_output_unified3(svn_stream_t *output_stream,
svn_diff_t *diff,
const char *original_path,
@ -653,10 +711,36 @@ svn_diff_file_output_unified(svn_stream_t *output_stream,
* @a conflict_latest to be displayed as conflict markers in the output.
* If @a conflict_original, @a conflict_modified, @a conflict_latest and/or
* @a conflict_separator is @c NULL, a default marker will be displayed.
* @a conflict_style dictates how conflicts are displayed.
* @a conflict_style dictates how conflicts are displayed.
* Uses @a scratch_pool for temporary allocations.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* @since New in 1.9.
*/
svn_error_t *
svn_diff_file_output_merge3(svn_stream_t *output_stream,
svn_diff_t *diff,
const char *original_path,
const char *modified_path,
const char *latest_path,
const char *conflict_original,
const char *conflict_modified,
const char *conflict_latest,
const char *conflict_separator,
svn_diff_conflict_display_style_t conflict_style,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_diff_file_output_merge3, but without cancel support.
*
* @since New in 1.6.
*
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_file_output_merge2(svn_stream_t *output_stream,
svn_diff_t *diff,
@ -700,7 +784,28 @@ svn_diff_file_output_merge(svn_stream_t *output_stream,
svn_boolean_t display_resolved_conflicts,
apr_pool_t *pool);
/** Creates a git-like binary diff hunk describing the differences between
* @a original and @a latest. It does this by either producing either the
* literal content of both versions in a compressed format, or by describing
* one way transforms.
*
* Either @a original or @a latest may be NULL to describe that the version
* didn't exist.
*
* Writes the output to @a output_stream.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* @since New in 1.9.
*/
svn_error_t *
svn_diff_output_binary(svn_stream_t *output_stream,
svn_stream_t *original,
svn_stream_t *latest,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/* Diffs on in-memory structures */
@ -762,9 +867,41 @@ svn_diff_mem_string_diff4(svn_diff_t **diff,
* final line use the text "\ No newline at end of property" instead of
* "\ No newline at end of file".
*
* @since New in 1.7. Hunk delimiter "##" has the special meaning since 1.8.
* If @a context_size is not negative, then this number of context lines
* will be used in the generated diff output. Otherwise the legacy compile
* time default will be used.
*
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* Uses @a scratch_pool for temporary allocations.
*
* @since New in 1.9
*/
svn_error_t *
svn_diff_mem_string_output_unified3(svn_stream_t *output_stream,
svn_diff_t *diff,
svn_boolean_t with_diff_header,
const char *hunk_delimiter,
const char *original_header,
const char *modified_header,
const char *header_encoding,
const svn_string_t *original,
const svn_string_t *modified,
int context_size,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_diff_mem_string_output_unified3() but without
* cancel support and with @a context_size set to -1.
*
* @since New in 1.7. Hunk delimiter "##" has the special meaning since 1.8.
*
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_mem_string_output_unified2(svn_stream_t *output_stream,
svn_diff_t *diff,
svn_boolean_t with_diff_header,
@ -781,7 +918,10 @@ svn_diff_mem_string_output_unified2(svn_stream_t *output_stream,
* set to NULL.
*
* @since New in 1.5.
*
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_mem_string_output_unified(svn_stream_t *output_stream,
svn_diff_t *diff,
@ -802,9 +942,36 @@ svn_diff_mem_string_output_unified(svn_stream_t *output_stream,
*
* @a conflict_style dictates how conflicts are displayed.
*
* @since New in 1.6.
* If not @c NULL, call @a cancel_func with @a cancel_baton once or multiple
* times while processing larger diffs.
*
* Uses @a scratch_pool for temporary allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_diff_mem_string_output_merge3(svn_stream_t *output_stream,
svn_diff_t *diff,
const svn_string_t *original,
const svn_string_t *modified,
const svn_string_t *latest,
const char *conflict_original,
const char *conflict_modified,
const char *conflict_latest,
const char *conflict_separator,
svn_diff_conflict_display_style_t style,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_diff_mem_string_output_merge2(), but without cancel support.
*
* @since New in 1.6.
*
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_diff_mem_string_output_merge2(svn_stream_t *output_stream,
svn_diff_t *diff,
const svn_string_t *original,
@ -912,7 +1079,7 @@ typedef struct svn_diff_hunk_t svn_diff_hunk_t;
/**
* Allocate @a *stringbuf in @a result_pool, and read into it one line
* of the diff text of @a hunk. The hunk header is not returned only the
* unidiff data lines (starting with '+', '-', or ' ') are returned.
* unidiff data lines (starting with '+', '-', or ' ') are returned.
* If the @a hunk is being interpreted in reverse (i.e. the reverse
* parameter of svn_diff_parse_next_patch() was @c TRUE), the diff
* text will be returned in reversed form.
@ -922,8 +1089,8 @@ typedef struct svn_diff_hunk_t svn_diff_hunk_t;
* hunk does not end with a newline character and @a eol is not NULL.
* Temporary allocations will be performed in @a scratch_pool.
*
* @note The hunk header information can be retrievied with the following
* functions:
* @note The hunk header information can be retrieved with the following
* functions:
* @see svn_diff_hunk_get_original_start()
* @see svn_diff_hunk_get_original_length()
* @see svn_diff_hunk_get_modified_start()
@ -1074,6 +1241,14 @@ typedef struct svn_patch_t {
/**
* Indicates whether the patch is being interpreted in reverse. */
svn_boolean_t reverse;
/**
* Mergeinfo parsed from svn:mergeinfo diff data, with one entry for
* forward merges and one for reverse merges.
* Either entry can be @c NULL if no such merges are part of the diff.
* @since New in 1.9. */
svn_mergeinfo_t mergeinfo;
svn_mergeinfo_t reverse_mergeinfo;
} svn_patch_t;
/** An opaque type representing an open patch file.

View File

@ -202,7 +202,7 @@ svn_dirent_join(const char *base,
apr_pool_t *result_pool);
/** Join multiple components onto a @a base dirent. The components are
* terminated by a @c NULL.
* terminated by a @c SVN_VA_NULL.
*
* If any component is the empty string, it will be ignored.
*
@ -218,7 +218,7 @@ svn_dirent_join(const char *base,
char *
svn_dirent_join_many(apr_pool_t *result_pool,
const char *base,
...);
...) SVN_NEEDS_SENTINEL_NULL;
/** Join a base relpath (@a base) with a component (@a component).
* @a component need not be a single component.
@ -354,6 +354,19 @@ char *
svn_relpath_dirname(const char *relpath,
apr_pool_t *result_pool);
/** Return a maximum of @a max_components components of @a relpath. This is
* an efficient way of calling svn_relpath_dirname() multiple times until only
* a specific number of components is left.
*
* Allocate the result in @a result_pool (or statically in case of 0)
*
* @since New in 1.9.
*/
const char *
svn_relpath_prefix(const char *relpath,
int max_components,
apr_pool_t *result_pool);
/** Divide the canonicalized @a uri into a uri @a *dirpath and a
* (URI-decoded) relpath @a *base_name.

View File

@ -105,7 +105,7 @@ svn_error_symbolic_name(apr_status_t statcode);
* @note @a buf and @a bufsize are provided in the interface so that
* this function is thread-safe and yet does no allocation.
*/
const char *svn_err_best_message(svn_error_t *err,
const char *svn_err_best_message(const svn_error_t *err,
char *buf,
apr_size_t bufsize);
@ -173,6 +173,19 @@ svn_error_t *
svn_error_quick_wrap(svn_error_t *child,
const char *new_msg);
/** A quick n' easy way to create a wrapped exception with your own
* printf-style error message produced by passing @a fmt, using
* apr_psprintf(), before throwing it up the stack. (It uses all of the
* @a child's fields.)
*
* @since New in 1.9.
*/
svn_error_t *
svn_error_quick_wrapf(svn_error_t *child,
const char *fmt,
...)
__attribute__((format(printf, 2, 3)));
/** Compose two errors, returning the composition as a brand new error
* and consuming the original errors. Either or both of @a err1 and
* @a err2 may be @c SVN_NO_ERROR. If both are not @c SVN_NO_ERROR,
@ -202,7 +215,8 @@ svn_error_compose(svn_error_t *chain,
/** Return the root cause of @a err by finding the last error in its
* chain (e.g. it or its children). @a err may be @c SVN_NO_ERROR, in
* which case @c SVN_NO_ERROR is returned.
* which case @c SVN_NO_ERROR is returned. The returned error should
* @em not be cleared as it shares memory with @a err.
*
* @since New in 1.5.
*/
@ -225,7 +239,7 @@ svn_error_find_cause(svn_error_t *err, apr_status_t apr_err);
* @since New in 1.2.
*/
svn_error_t *
svn_error_dup(svn_error_t *err);
svn_error_dup(const svn_error_t *err);
/** Free the memory used by @a error, as well as all ancestors and
* descendants of @a error.
@ -255,6 +269,8 @@ svn_error__locate(const char *file,
(svn_error__locate(__FILE__,__LINE__), (svn_error_wrap_apr))
#define svn_error_quick_wrap \
(svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))
#define svn_error_quick_wrapf \
(svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrapf))
#endif
@ -268,6 +284,10 @@ svn_error__locate(const char *file,
* what code that used to call svn_handle_error() and now calls
* svn_handle_error2() does.
*
* Note that this should only be used from commandline specific code, or
* code that knows that @a stream is really where the application wants
* to receive its errors on.
*
* @since New in 1.2.
*/
void
@ -293,11 +313,13 @@ svn_handle_error(svn_error_t *error,
*
* @a error may not be @c NULL.
*
* @note This does not clear @a error.
*
* @since New in 1.2.
*/
void
svn_handle_warning2(FILE *stream,
svn_error_t *error,
const svn_error_t *error,
const char *prefix);
/** Like svn_handle_warning2() but with @c prefix set to "svn: "
@ -387,10 +409,17 @@ svn_error_t *svn_error_purge_tracing(svn_error_t *err);
} while (0)
/** A statement macro, similar to @c SVN_ERR, but returns an integer.
/** A statement macro intended for the main() function of the 'svn' program.
*
* Evaluate @a expr. If it yields an error, handle that error and
* return @c EXIT_FAILURE.
* Evaluate @a expr. If it yields an error, display the error on stdout
* and return @c EXIT_FAILURE.
*
* @note Not for use in the library, as it prints to stderr. This macro
* no longer suits the needs of the 'svn' program, and is not generally
* suitable for third-party use as it assumes the program name is 'svn'.
*
* @deprecated Provided for backward compatibility with the 1.8 API. Consider
* using svn_handle_error2() or svn_cmdline_handle_exit_error() instead.
*/
#define SVN_INT_ERR(expr) \
do { \
@ -417,18 +446,26 @@ svn_error_t *svn_error_purge_tracing(svn_error_t *err);
* SVN_ERR_FS_OUT_OF_DATE and SVN_ERR_FS_NOT_FOUND are in here because it's a
* non-fatal error that can be thrown when attempting to lock an item.
*
* SVN_ERR_REPOS_HOOK_FAILURE refers to the pre-lock hook.
*
* @since New in 1.2.
*/
#define SVN_ERR_IS_LOCK_ERROR(err) \
(err->apr_err == SVN_ERR_FS_PATH_ALREADY_LOCKED || \
err->apr_err == SVN_ERR_FS_NOT_FOUND || \
err->apr_err == SVN_ERR_FS_OUT_OF_DATE || \
err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN)
err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN || \
err->apr_err == SVN_ERR_REPOS_HOOK_FAILURE || \
err->apr_err == SVN_ERR_FS_NO_SUCH_REVISION || \
err->apr_err == SVN_ERR_FS_OUT_OF_DATE || \
err->apr_err == SVN_ERR_FS_NOT_FILE)
/**
* Return TRUE if @a err is an error specifically related to unlocking
* a path in the repository, FALSE otherwise.
*
* SVN_ERR_REPOS_HOOK_FAILURE refers to the pre-unlock hook.
*
* @since New in 1.2.
*/
#define SVN_ERR_IS_UNLOCK_ERROR(err) \
@ -437,7 +474,8 @@ svn_error_t *svn_error_purge_tracing(svn_error_t *err);
err->apr_err == SVN_ERR_FS_LOCK_OWNER_MISMATCH || \
err->apr_err == SVN_ERR_FS_NO_SUCH_LOCK || \
err->apr_err == SVN_ERR_RA_NOT_LOCKED || \
err->apr_err == SVN_ERR_FS_LOCK_EXPIRED)
err->apr_err == SVN_ERR_FS_LOCK_EXPIRED || \
err->apr_err == SVN_ERR_REPOS_HOOK_FAILURE)
/** Evaluates to @c TRUE iff @a apr_err (of type apr_status_t) is in the given
* @a category, which should be one of the @c SVN_ERR_*_CATEGORY_START
@ -626,6 +664,11 @@ typedef svn_error_t *(*svn_error_malfunction_handler_t)
svn_error_malfunction_handler_t
svn_error_set_malfunction_handler(svn_error_malfunction_handler_t func);
/** Return the malfunction handler that is currently in effect.
* @since New in 1.9. */
svn_error_malfunction_handler_t
svn_error_get_malfunction_handler(void);
/** Handle a malfunction by returning an error object that describes it.
*
* When @a can_return is false, abort()

View File

@ -150,6 +150,8 @@ extern "C" {
+ (22 * SVN_ERR_CATEGORY_SIZE))
#define SVN_ERR_MALFUNC_CATEGORY_START (APR_OS_START_USERERR \
+ (23 * SVN_ERR_CATEGORY_SIZE))
#define SVN_ERR_X509_CATEGORY_START (APR_OS_START_USERERR \
+ (24 * SVN_ERR_CATEGORY_SIZE))
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
@ -233,6 +235,11 @@ SVN_ERROR_START
SVN_ERR_BAD_CATEGORY_START + 15,
"Invalid atomic")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_BAD_COMPRESSION_METHOD,
SVN_ERR_BAD_CATEGORY_START + 16,
"Invalid compression method")
/* xml errors */
SVN_ERRDEF(SVN_ERR_XML_ATTRIB_NOT_FOUND,
@ -255,6 +262,11 @@ SVN_ERROR_START
SVN_ERR_XML_CATEGORY_START + 4,
"Data cannot be safely XML-escaped")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_XML_UNEXPECTED_ELEMENT,
SVN_ERR_XML_CATEGORY_START + 5,
"Unexpected XML element found")
/* io errors */
SVN_ERRDEF(SVN_ERR_IO_INCONSISTENT_EOL,
@ -312,6 +324,11 @@ SVN_ERROR_START
SVN_ERR_STREAM_CATEGORY_START + 3,
"Stream doesn't support seeking")
/** Since New in 1.9. */
SVN_ERRDEF(SVN_ERR_STREAM_NOT_SUPPORTED,
SVN_ERR_STREAM_CATEGORY_START + 4,
"Stream doesn't support this capability")
/* node errors */
SVN_ERRDEF(SVN_ERR_NODE_UNKNOWN_KIND,
@ -796,6 +813,61 @@ SVN_ERROR_START
SVN_ERR_FS_CATEGORY_START + 52,
"Could not initialize the revprop caching infrastructure.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_MALFORMED_TXN_ID,
SVN_ERR_FS_CATEGORY_START + 53,
"Malformed transaction ID string.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_INDEX_CORRUPTION,
SVN_ERR_FS_CATEGORY_START + 54,
"Corrupt index file.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_INDEX_REVISION,
SVN_ERR_FS_CATEGORY_START + 55,
"Revision not covered by index.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_INDEX_OVERFLOW,
SVN_ERR_FS_CATEGORY_START + 56,
"Item index too large for this revision.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_CONTAINER_INDEX,
SVN_ERR_FS_CATEGORY_START + 57,
"Container index out of range.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_INDEX_INCONSISTENT,
SVN_ERR_FS_CATEGORY_START + 58,
"Index files are inconsistent.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_LOCK_OPERATION_FAILED,
SVN_ERR_FS_CATEGORY_START + 59,
"Lock operation failed")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_UNSUPPORTED_TYPE,
SVN_ERR_FS_CATEGORY_START + 60,
"Unsupported FS type")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_CONTAINER_SIZE,
SVN_ERR_FS_CATEGORY_START + 61,
"Container capacity exceeded.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_MALFORMED_NODEREV_ID,
SVN_ERR_FS_CATEGORY_START + 62,
"Malformed node revision ID string.")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_FS_INVALID_GENERATION,
SVN_ERR_FS_CATEGORY_START + 63,
"Invalid generation number data.")
/* repos errors */
SVN_ERRDEF(SVN_ERR_REPOS_LOCKED,
@ -910,6 +982,11 @@ SVN_ERROR_START
SVN_ERR_RA_CATEGORY_START + 12,
"Can't create tunnel")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_RA_CANNOT_CREATE_SESSION,
SVN_ERR_RA_CATEGORY_START + 13,
"Can't create session")
/* ra_dav errors */
SVN_ERRDEF(SVN_ERR_RA_DAV_SOCK_INIT,
@ -979,6 +1056,16 @@ SVN_ERROR_START
SVN_ERR_RA_DAV_CATEGORY_START + 13,
"URL access forbidden for unknown reason")
/** @since New in 1.9 */
SVN_ERRDEF(SVN_ERR_RA_DAV_PRECONDITION_FAILED,
SVN_ERR_RA_DAV_CATEGORY_START + 14,
"The server state conflicts with the requested preconditions")
/** @since New in 1.9 */
SVN_ERRDEF(SVN_ERR_RA_DAV_METHOD_NOT_ALLOWED,
SVN_ERR_RA_DAV_CATEGORY_START + 15,
"The URL doesn't allow the requested method")
/* ra_local errors */
SVN_ERRDEF(SVN_ERR_RA_LOCAL_REPOS_NOT_FOUND,
@ -1330,6 +1417,31 @@ SVN_ERROR_START
SVN_ERR_MISC_CATEGORY_START + 38,
"Atomic data storage is corrupt")
/** @since New in 1.8. */
SVN_ERRDEF(SVN_ERR_UTF8PROC_ERROR,
SVN_ERR_MISC_CATEGORY_START + 39,
"utf8proc library error")
/** @since New in 1.8. */
SVN_ERRDEF(SVN_ERR_UTF8_GLOB,
SVN_ERR_MISC_CATEGORY_START + 40,
"Bad arguments to SQL operators GLOB or LIKE")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_CORRUPT_PACKED_DATA,
SVN_ERR_MISC_CATEGORY_START + 41,
"Packed data stream is corrupt")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_COMPOSED_ERROR,
SVN_ERR_MISC_CATEGORY_START + 42,
"Additional errors:")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_INVALID_INPUT,
SVN_ERR_MISC_CATEGORY_START + 43,
"Parser error: invalid input")
/* command-line client errors */
SVN_ERRDEF(SVN_ERR_CL_ARG_PARSING_ERROR,
@ -1380,6 +1492,11 @@ SVN_ERROR_START
SVN_ERR_CL_CATEGORY_START + 11,
"Failed processing one or more externals definitions")
/** @since New in 1.9. */
SVN_ERRDEF(SVN_ERR_CL_REPOS_VERIFY_FAILED,
SVN_ERR_CL_CATEGORY_START + 12,
"Repository verification failed")
/* ra_svn errors */
SVN_ERRDEF(SVN_ERR_RA_SVN_CMD_ERR,
@ -1478,11 +1595,14 @@ SVN_ERROR_START
"Diff data source modified unexpectedly")
/* libsvn_ra_serf errors */
/** @since New in 1.5. */
/** @since New in 1.5.
@deprecated SSPI now handled by serf rather than libsvn_ra_serf. */
SVN_ERRDEF(SVN_ERR_RA_SERF_SSPI_INITIALISATION_FAILED,
SVN_ERR_RA_SERF_CATEGORY_START + 0,
"Initialization of SSPI library failed")
/** @since New in 1.5. */
/** @since New in 1.5.
@deprecated Certificate verification now handled by serf rather
than libsvn_ra_serf. */
SVN_ERRDEF(SVN_ERR_RA_SERF_SSL_CERT_UNTRUSTED,
SVN_ERR_RA_SERF_CATEGORY_START + 1,
"Server SSL certificate untrusted")
@ -1507,6 +1627,90 @@ SVN_ERROR_START
SVN_ERR_MALFUNC_CATEGORY_START + 1,
"No non-tracing links found in the error chain")
/* X509 parser errors.
* Names of these error codes are based on tropicssl error codes.
* @since New in 1.9 */
SVN_ERRDEF(SVN_ERR_ASN1_OUT_OF_DATA,
SVN_ERR_X509_CATEGORY_START + 0,
"Unexpected end of ASN1 data")
SVN_ERRDEF(SVN_ERR_ASN1_UNEXPECTED_TAG,
SVN_ERR_X509_CATEGORY_START + 1,
"Unexpected ASN1 tag")
SVN_ERRDEF(SVN_ERR_ASN1_INVALID_LENGTH,
SVN_ERR_X509_CATEGORY_START + 2,
"Invalid ASN1 length")
SVN_ERRDEF(SVN_ERR_ASN1_LENGTH_MISMATCH,
SVN_ERR_X509_CATEGORY_START + 3,
"ASN1 length mismatch")
SVN_ERRDEF(SVN_ERR_ASN1_INVALID_DATA,
SVN_ERR_X509_CATEGORY_START + 4,
"Invalid ASN1 data")
SVN_ERRDEF(SVN_ERR_X509_FEATURE_UNAVAILABLE,
SVN_ERR_X509_CATEGORY_START + 5,
"Unavailable X509 feature")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PEM,
SVN_ERR_X509_CATEGORY_START + 6,
"Invalid PEM certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_FORMAT,
SVN_ERR_X509_CATEGORY_START + 7,
"Invalid certificate format")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_VERSION,
SVN_ERR_X509_CATEGORY_START + 8,
"Invalid certificate version")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SERIAL,
SVN_ERR_X509_CATEGORY_START + 9,
"Invalid certificate serial number")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_ALG,
SVN_ERR_X509_CATEGORY_START + 10,
"Found invalid algorithm in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_NAME,
SVN_ERR_X509_CATEGORY_START + 11,
"Found invalid name in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_DATE,
SVN_ERR_X509_CATEGORY_START + 12,
"Found invalid date in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_PUBKEY,
SVN_ERR_X509_CATEGORY_START + 13,
"Found invalid public key in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_SIGNATURE,
SVN_ERR_X509_CATEGORY_START + 14,
"Found invalid signature in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_INVALID_EXTENSIONS,
SVN_ERR_X509_CATEGORY_START + 15,
"Found invalid extensions in certificate")
SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_VERSION,
SVN_ERR_X509_CATEGORY_START + 16,
"Unknown certificate version")
SVN_ERRDEF(SVN_ERR_X509_CERT_UNKNOWN_PK_ALG,
SVN_ERR_X509_CATEGORY_START + 17,
"Certificate uses unknown public key algorithm")
SVN_ERRDEF(SVN_ERR_X509_CERT_SIG_MISMATCH,
SVN_ERR_X509_CATEGORY_START + 18,
"Certificate signature mismatch")
SVN_ERRDEF(SVN_ERR_X509_CERT_VERIFY_FAILED,
SVN_ERR_X509_CATEGORY_START + 19,
"Certficate verification failed")
SVN_ERROR_END

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,6 @@
#include "svn_types.h"
#include "svn_io.h" /* for svn_stream_t */
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

View File

@ -682,8 +682,15 @@ svn_io_files_contents_three_same_p(svn_boolean_t *same12,
const char *file3,
apr_pool_t *scratch_pool);
/** Create file at utf8-encoded @a file with contents @a contents.
* @a file must not already exist.
/** Create a file at utf8-encoded path @a file with the contents given
* by the null-terminated string @a contents.
*
* @a file must not already exist. If an error occurs while writing or
* closing the file, attempt to delete the file before returning the error.
*
* Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a contents
* is @c NULL, create an empty file.
*
* Use @a pool for memory allocations.
*/
svn_error_t *
@ -691,6 +698,38 @@ svn_io_file_create(const char *file,
const char *contents,
apr_pool_t *pool);
/** Create a file at utf8-encoded path @a file with the contents given
* by @a contents of @a length bytes.
*
* @a file must not already exist. If an error occurs while writing or
* closing the file, attempt to delete the file before returning the error.
*
* Write the data in 'binary' mode (#APR_FOPEN_BINARY). If @a length is
* zero, create an empty file; in this case @a contents may be @c NULL.
*
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_io_file_create_bytes(const char *file,
const void *contents,
apr_size_t length,
apr_pool_t *scratch_pool);
/** Create an empty file at utf8-encoded path @a file.
*
* @a file must not already exist. If an error occurs while
* closing the file, attempt to delete the file before returning the error.
*
* Use @a scratch_pool for temporary allocations.
*
* @since New in 1.9.
*/
svn_error_t *
svn_io_file_create_empty(const char *file,
apr_pool_t *scratch_pool);
/**
* Lock file at @a lock_file. If @a exclusive is TRUE,
* obtain exclusive lock, otherwise obtain shared lock.
@ -759,6 +798,12 @@ svn_io_unlock_open_file(apr_file_t *lockfile_handle,
* Flush any unwritten data from @a file to disk. Use @a pool for
* memory allocations.
*
* @note This function uses advanced file control operations to flush buffers
* to disk that aren't always accessible and can be very expensive on systems
* that implement flushing on all IO layers, like Windows. Please avoid using
* this function in cases where the file should just work on any network
* filesystem. In many cases a normal svn_io_file_flush() will work just fine.
*
* @since New in 1.1.
*/
svn_error_t *
@ -804,14 +849,16 @@ svn_io_dir_file_copy(const char *src_path,
* On entry to the handler, the pointed-to value should be the amount
* of data which can be read or the amount of data to write. When the
* handler returns, the value is reset to the amount of data actually
* read or written. Handlers are obliged to complete a read or write
* to the maximum extent possible; thus, a short read with no
* associated error implies the end of the input stream, and a short
* write should never occur without an associated error.
* read or written. The write and full read handler are obliged to
* complete a read or write to the maximum extent possible; thus, a
* short read with no associated error implies the end of the input
* stream, and a short write should never occur without an associated
* error. In Subversion 1.9 the stream api was extended to also support
* limited reads via the new svn_stream_read2() api.
*
* In Subversion 1.7 reset support was added as an optional feature of
* streams. If a stream implements resetting it allows reading the data
* again after a successful call to svn_stream_reset().
* In Subversion 1.7 mark, seek and reset support was added as an optional
* feature of streams. If a stream implements resetting it allows reading
* the data again after a successful call to svn_stream_reset().
*/
typedef struct svn_stream_t svn_stream_t;
@ -861,7 +908,15 @@ typedef svn_error_t *(*svn_stream_mark_fn_t)(void *baton,
* @since New in 1.7.
*/
typedef svn_error_t *(*svn_stream_seek_fn_t)(void *baton,
const svn_stream_mark_t *mark);
const svn_stream_mark_t *mark);
/** Poll handler for generic streams that support incomplete reads, @see
* svn_stream_t and svn_stream_data_available().
*
* @since New in 1.9.
*/
typedef svn_error_t *(*svn_stream_data_available_fn_t)(void *baton,
svn_boolean_t *data_available);
/** Create a generic stream. @see svn_stream_t. */
svn_stream_t *
@ -873,7 +928,24 @@ void
svn_stream_set_baton(svn_stream_t *stream,
void *baton);
/** Set @a stream's read function to @a read_fn */
/** Set @a stream's read functions to @a read_fn and @a read_full_fn. If
* @a read_full_fn is NULL a default implementation based on multiple calls
* to @a read_fn will be used.
*
* @since New in 1.9.
*/
void
svn_stream_set_read2(svn_stream_t *stream,
svn_read_fn_t read_fn,
svn_read_fn_t read_full_fn);
/** Set @a stream's read function to @a read_fn.
*
* This function sets only the full read function to read_fn.
*
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
void
svn_stream_set_read(svn_stream_t *stream,
svn_read_fn_t read_fn);
@ -912,6 +984,14 @@ void
svn_stream_set_seek(svn_stream_t *stream,
svn_stream_seek_fn_t seek_fn);
/** Set @a stream's data available function to @a data_available_fn
*
* @since New in 1.9.
*/
void
svn_stream_set_data_available(svn_stream_t *stream,
svn_stream_data_available_fn_t data_available);
/** Create a stream that is empty for reading and infinite for writing. */
svn_stream_t *
svn_stream_empty(apr_pool_t *pool);
@ -1049,6 +1129,20 @@ svn_error_t *
svn_stream_for_stdout(svn_stream_t **out,
apr_pool_t *pool);
/** Set @a *str to a string buffer allocated in @a result_pool that contains
* all data from the current position in @a stream to its end. @a len_hint
* specifies the initial capacity of the string buffer and may be 0. The
* buffer gets automatically resized to fit the actual amount of data being
* read from @a stream.
*
* @since New in 1.9.
*/
svn_error_t *
svn_stringbuf_from_stream(svn_stringbuf_t **str,
svn_stream_t *stream,
apr_size_t len_hint,
apr_pool_t *result_pool);
/** Return a generic stream connected to stringbuf @a str. Allocate the
* stream in @a pool.
*/
@ -1131,7 +1225,48 @@ svn_stream_checksummed(svn_stream_t *stream,
svn_boolean_t read_all,
apr_pool_t *pool);
/** Read from a generic stream. @see svn_stream_t. */
/** Read from a generic stream until @a buffer is filled upto @a *len or
* until EOF is reached. @see svn_stream_t
*
* @since New in 1.9.
*/
svn_error_t *
svn_stream_read_full(svn_stream_t *stream,
char *buffer,
apr_size_t *len);
/** Returns @c TRUE if the generic @c stream supports svn_stream_read2().
*
* @since New in 1.9.
*/
svn_boolean_t
svn_stream_supports_partial_read(svn_stream_t *stream);
/** Read all currently available upto @a *len into @a buffer. Use
* svn_stream_read_full() if you want to wait for the buffer to be filled
* or EOF. If the stream doesn't support limited reads this function will
* return an #SVN_ERR_STREAM_NOT_SUPPORTED error.
*
* A 0 byte read signals the end of the stream.
*
* @since New in 1.9.
*/
svn_error_t *
svn_stream_read2(svn_stream_t *stream,
char *buffer,
apr_size_t *len);
/** Read from a generic stream until the buffer is completely filled or EOF.
* @see svn_stream_t.
*
* @note This function is a wrapper of svn_stream_read_full() now, which name
* better documents the behavior of this function.
*
* @deprecated Provided for backward compatibility with the 1.8 API
*/
SVN_DEPRECATED
svn_error_t *
svn_stream_read(svn_stream_t *stream,
char *buffer,
@ -1209,6 +1344,20 @@ svn_stream_mark(svn_stream_t *stream,
svn_error_t *
svn_stream_seek(svn_stream_t *stream, const svn_stream_mark_t *mark);
/** When a stream supports polling for available data, obtain a boolean
* indicating whether data is waiting to be read. If the stream doesn't
* support polling this function returns a #SVN_ERR_STREAM_NOT_SUPPORTED
* error.
*
* If the data_available callback is implemented and the stream is at the end
* the stream will set @a *data_available to FALSE.
*
* @since New in 1.9.
*/
svn_error_t *
svn_stream_data_available(svn_stream_t *stream,
svn_boolean_t *data_available);
/** Return a writable stream which, when written to, writes to both of the
* underlying streams. Both of these streams will be closed upon closure of
* the returned stream; use svn_stream_disown() if this is not the desired
@ -1405,6 +1554,10 @@ typedef svn_error_t *
* If the only "access" the returned stream gets is to close it
* then @a open_func will only be called if @a open_on_close is TRUE.
*
* Allocate the returned stream in @a result_pool. Also arrange for
* @a result_pool to be passed as the @c result_pool parameter to
* @a open_func when it is called.
*
* @since New in 1.8.
*/
svn_stream_t *
@ -2067,6 +2220,28 @@ svn_io_file_seek(apr_file_t *file,
apr_off_t *offset,
apr_pool_t *pool);
/** Set the file pointer of the #APR_BUFFERED @a file to @a offset. In
* contrast to #svn_io_file_seek, this function will attempt to resize the
* internal data buffer to @a block_size bytes and to read data aligned to
* multiples of that value. The beginning of the block will be returned
* in @a buffer_start, if that is not NULL.
* Uses @a scratch_pool for temporary allocations.
*
* @note Due to limitations of the APR API, the alignment may not be
* successful. If you never use any other seek function on @a file,
* however, you are virtually guaranteed to get at least 4kByte alignment
* for all reads.
*
* @note Calling this for non-buffered files is legal but inefficient.
*
* @since New in 1.9
*/
svn_error_t *
svn_io_file_aligned_seek(apr_file_t *file,
apr_off_t block_size,
apr_off_t *buffer_start,
apr_off_t offset,
apr_pool_t *scratch_pool);
/** Wrapper for apr_file_write(). */
svn_error_t *
@ -2075,6 +2250,14 @@ svn_io_file_write(apr_file_t *file,
apr_size_t *nbytes,
apr_pool_t *pool);
/** Wrapper for apr_file_flush().
* @since New in 1.9
*/
svn_error_t *
svn_io_file_flush(apr_file_t *file,
apr_pool_t *scratch_pool);
/** Wrapper for apr_file_write_full(). */
svn_error_t *
@ -2084,6 +2267,29 @@ svn_io_file_write_full(apr_file_t *file,
apr_size_t *bytes_written,
apr_pool_t *pool);
/**
* Writes @a nbytes bytes from @a *buf to a temporary file inside the same
* directory as @a *final_path. Then syncs the temporary file to disk and
* closes the file. After this rename the temporary file to @a final_path,
* possibly replacing an existing file.
*
* If @a copy_perms_path is not NULL, copy the permissions applied on @a
* @a copy_perms_path on the temporary file before renaming.
*
* @note This function uses advanced file control operations to flush buffers
* to disk that aren't always accessible and can be very expensive. Avoid
* using this function in cases where the file should just work on any
* network filesystem.
*
* @since New in 1.9.
*/
svn_error_t *
svn_io_write_atomic(const char *final_path,
const void *buf,
apr_size_t nbytes,
const char* copy_perms_path,
apr_pool_t *scratch_pool);
/**
* Open a unique file in @a dirpath, and write @a nbytes from @a buf to
* the file before flushing it to disk and closing it. Return the name

View File

@ -77,7 +77,7 @@ svn_iter_apr_hash(svn_boolean_t *completed,
void *baton,
apr_pool_t *pool);
/** Iteration callback used in conjuction with svn_iter_apr_array().
/** Iteration callback used in conjunction with svn_iter_apr_array().
*
* Use @a pool for temporary allocation, it's cleared between invocations.
*

View File

@ -102,7 +102,7 @@ extern "C" {
* both acceptable).
*/
/* Suffix for SVN_PROP_MERGEINFO revision ranges indicating a given
/** Suffix for SVN_PROP_MERGEINFO revision ranges indicating a given
range is non-inheritable. */
#define SVN_MERGEINFO_NONINHERITABLE_STR "*"
@ -113,39 +113,44 @@ extern "C" {
*
* (a) Strings (@c svn_string_t *) containing "unparsed mergeinfo".
*
* (b) @c svn_rangelist_t, called a "rangelist". An array of non-
* overlapping merge ranges (@c svn_merge_range_t *), sorted as said by
* @c svn_sort_compare_ranges(). An empty range list is represented by
* an empty array. Unless specifically noted otherwise, all APIs require
* rangelists that describe only forward ranges, i.e. the range's start
* revision is less than its end revision.
* (b) @c svn_rangelist_t, called a "rangelist".
*
* (c) @c svn_mergeinfo_t, called "mergeinfo". A hash mapping merge
* source paths (@c const char *, starting with slashes) to
* non-empty rangelist arrays. A @c NULL hash is used to represent
* no mergeinfo and an empty hash is used to represent empty
* mergeinfo.
* (c) @c svn_mergeinfo_t, called "mergeinfo".
*
* (d) @c svn_mergeinfo_catalog_t, called a "mergeinfo catalog". A hash
* mapping paths (@c const char *) to @c svn_mergeinfo_t.
* (d) @c svn_mergeinfo_catalog_t, called a "mergeinfo catalog".
*
* Both @c svn_mergeinfo_t and @c svn_mergeinfo_catalog_t are just
* typedefs for @c apr_hash_t *; there is no static type-checking, and
* you still use standard @c apr_hash_t functions to interact with
* them.
*
* Note that while the keys of mergeinfos are always absolute from the
* repository root, the keys of a catalog may be relative to something
* else, such as an RA session root.
*/
/** An array of non-overlapping merge ranges (@c svn_merge_range_t *),
* sorted as said by @c svn_sort_compare_ranges(). An empty range list is
* represented by an empty array.
*
* Unless specifically noted otherwise, all APIs require rangelists that
* describe only forward ranges, i.e. the range's start revision is less
* than its end revision. */
typedef apr_array_header_t svn_rangelist_t;
/** A hash mapping merge source paths to non-empty rangelist arrays.
*
* The keys are (@c const char *) absolute paths from the repository root,
* starting with slashes. A @c NULL hash represents no mergeinfo and an
* empty hash represents empty mergeinfo. */
typedef apr_hash_t *svn_mergeinfo_t;
/** A hash mapping paths (@c const char *) to @c svn_mergeinfo_t.
*
* @note While the keys of #svn_mergeinfo_t are always absolute from the
* repository root, the keys of a catalog may be relative to something
* else, such as an RA session root.
* */
typedef apr_hash_t *svn_mergeinfo_catalog_t;
/** Parse the mergeinfo from @a input into @a *mergeinfo. If no
* mergeinfo is available, return an empty mergeinfo (never @c NULL).
* Perform temporary allocations in @a pool.
*
* If @a input is not a grammatically correct @c SVN_PROP_MERGEINFO
* property, contains overlapping revision ranges of differing
@ -160,6 +165,9 @@ typedef apr_hash_t *svn_mergeinfo_catalog_t;
* @a input may contain relative merge source paths, but these are
* converted to absolute paths in @a *mergeinfo.
*
* Allocate the result deeply in @a pool. Also perform temporary
* allocations in @a pool.
*
* @since New in 1.5.
*/
svn_error_t *
@ -357,6 +365,8 @@ svn_rangelist_merge(svn_rangelist_t **rangelist,
* @c svn_merge_range_t inheritable field when comparing @a whiteboard's
* and @a *eraser's rangelists for equality. @see svn_mergeinfo_diff().
*
* Allocate the entire output in @a pool.
*
* @since New in 1.5.
*/
svn_error_t *
@ -411,6 +421,9 @@ svn_mergeinfo_intersect(svn_mergeinfo_t *mergeinfo,
* Note: @a rangelist1 and @a rangelist2 must be sorted as said by @c
* svn_sort_compare_ranges(). @a *rangelist is guaranteed to be in sorted
* order.
*
* Allocate the entire output in @a pool.
*
* @since New in 1.5.
*/
svn_error_t *
@ -444,14 +457,21 @@ svn_rangelist_to_string(svn_string_t **output,
const svn_rangelist_t *rangelist,
apr_pool_t *pool);
/** Return a deep copy of @c svn_merge_range_t *'s in @a rangelist excluding
/** Remove non-inheritable or inheritable revision ranges from a rangelist.
*
* Set @a *inheritable_rangelist to a deep copy of @a rangelist, excluding
* all non-inheritable @c svn_merge_range_t if @a inheritable is TRUE or
* excluding all inheritable @c svn_merge_range_t otherwise. If @a start and
* @a end are valid revisions and @a start is less than or equal to @a end,
* then exclude only the non-inheritable revision ranges that intersect
* inclusively with the range defined by @a start and @a end. If
* @a rangelist contains no elements, return an empty array. Allocate the
* copy in @a result_pool, use @a scratch_pool for temporary allocations.
* excluding all inheritable @c svn_merge_range_t otherwise.
*
* If @a start and @a end are valid revisions and @a start is less than or
* equal to @a end, then exclude only the (non-inheritable or inheritable)
* revision ranges that intersect inclusively with the range defined by
* @a start and @a end.
*
* If there are no remaining ranges, return an empty array.
*
* Allocate the copy in @a result_pool, and use @a scratch_pool for
* temporary allocations.
*
* @since New in 1.7.
*/
@ -477,17 +497,26 @@ svn_rangelist_inheritable(svn_rangelist_t **inheritable_rangelist,
svn_revnum_t end,
apr_pool_t *pool);
/** Return a deep copy of @a mergeinfo, excluding all non-inheritable
* @c svn_merge_range_t if @a inheritable is TRUE or excluding all
* inheritable @c svn_merge_range_t otherwise. If @a start and @a end
* are valid revisions and @a start is less than or equal to @a end,
* then exclude only the non-inheritable revisions that intersect
* inclusively with the range defined by @a start and @a end. If @a path
* is not NULL remove non-inheritable ranges only for @a path. If all
* ranges are removed for a given path then remove that path as well.
* If all paths are removed or @a rangelist is empty then set
* @a *inheritable_rangelist to an empty array. Allocate the copy in
* @a result_pool, use @a scratch_pool for temporary allocations.
/** Remove non-inheritable or inheritable revision ranges from mergeinfo.
*
* Set @a *inheritable_mergeinfo to a deep copy of @a mergeinfo, excluding
* all non-inheritable @c svn_merge_range_t if @a inheritable is TRUE or
* excluding all inheritable @c svn_merge_range_t otherwise.
*
* If @a start and @a end are valid revisions and @a start is less than or
* equal to @a end, then exclude only the (non-inheritable or inheritable)
* revisions that intersect inclusively with the range defined by @a start
* and @a end.
*
* If @a path is not NULL remove (non-inheritable or inheritable) ranges
* only for @a path.
*
* If all ranges are removed for a given path then remove that path as well.
* If @a mergeinfo is initially empty or all paths are removed from it then
* set @a *inheritable_mergeinfo to an empty mergeinfo.
*
* Allocate the copy in @a result_pool, and use @a scratch_pool for
* temporary allocations.
*
* @since New in 1.7.
*/

View File

@ -24,8 +24,8 @@
* @brief Option and argument parsing for Subversion command lines
*/
#ifndef SVN_OPTS_H
#define SVN_OPTS_H
#ifndef SVN_OPT_H
#define SVN_OPT_H
#include <apr.h>
#include <apr_pools.h>
@ -656,6 +656,10 @@ svn_opt_parse_all_args(apr_array_header_t **args_p,
* canonical form if @a path is in canonical form.
*
* @since New in 1.1.
* @since Since 1.6.5, this returns an error if @a path contains a peg
* specifier with no path before it, such as "@abc".
* @since Since 1.9.0, this no longer returns an error if @a path contains a peg
* specifier with no path before it, such as "@abc".
*/
svn_error_t *
svn_opt_parse_path(svn_opt_revision_t *rev,
@ -776,4 +780,4 @@ svn_opt_print_help(apr_getopt_t *os,
}
#endif /* __cplusplus */
#endif /* SVN_OPTS_H */
#endif /* SVN_OPT_H */

View File

@ -114,7 +114,7 @@ char *
svn_path_join(const char *base, const char *component, apr_pool_t *pool);
/** Join multiple components onto a @a base path, allocated in @a pool. The
* components are terminated by a @c NULL.
* components are terminated by a @c SVN_VA_NULL.
*
* If any component is the empty string, it will be ignored.
*
@ -131,7 +131,9 @@ svn_path_join(const char *base, const char *component, apr_pool_t *pool);
*/
SVN_DEPRECATED
char *
svn_path_join_many(apr_pool_t *pool, const char *base, ...);
svn_path_join_many(apr_pool_t *pool,
const char *base,
...) SVN_NEEDS_SENTINEL_NULL;
/** Get the basename of the specified canonicalized @a path. The
@ -716,10 +718,10 @@ svn_path_resolve_repos_relative_url(const char **absolute_url,
const char *repos_root_url,
apr_pool_t *pool);
/* Return a copy of @a path, allocated from @a pool, for which control
* characters have been escaped using the form \NNN (where NNN is the
/** Return a copy of @a path, allocated from @a pool, for which control
* characters have been escaped using the form "\NNN" (where NNN is the
* octal representation of the byte's ordinal value).
*
*
* @since New in 1.8. */
const char *
svn_path_illegal_path_escape(const char *path, apr_pool_t *pool);

View File

@ -440,13 +440,20 @@ svn_prop_name_is_valid(const char *prop_name);
* @verbatim
/trunk: 1-6,9,37-38
/trunk/foo: 10 @endverbatim
* @since New in 1.5.
*/
#define SVN_PROP_MERGEINFO SVN_PROP_PREFIX "mergeinfo"
/** Property used to record inheritable configuration auto-props. */
/** Property used to record inheritable configuration auto-props.
*
* @since New in 1.8.
*/
#define SVN_PROP_INHERITABLE_AUTO_PROPS SVN_PROP_PREFIX "auto-props"
/** Property used to record inheritable configuration ignores. */
/** Property used to record inheritable configuration ignores.
*
* @since New in 1.8.
*/
#define SVN_PROP_INHERITABLE_IGNORES SVN_PROP_PREFIX "global-ignores"
/** Meta-data properties.
@ -671,7 +678,7 @@ svn_prop_name_is_valid(const char *prop_name);
*/
#define SVN_PROP_TXN_PREFIX SVN_PROP_PREFIX "txn-"
/** Identifies the client version compability level. For clients
/** Identifies the client version compatibility level. For clients
* compiled against Subversion libraries, this is @c SVN_VER_NUMBER.
* Third-party implementations are advised to use similar formatting
* for values of this property.

View File

@ -134,7 +134,10 @@ typedef svn_error_t *
apr_pool_t *pool);
/** A function type for retrieving the youngest revision from a repos. */
/** A function type for retrieving the youngest revision from a repos.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
/* ### It seems this type was never used by the API, since 1.0.0. */
typedef svn_error_t *(*svn_ra_get_latest_revnum_func_t)(
void *session_baton,
svn_revnum_t *latest_revnum);
@ -267,6 +270,64 @@ typedef svn_error_t *(*svn_ra_replay_revfinish_callback_t)(
apr_hash_t *rev_props,
apr_pool_t *pool);
/**
* Callback function that checks if an ra_svn tunnel called
* @a tunnel_name is handled by the callbakcs or the default
* implementation.
*
* @a tunnel_baton is the baton as originally passed to ra_open.
*
* @since New in 1.9.
*/
typedef svn_boolean_t (*svn_ra_check_tunnel_func_t)(
void *tunnel_baton, const char *tunnel_name);
/**
* Callback function for closing a tunnel in ra_svn.
*
* This function will be called when the pool that owns the tunnel
* connection is cleared or destroyed.
*
* @a close_baton is the baton as returned from the
* svn_ra_open_tunnel_func_t.
*
* @a tunnel_baton was returned by the open-tunnel callback.
*
* @since New in 1.9.
*/
typedef void (*svn_ra_close_tunnel_func_t)(
void *close_baton, void *tunnel_baton);
/**
* Callback function for opening a tunnel in ra_svn.
*
* Given the @a tunnel_name, tunnel @a user and server @a hostname and
* @a port, open a tunnel to the server and return its file handles,
* which are owned by @a pool, in @a request and @a response.
*
* @a request and @a response represent the standard input and output,
* respectively, of the process on the other end of the tunnel.
*
* If @a *close_func is set it will be called with @a close_baton when
* the tunnel is closed.
*
* The optional @a cancel_func callback can be invoked as usual to allow
* the user to preempt potentially lengthy operations.
*
* @a tunnel_baton is the baton as set in the callbacks.
*
* @since New in 1.9.
*/
typedef svn_error_t *(*svn_ra_open_tunnel_func_t)(
svn_stream_t **request, svn_stream_t **response,
svn_ra_close_tunnel_func_t *close_func, void **close_baton,
void *tunnel_baton,
const char *tunnel_name, const char *user,
const char *hostname, int port,
svn_cancel_func_t cancel_func, void *cancel_baton,
apr_pool_t *pool);
/**
* The update Reporter.
@ -535,6 +596,31 @@ typedef struct svn_ra_callbacks2_t
*/
svn_ra_get_wc_contents_func_t get_wc_contents;
/** Check-tunnel callback
*
* If not @c NULL, and open_tunnel_func is also not @c NULL, this
* callback will be invoked to check if open_tunnel_func should be
* used to create a specific tunnel, or if the default tunnel
* implementation (either built-in or configured in the client
* configuration file) should be used instead.
* @since New in 1.9.
*/
svn_ra_check_tunnel_func_t check_tunnel_func;
/** Open-tunnel callback
*
* If not @c NULL, this callback will be invoked to create a tunnel
* for a ra_svn connection that needs one, overriding any tunnel
* definitions in the client config file. This callback is used only
* for ra_svn and ignored by the other RA modules.
* @since New in 1.9.
*/
svn_ra_open_tunnel_func_t open_tunnel_func;
/** A baton used with open_tunnel_func and close_tunnel_func.
* @since New in 1.9.
*/
void *tunnel_baton;
} svn_ra_callbacks2_t;
/** Similar to svn_ra_callbacks2_t, except that the progress
@ -899,6 +985,10 @@ svn_ra_rev_prop(svn_ra_session_t *session,
* Use @a pool for memory allocation.
*
* @since New in 1.5.
*
* @note Like most commit editors, the returned editor requires that the
* @c copyfrom_path parameter passed to its @c add_file and @c add_directory
* methods is a URL, not a relative path.
*/
svn_error_t *
svn_ra_get_commit_editor3(svn_ra_session_t *session,
@ -1004,11 +1094,10 @@ svn_ra_get_file(svn_ra_session_t *session,
* callers want to know, and some don't.)
*
* If @a props is non @c NULL, set @a *props to contain the properties of
* the directory. This means @em all properties: not just ones controlled by
* the user and stored in the repository fs, but non-tweakable ones
* generated by the SCM system itself (e.g. 'wcprops', 'entryprops',
* etc.) The keys are <tt>const char *</tt>, values are
* <tt>@c svn_string_t *</tt>.
* the directory, including properties that are non-tweakable and
* generated by the SCM system itself (such as #svn_prop_wc_kind and
* #svn_prop_entry_kind properties). The keys are <tt>const char *</tt>,
* values are <tt>@c svn_string_t *</tt>.
*
* @since New in 1.4.
*/
@ -1463,8 +1552,8 @@ svn_ra_do_diff(svn_ra_session_t *session,
* was added or deleted). Each path is an <tt>const char *</tt>, relative
* to the @a session's common parent.
*
* If @a limit is non-zero only invoke @a receiver on the first @a limit
* logs.
* If @a limit is greater than zero only invoke @a receiver on the first
* @a limit logs.
*
* If @a discover_changed_paths, then each call to @a receiver passes a
* <tt>const apr_hash_t *</tt> for the receiver's @a changed_paths argument;
@ -1507,7 +1596,6 @@ svn_ra_do_diff(svn_ra_session_t *session,
*
* @since New in 1.5.
*/
svn_error_t *
svn_ra_get_log2(svn_ra_session_t *session,
const apr_array_header_t *paths,
@ -1708,6 +1796,12 @@ svn_ra_get_location_segments(svn_ra_session_t *session,
* to support reversion of the revision range for @a include_merged_revision
* @c FALSE reporting by switching @a end with @a start.
*
* @note Prior to Subversion 1.9, this function may request delta handlers
* from @a handler even for empty text deltas. Starting with 1.9, the
* delta handler / baton return arguments passed to @a handler will be
* #NULL unless there is an actual difference in the file contents between
* the current and the previous call.
*
* @since New in 1.5.
*/
svn_error_t *
@ -1811,8 +1905,12 @@ svn_ra_unlock(svn_ra_session_t *session,
/**
* If @a path is locked, set @a *lock to an svn_lock_t which
* represents the lock, allocated in @a pool. If @a path is not
* locked, set @a *lock to NULL.
* represents the lock, allocated in @a pool.
*
* If @a path is not locked or does not exist in HEAD, set @a *lock to NULL.
*
* @note Before 1.9, this function could return SVN_ERR_FS_NOT_FOUND
* when @a path didn't exist in HEAD on specific ra layers.
*
* @since New in 1.2.
*/

View File

@ -165,9 +165,9 @@ typedef struct svn_ra_svn_item_t
typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
/** Initialize a connection structure for the given socket or
* input/output files.
* input/output streams.
*
* Either @a sock or @a in_file/@a out_file must be set, not both.
* Either @a sock or @a in_stream/@a out_stream must be set, not both.
* @a compression_level specifies the desired network data compression
* level (zlib) from 0 (no compression) to 9 (best but slowest).
*
@ -184,10 +184,29 @@ typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
* It defines the number of bytes that must have been sent since the last
* check before the next check will be made.
*
* @note If @a out_stream is an wrapped apr_file_t* the backing file will be
* used for some operations.
*
* Allocate the result in @a pool.
*
* @since New in 1.8
* @since New in 1.9
*/
svn_ra_svn_conn_t *svn_ra_svn_create_conn4(apr_socket_t *sock,
svn_stream_t *in_stream,
svn_stream_t *out_stream,
int compression_level,
apr_size_t zero_copy_limit,
apr_size_t error_check_interval,
apr_pool_t *result_pool);
/** Similar to svn_ra_svn_create_conn4() but only supports apr_file_t handles
* instead of the more generic streams.
*
* @since New in 1.8
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_ra_svn_conn_t *svn_ra_svn_create_conn3(apr_socket_t *sock,
apr_file_t *in_file,
apr_file_t *out_file,
@ -268,6 +287,12 @@ svn_ra_svn_conn_remote_host(svn_ra_svn_conn_t *conn);
*
* Upon successful completion of the edit, the editor will invoke @a callback
* with @a callback_baton as an argument.
*
* @note The @c copyfrom_path parameter passed to the @c add_file and
* @c add_directory methods of the returned editor may be either a URL or a
* relative path, and is transferred verbatim to the receiving end of the
* connection. See svn_ra_svn_drive_editor2() for information on the
* receiving end of the connection.
*/
void
svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
@ -283,6 +308,13 @@ svn_ra_svn_get_editor(const svn_delta_editor_t **editor,
* if @a for_replay is TRUE.
*
* @since New in 1.4.
*
* @note The @c copyfrom_path parameter passed to the @c add_file and
* @c add_directory methods of the receiving editor will be canonicalized
* either as a URL or as a relative path (starting with a slash) according
* to which kind was sent by the driving end of the connection. See
* svn_ra_svn_get_editor() for information on the driving end of the
* connection.
*/
svn_error_t *
svn_ra_svn_drive_editor2(svn_ra_svn_conn_t *conn,

File diff suppressed because it is too large Load Diff

View File

@ -52,16 +52,7 @@ extern "C" {
/** This structure is used to hold a key/value from a hash table.
* @note Private. For use by Subversion's own code only. See issue #1644.
*/
typedef struct svn_sort__item_t {
/** pointer to the key */
const void *key;
/** size of the key */
apr_ssize_t klen;
/** pointer to the value */
void *value;
} svn_sort__item_t;
typedef struct svn_sort__item_t svn_sort__item_t;
/** Compare two @c svn_sort__item_t's, returning an integer greater than,
@ -149,73 +140,6 @@ int
svn_sort_compare_ranges(const void *a,
const void *b);
/** Sort @a ht according to its keys, return an @c apr_array_header_t
* containing @c svn_sort__item_t structures holding those keys and values
* (i.e. for each @c svn_sort__item_t @a item in the returned array,
* @a item->key and @a item->size are the hash key, and @a item->value points to
* the hash value).
*
* Storage is shared with the original hash, not copied.
*
* @a comparison_func should take two @c svn_sort__item_t's and return an
* integer greater than, equal to, or less than 0, according as the first item
* is greater than, equal to, or less than the second.
*
* @note Private. For use by Subversion's own code only. See issue #1644.
*
* @note This function and the @c svn_sort__item_t should go over to APR.
*/
apr_array_header_t *
svn_sort__hash(apr_hash_t *ht,
int (*comparison_func)(const svn_sort__item_t *,
const svn_sort__item_t *),
apr_pool_t *pool);
/* Return the lowest index at which the element @a *key should be inserted into
* the array @a array, according to the ordering defined by @a compare_func.
* The array must already be sorted in the ordering defined by @a compare_func.
* @a compare_func is defined as for the C stdlib function bsearch().
*
* @note Private. For use by Subversion's own code only.
*/
int
svn_sort__bsearch_lower_bound(const void *key,
const apr_array_header_t *array,
int (*compare_func)(const void *, const void *));
/* Insert a shallow copy of @a *new_element into the array @a array at the index
* @a insert_index, growing the array and shuffling existing elements along to
* make room.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_insert(const void *new_element,
apr_array_header_t *array,
int insert_index);
/* Remove @a elements_to_delete elements starting at @a delete_index from the
* array @a arr. If @a delete_index is not a valid element of @a arr,
* @a elements_to_delete is not greater than zero, or
* @a delete_index + @a elements_to_delete is greater than @a arr->nelts,
* then do nothing.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_delete(apr_array_header_t *arr,
int delete_index,
int elements_to_delete);
/* Reverse the order of elements in @a array, in place.
*
* @note Private. For use by Subversion's own code only.
*/
void
svn_sort__array_reverse(apr_array_header_t *array,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -140,6 +140,8 @@ svn_string_create_empty(apr_pool_t *pool);
/** Create a new string copied from a generic string of bytes, @a bytes, of
* length @a size bytes. @a bytes is NOT assumed to be null-terminated, but
* the new string will be.
*
* @since Since 1.9, @a bytes can be NULL if @a size is zero.
*/
svn_string_t *
svn_string_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
@ -168,7 +170,11 @@ svn_string_createv(apr_pool_t *pool, const char *fmt, va_list ap)
svn_boolean_t
svn_string_isempty(const svn_string_t *str);
/** Return a duplicate of @a original_string. */
/** Return a duplicate of @a original_string.
*
* @since Since 1.9, @a original_string can be NULL in which case NULL will
* be returned.
*/
svn_string_t *
svn_string_dup(const svn_string_t *original_string, apr_pool_t *pool);
@ -205,6 +211,8 @@ svn_stringbuf_create(const char *cstring, apr_pool_t *pool);
/** Create a new stringbuf copied from the generic string of bytes, @a bytes,
* of length @a size bytes. @a bytes is NOT assumed to be null-terminated,
* but the new stringbuf will be.
*
* @since Since 1.9, @a bytes can be NULL if @a size is zero.
*/
svn_stringbuf_t *
svn_stringbuf_ncreate(const char *bytes, apr_size_t size, apr_pool_t *pool);
@ -232,6 +240,15 @@ svn_stringbuf_create_ensure(apr_size_t minimum_size, apr_pool_t *pool);
svn_stringbuf_t *
svn_stringbuf_create_from_string(const svn_string_t *str, apr_pool_t *pool);
/** Create a new stringbuf using the given @a str as initial buffer.
* Allocate the result in @a pool. In contrast to #svn_stringbuf_create,
* the contents of @a str may change when the stringbuf gets modified.
*
* @since New in 1.9
*/
svn_stringbuf_t *
svn_stringbuf_create_wrap(char *str, apr_pool_t *pool);
/** Create a new stringbuf by printf-style formatting using @a fmt and the
* variable arguments, which are as appropriate for apr_psprintf().
*/
@ -288,25 +305,37 @@ svn_stringbuf_fillchar(svn_stringbuf_t *str, unsigned char c);
* The advantages extend beyond the actual call because the reduced
* register pressure allows for more optimization within the caller.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
* Reallocs if necessary. @a targetstr is affected, nothing else is.
* @since New in 1.7.
*/
void
svn_stringbuf_appendbyte(svn_stringbuf_t *targetstr,
char byte);
/** Append an array of bytes onto @a targetstr.
/** Append the array of bytes @a bytes of length @a count onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
* Reallocs if necessary. @a targetstr is affected, nothing else is.
*
* @since 1.9 @a bytes can be NULL if @a count is zero.
*/
void
svn_stringbuf_appendbytes(svn_stringbuf_t *targetstr,
const char *bytes,
apr_size_t count);
/** Append @a byte @a count times onto @a targetstr.
*
* Reallocs if necessary. @a targetstr is affected, nothing else is.
* @since New in 1.9.
*/
void
svn_stringbuf_appendfill(svn_stringbuf_t *targetstr,
char byte,
apr_size_t count);
/** Append the stringbuf @c appendstr onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
* Reallocs if necessary. @a targetstr is affected, nothing else is.
*/
void
svn_stringbuf_appendstr(svn_stringbuf_t *targetstr,
@ -314,22 +343,25 @@ svn_stringbuf_appendstr(svn_stringbuf_t *targetstr,
/** Append the C string @a cstr onto @a targetstr.
*
* reallocs if necessary. @a targetstr is affected, nothing else is.
* Reallocs if necessary. @a targetstr is affected, nothing else is.
*/
void
svn_stringbuf_appendcstr(svn_stringbuf_t *targetstr,
const char *cstr);
/** Read @a count bytes from @a bytes and insert them into @a str at
* position @a pos and following. The resulting string will be
* @c count+str->len bytes long. If @c pos is larger or equal to the
* number of bytes currently used in @a str, simply append @a bytes.
/** Insert into @a str at position @a pos an array of bytes @a bytes
* which is @a count bytes long.
*
* The resulting string will be @c count+str->len bytes long. If
* @a pos is larger than or equal to @c str->len, simply append @a bytes.
*
* Reallocs if necessary. @a str is affected, nothing else is.
*
* @note The inserted string may be a sub-range if @a str.
* @note The inserted string may be a sub-range of @a str.
*
* @since New in 1.8.
*
* @since Since 1.9, @a bytes can be NULL if @a count is zero.
*/
void
svn_stringbuf_insert(svn_stringbuf_t *str,
@ -337,9 +369,10 @@ svn_stringbuf_insert(svn_stringbuf_t *str,
const char *bytes,
apr_size_t count);
/** Removes @a count bytes from @a str, starting at position @a pos.
* If that range exceeds the current string data, @a str gets truncated
* at @a pos. If the latter is larger or equal to @c str->pos, this will
/** Remove @a count bytes from @a str, starting at position @a pos.
*
* If that range exceeds the current string data, truncate @a str at
* @a pos. If @a pos is larger than or equal to @c str->len, this will
* be a no-op. Otherwise, the resulting string will be @c str->len-count
* bytes long.
*
@ -351,8 +384,8 @@ svn_stringbuf_remove(svn_stringbuf_t *str,
apr_size_t count);
/** Replace in @a str the substring which starts at @a pos and is @a
* old_count bytes long with a new substring @a bytes (which is @a
* new_count bytes long).
* old_count bytes long with a new substring @a bytes which is @a
* new_count bytes long.
*
* This is faster but functionally equivalent to the following sequence:
* @code
@ -361,6 +394,8 @@ svn_stringbuf_remove(svn_stringbuf_t *str,
* @endcode
*
* @since New in 1.8.
*
* @since Since 1.9, @a bytes can be NULL if @a new_count is zero.
*/
void
svn_stringbuf_replace(svn_stringbuf_t *str,
@ -407,9 +442,11 @@ svn_string_compare_stringbuf(const svn_string_t *str1,
* @{
*/
/** Divide @a input into substrings along @a sep_chars boundaries, return an
* array of copies of those substrings (plain const char*), allocating both
* the array and the copies in @a pool.
/** Divide @a input into substrings, interpreting any char from @a sep
* as a token separator.
*
* Return an array of copies of those substrings (plain const char*),
* allocating both the array and the copies in @a pool.
*
* None of the elements added to the array contain any of the
* characters in @a sep_chars, and none of the new elements are empty
@ -504,6 +541,7 @@ svn_cstring_casecmp(const char *str1, const char *str2);
* Assume that the number is represented in base @a base.
* Raise an error if conversion fails (e.g. due to overflow), or if the
* converted number is smaller than @a minval or larger than @a maxval.
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
@ -516,6 +554,7 @@ svn_cstring_strtoi64(apr_int64_t *n, const char *str,
* Parse the C string @a str into a 64 bit number, and return it in @a *n.
* Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
@ -526,6 +565,7 @@ svn_cstring_atoi64(apr_int64_t *n, const char *str);
* Parse the C string @a str into a 32 bit number, and return it in @a *n.
* Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
@ -537,6 +577,7 @@ svn_cstring_atoi(int *n, const char *str);
* it in @a *n. Assume that the number is represented in base @a base.
* Raise an error if conversion fails (e.g. due to overflow), or if the
* converted number is smaller than @a minval or larger than @a maxval.
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
@ -549,6 +590,7 @@ svn_cstring_strtoui64(apr_uint64_t *n, const char *str,
* Parse the C string @a str into an unsigned 64 bit number, and return
* it in @a *n. Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
@ -559,12 +601,23 @@ svn_cstring_atoui64(apr_uint64_t *n, const char *str);
* Parse the C string @a str into an unsigned 32 bit number, and return
* it in @a *n. Assume that the number is represented in base 10.
* Raise an error if conversion fails (e.g. due to overflow).
* Leading whitespace in @a str is skipped in a locale-dependent way.
*
* @since New in 1.7.
*/
svn_error_t *
svn_cstring_atoui(unsigned int *n, const char *str);
/**
* Skip the common prefix @a prefix from the C string @a str, and return
* a pointer to the next character after the prefix.
* Return @c NULL if @a str does not start with @a prefix.
*
* @since New in 1.9.
*/
const char *
svn_cstring_skip_prefix(const char *str, const char *prefix);
/** @} */
/** @} */

View File

@ -32,6 +32,7 @@
#include <limits.h> /* for ULONG_MAX */
#include <apr.h> /* for apr_size_t, apr_int64_t, ... */
#include <apr_version.h>
#include <apr_errno.h> /* for apr_status_t */
#include <apr_pools.h> /* for apr_pool_t */
#include <apr_hash.h> /* for apr_hash_t */
@ -63,6 +64,50 @@ extern "C" {
# endif
#endif
/** Macro used to mark experimental functions.
*
* @since New in 1.9.
*/
#ifndef SVN_EXPERIMENTAL
# if !defined(SWIGPERL) && !defined(SWIGPYTHON) && !defined(SWIGRUBY)
# if defined(__has_attribute)
# if __has_attribute(__warning__)
# define SVN_EXPERIMENTAL __attribute__((warning("experimental function used")))
# else
# define SVN_EXPERIMENTAL
# endif
# elif !defined(__llvm__) && defined(__GNUC__) \
&& (__GNUC__ >= 4 || (__GNUC__==3 && __GNUC_MINOR__>=1))
# define SVN_EXPERIMENTAL __attribute__((warning("experimental function used")))
# elif defined(_MSC_VER) && _MSC_VER >= 1300
# define SVN_EXPERIMENTAL __declspec(deprecated("experimental function used"))
# else
# define SVN_EXPERIMENTAL
# endif
# else
# define SVN_EXPERIMENTAL
# endif
#endif
/** Macro used to mark functions that require a final null sentinel argument.
*
* @since New in 1.9.
*/
#ifndef SVN_NEEDS_SENTINEL_NULL
# if defined(__has_attribute)
# if __has_attribute(__sentinel__)
# define SVN_NEEDS_SENTINEL_NULL __attribute__((sentinel))
# else
# define SVN_NEEDS_SENTINEL_NULL
# endif
# elif defined(__GNUC__) && (__GNUC__ >= 4)
# define SVN_NEEDS_SENTINEL_NULL __attribute__((sentinel))
# else
# define SVN_NEEDS_SENTINEL_NULL
# endif
#endif
/** Indicate whether the current platform supports unaligned data access.
*
@ -104,6 +149,26 @@ typedef int svn_boolean_t;
#endif /* FALSE */
/* Declaration of a unique type, never defined, for the SVN_VA_NULL macro.
*
* NOTE: Private. Not for direct use by third-party code.
*/
struct svn__null_pointer_constant_stdarg_sentinel_t;
/** Null pointer constant used as a sentinel in variable argument lists.
*
* Use of this macro ensures that the argument is of the correct size when a
* pointer is expected. (The macro @c NULL is not defined as a pointer on
* all systems, and the arguments to variadic functions are not converted
* automatically to the expected type.)
*
* @since New in 1.9.
*/
#define SVN_VA_NULL ((struct svn__null_pointer_constant_stdarg_sentinel_t*)0)
/* See? (char*)NULL -- They have the same length, but the cast looks ugly. */
/** Subversion error object.
*
@ -186,21 +251,26 @@ typedef struct svn_version_t svn_version_t;
* These functions enable the caller to dereference an APR hash table index
* without type casts or temporary variables.
*
* ### These are private, and may go away when APR implements them natively.
* These functions are provided by APR itself from version 1.5.
* Definitions are provided here for when using older versions of APR.
* @{
*/
#if !APR_VERSION_AT_LEAST(1, 5, 0)
/** Return the key of the hash table entry indexed by @a hi. */
const void *
svn__apr_hash_index_key(const apr_hash_index_t *hi);
apr_hash_this_key(apr_hash_index_t *hi);
/** Return the key length of the hash table entry indexed by @a hi. */
apr_ssize_t
svn__apr_hash_index_klen(const apr_hash_index_t *hi);
apr_hash_this_key_len(apr_hash_index_t *hi);
/** Return the value of the hash table entry indexed by @a hi. */
void *
svn__apr_hash_index_val(const apr_hash_index_t *hi);
apr_hash_this_val(apr_hash_index_t *hi);
#endif
/** @} */
@ -1001,7 +1071,6 @@ typedef svn_error_t *(*svn_log_message_receiver_t)(
const char *message,
apr_pool_t *pool);
/** Callback function type for commits.
*

View File

@ -61,7 +61,7 @@ extern "C" {
* Modify when new functionality is added or new interfaces are
* defined, but all changes are backward compatible.
*/
#define SVN_VER_MINOR 8
#define SVN_VER_MINOR 9
/**
* Patch number.
@ -70,7 +70,7 @@ extern "C" {
*
* @since New in 1.1.
*/
#define SVN_VER_PATCH 14
#define SVN_VER_PATCH 2
/** @deprecated Provided for backward compatibility with the 1.0 API. */
@ -82,7 +82,7 @@ extern "C" {
/** Version tag: a string describing the version.
*
* This tag remains " (dev build)" in the repository so that we can
* This tag remains " (under development)" in the repository so that we can
* always see from "svn --version" that the software has been built
* from the repository rather than a "blessed" distribution.
*
@ -93,7 +93,7 @@ extern "C" {
*
* Always change this at the same time as SVN_VER_NUMTAG.
*/
#define SVN_VER_TAG " (r1692801)"
#define SVN_VER_TAG " (r1703836)"
/** Number tag: a string describing the version.
@ -114,12 +114,10 @@ extern "C" {
/** Revision number: The repository revision number of this release.
*
* This constant is used to generate the build number part of the Windows
* file version. Its value remains 0 in the repository.
*
* When rolling a tarball, we automatically replace it with what we
* guess to be the correct revision number.
* file version. Its value remains 0 in the repository except in release
* tags where it is the revision from which the tag was created.
*/
#define SVN_VER_REVISION 1692801
#define SVN_VER_REVISION 1703836
/* Version strings composed from the above definitions. */
@ -177,10 +175,25 @@ struct svn_version_t
* Generate the implementation of a version query function.
*
* @since New in 1.1.
* @since Since 1.9, embeds a string into the compiled object
* file that can be queried with the 'what' utility.
*/
#define SVN_VERSION_BODY \
SVN_VERSION_DEFINE(versioninfo); \
return &versioninfo
#define SVN_VERSION_BODY \
static struct versioninfo_t \
{ \
const char *const str; \
const svn_version_t num; \
} const versioninfo = \
{ \
"@(#)" SVN_VERSION, \
{ \
SVN_VER_MAJOR, \
SVN_VER_MINOR, \
SVN_VER_PATCH, \
SVN_VER_NUMTAG \
} \
}; \
return &versioninfo.num
/**
* Check library version compatibility. Return #TRUE if the client's
@ -192,6 +205,8 @@ struct svn_version_t
* unreleased library. A development client is always compatible with
* a previous released library.
*
* @note Implements the #svn_ver_check_list2.@a comparator interface.
*
* @since New in 1.1.
*/
svn_boolean_t
@ -201,6 +216,8 @@ svn_ver_compatible(const svn_version_t *my_version,
/**
* Check if @a my_version and @a lib_version encode the same version number.
*
* @note Implements the #svn_ver_check_list2.@a comparator interface.
*
* @since New in 1.2.
*/
svn_boolean_t
@ -228,11 +245,32 @@ typedef struct svn_version_checklist_t
* my_version is compatible with each entry in @a checklist. @a
* checklist must end with an entry whose label is @c NULL.
*
* @see svn_ver_compatible()
* @a my_version is considered to be compatible with a version in @a checklist
* if @a comparator returns #TRUE when called with @a my_version as the first
* parammeter and the @a checklist version as the second parameter.
*
* @since New in 1.1.
* @see svn_ver_compatible(), svn_ver_equal()
*
* @note Subversion's own code invariably uses svn_ver_equal() as @a comparator,
* since the cmdline tools sometimes use non-public APIs (such as utility
* functions that haven't been promoted to svn_cmdline.h). Third-party code
* SHOULD use svn_ver_compatible() as @a comparator.
*
* @since New in 1.9.
*/
svn_error_t *
svn_ver_check_list2(const svn_version_t *my_version,
const svn_version_checklist_t *checklist,
svn_boolean_t (*comparator)(const svn_version_t *,
const svn_version_t *));
/** Similar to svn_ver_check_list2(), with @a comparator set to
* #svn_ver_compatible.
*
* @deprecated Provided for backward compatibility with 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_ver_check_list(const svn_version_t *my_version,
const svn_version_checklist_t *checklist);
@ -268,6 +306,11 @@ typedef struct svn_version_extended_t svn_version_extended_t;
* retrieve (for example, the OS release name, list of shared
* libraries, etc.). Use @a pool for all allocations.
*
* @note This function may allocate significant auxiliary resources
* (memory and file descriptors) in @a pool. It is recommended to
* copy the returned data to suitable longer-lived memory and clear
* @a pool after calling this function.
*
* @since New in 1.8.
*/
const svn_version_extended_t *

View File

@ -907,13 +907,15 @@ svn_wc_external_item_dup(const svn_wc_external_item_t *item,
*
* Allocate the table, keys, and values in @a pool.
*
* Use @a parent_directory only in constructing error strings.
* @a defining_directory is the path or URL of the directory on which
* the svn:externals property corresponding to @a desc is set.
* @a defining_directory is only used when constructing error strings.
*
* @since New in 1.5.
*/
svn_error_t *
svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
const char *parent_directory,
const char *defining_directory,
const char *desc,
svn_boolean_t canonicalize_url,
apr_pool_t *pool);
@ -1255,8 +1257,24 @@ typedef enum svn_wc_notify_action_t
* copy + delete. The notified path is the move source (the deleted path).
* ### TODO: Provide path to move destination as well?
* @since New in 1.8. */
svn_wc_notify_move_broken
svn_wc_notify_move_broken,
/** Running cleanup on an external module.
* @since New in 1.9. */
svn_wc_notify_cleanup_external,
/** The operation failed because the operation (E.g. commit) is only valid
* if the operation includes this path.
* @since New in 1.9. */
svn_wc_notify_failed_requires_target,
/** Running info on an external module.
* @since New in 1.9. */
svn_wc_notify_info_external,
/** Finalizing commit.
* @since New in 1.9. */
svn_wc_notify_commit_finalizing
} svn_wc_notify_action_t;
@ -1732,6 +1750,7 @@ svn_wc_conflict_version_t *
svn_wc_conflict_version_dup(const svn_wc_conflict_version_t *version,
apr_pool_t *pool);
/** A struct that describes a conflict that has occurred in the
* working copy.
*
@ -1756,8 +1775,10 @@ typedef struct svn_wc_conflict_description2_t
/** The path that is in conflict (for a tree conflict, it is the victim) */
const char *local_abspath;
/** The node type of the path being operated on (for a tree conflict,
* ### which version?) */
/** The node type of the local node involved in this conflict.
* For a tree conflict, this is the node kind of the tree conflict victim.
* For the left/right node kinds of the incoming conflicting change see
* src_left_version->node_kind and src_right_version->node_kind. */
svn_node_kind_t node_kind;
/** What sort of conflict are we describing? */
@ -1776,13 +1797,19 @@ typedef struct svn_wc_conflict_description2_t
* (Only if @c kind is 'text', else undefined.) */
const char *mime_type;
/** The action being attempted on the conflicted node or property.
* (When @c kind is 'text', this action must be 'edit'.) */
/** The incoming action being attempted on the conflicted node or property.
* When @c kind is 'text', this action must be 'edit', but generally it can
* be any kind of possible change. */
svn_wc_conflict_action_t action;
/** The state of the target node or property, relative to its merge-left
* source, that is the reason for the conflict.
* (When @c kind is 'text', this reason must be 'edited'.) */
/** The local change or state of the target node or property, relative
* to its merge-left source, that conflicts with the incoming action.
* When @c kind is 'text', this must be 'edited', but generally it can
* be any kind of possible change.
* Note that 'local' does not always refer to a working copy. A change
* can be local to the target branch of a merge operation, for example,
* and is not necessarily visible in a working copy of the target branch
* at any given revision. */
svn_wc_conflict_reason_t reason;
/** If this is text-conflict and involves the merging of two files
@ -1817,7 +1844,8 @@ typedef struct svn_wc_conflict_description2_t
/** my locally-edited version of the file */
const char *my_abspath;
/** merged version; may contain conflict markers */
/** merged version; may contain conflict markers
* ### For property conflicts, this contains 'their_abspath'. */
const char *merged_file;
/** The operation that exposed the conflict.
@ -1831,8 +1859,44 @@ typedef struct svn_wc_conflict_description2_t
/** Info on the "merge-right source" or "their" version of incoming change. */
const svn_wc_conflict_version_t *src_right_version;
/* Remember to adjust svn_wc__conflict_description2_dup()
* if you add new fields to this struct. */
/** For property conflicts, the absolute path to the .prej file.
* @since New in 1.9. */
const char *prop_reject_abspath;
/** For property conflicts, the local base value of the property, i.e. the
* value of the property as of the BASE revision of the working copy.
* For conflicts created during update/switch this contains the
* post-update/switch property value. The pre-update/switch value can
* be found in prop_value_incoming_old.
* Only set if available, so might be @c NULL.
* @since New in 1.9. */
const svn_string_t *prop_value_base;
/** For property conflicts, the local working value of the property,
* i.e. the value of the property in the working copy, possibly with
* local modiciations.
* Only set if available, so might be @c NULL.
* @since New in 1.9. */
const svn_string_t *prop_value_working;
/** For property conflicts, the incoming old value of the property,
* i.e. the value the property had at @c src_left_version.
* Only set if available, so might be @c NULL.
* @since New in 1.9 */
const svn_string_t *prop_value_incoming_old;
/** For property conflicts, the incoming new value of the property,
* i.e. the value the property had at @c src_right_version.
* Only set if available, so might be @c NULL.
* @since New in 1.9 */
const svn_string_t *prop_value_incoming_new;
/* NOTE: Add new fields at the end to preserve binary compatibility.
Also, if you add fields here, you have to update
svn_wc_conflict_description2_dup and perhaps
svn_wc_conflict_description_create_text2,
svn_wc_conflict_description_create_prop2, and
svn_wc_conflict_description_create_tree2. */
} svn_wc_conflict_description2_t;
@ -1928,7 +1992,7 @@ typedef struct svn_wc_conflict_description_t
} svn_wc_conflict_description_t;
/**
* Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
* Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
* initialize to represent a text conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
@ -1960,7 +2024,7 @@ svn_wc_conflict_description_create_text(const char *path,
apr_pool_t *pool);
/**
* Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
* Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
* initialize to represent a property conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
@ -1994,13 +2058,13 @@ svn_wc_conflict_description_create_prop(const char *path,
apr_pool_t *pool);
/**
* Allocate an #svn_wc_conflict_description_t structure in @a pool,
* Allocate an #svn_wc_conflict_description2_t structure in @a pool,
* initialize to represent a tree conflict, and return it.
*
* Set the @c local_abspath field of the created struct to @a local_abspath
* (which must be an absolute path), the @c kind field to
* #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, the @c
* operation to @a operation, the @c src_left_version field to
* #svn_wc_conflict_kind_tree, the @c local_node_kind to @a local_node_kind,
* the @c operation to @a operation, the @c src_left_version field to
* @a src_left_version, and the @c src_right_version field to
* @a src_right_version.
*
@ -2040,9 +2104,22 @@ svn_wc_conflict_description_create_tree(
/** Return a duplicate of @a conflict, allocated in @a result_pool.
* A deep copy of all members will be made.
*
* @since New in 1.7.
* @since New in 1.9.
*/
svn_wc_conflict_description2_t *
svn_wc_conflict_description2_dup(
const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool);
/** Like svn_wc_conflict_description2_dup(), but is improperly named
* as a private function when it is intended to be a public API.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_wc_conflict_description2_t *
svn_wc__conflict_description2_dup(
const svn_wc_conflict_description2_t *conflict,
apr_pool_t *result_pool);
@ -2054,9 +2131,15 @@ svn_wc__conflict_description2_dup(
*/
typedef enum svn_wc_conflict_choice_t
{
/** Undefined; for internal use only.
This value is never returned in svn_wc_conflict_result_t.
* @since New in 1.9
*/
svn_wc_conflict_choose_undefined = -1,
/** Don't resolve the conflict now. Let libsvn_wc mark the path
'conflicted', so user can run 'svn resolved' later. */
svn_wc_conflict_choose_postpone,
svn_wc_conflict_choose_postpone = 0,
/** If there were files to choose from, select one as a way of
resolving the conflict here and now. libsvn_wc will then do the
@ -2069,7 +2152,7 @@ typedef enum svn_wc_conflict_choice_t
svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
svn_wc_conflict_choose_merged, /**< merged version */
/* @since New in 1.8. */
/** @since New in 1.8. */
svn_wc_conflict_choose_unspecified /**< undecided */
} svn_wc_conflict_choice_t;
@ -2102,6 +2185,14 @@ typedef struct svn_wc_conflict_result_t
NULL) in the user's working copy. */
svn_boolean_t save_merged;
/** If not NULL, this is the new merged property, used when choosing
* #svn_wc_conflict_choose_merged. This value is prefered over using
* merged_file.
*
* @since New in 1.9.
*/
const svn_string_t *merged_value;
} svn_wc_conflict_result_t;
@ -2111,7 +2202,8 @@ typedef struct svn_wc_conflict_result_t
*
* Set the @c choice field of the structure to @a choice, @c merged_file
* to @a merged_file, and @c save_merged to false. Make only a shallow
* copy of the pointer argument @a merged_file.
* copy of the pointer argument @a merged_file. @a merged_file may be
* NULL if setting merged_file is not needed.
*
* @since New in 1.5.
*/
@ -3743,6 +3835,13 @@ typedef struct svn_wc_status3_t
* @since New in 1.8. */
svn_boolean_t file_external;
/** The actual kind of the node in the working copy. May differ from
* @a kind on obstructions, deletes, etc. #svn_node_unknown if unavailable.
*
* @since New in 1.9 */
svn_node_kind_t actual_kind;
/* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
} svn_wc_status3_t;
@ -4544,10 +4643,9 @@ svn_wc_delete(const char *path,
* addition to the working copy. The added node will have the properties
* provided in @a props, or none if that is NULL.
*
* Check and canonicalize the properties in the same way as
* svn_wc_prop_set4(). Return an error and don't add the node if the
* properties are not valid on this node. Unlike svn_wc_prop_set4()
* there is no option to skip some of the checks and canonicalizations.
* Unless @a skip_checks is TRUE, check and canonicalize the properties in the
* same way as svn_wc_prop_set4(). Return an error and don't add the node if
* the properties are not valid on this node.
*
* ### The error code on validity check failure should be specified, and
* preferably should be a single code.
@ -4559,11 +4657,31 @@ svn_wc_delete(const char *path,
* If @a local_abspath does not exist as file, directory or symlink, return
* #SVN_ERR_WC_PATH_NOT_FOUND.
*
* If @a notify_func is non-NULL, invoke it with @a notify_baton to report
* the item being added.
*
* ### TODO: Split into add_dir, add_file, add_symlink?
*
* @since New in 1.8.
* @since New in 1.9.
*/
svn_error_t *
svn_wc_add_from_disk3(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const apr_hash_t *props,
svn_boolean_t skip_checks,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_add_from_disk3(), but always passes FALSE for
* @a skip_checks
*
* @since New in 1.8.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_add_from_disk2(svn_wc_context_t *wc_ctx,
const char *local_abspath,
const apr_hash_t *props,
@ -5070,6 +5188,12 @@ svn_wc_committed_queue_create(apr_pool_t *pool);
* ### seems to be not a set of changes but rather the new complete set of
* ### props. And it's renamed to 'new_dav_cache' inside; why?
*
* If @a is_committed is @c TRUE, the node will be processed as committed. This
* turns the node and its implied descendants as the new unmodified state at
* the new specified revision. Unless @a recurse is TRUE, changes on
* descendants are not committed as changes directly. In this case they should
* be queueud as their own changes.
*
* If @a remove_lock is @c TRUE, any entryprops related to a repository
* lock will be removed.
*
@ -5107,7 +5231,25 @@ svn_wc_committed_queue_create(apr_pool_t *pool);
* Temporary allocations will be performed in @a scratch_pool, and persistent
* allocations will use the same pool as @a queue used when it was created.
*
* @since New in 1.9.
*/
svn_error_t *
svn_wc_queue_committed4(svn_wc_committed_queue_t *queue,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t recurse,
svn_boolean_t is_committed,
const apr_array_header_t *wcprop_changes,
svn_boolean_t remove_lock,
svn_boolean_t remove_changelist,
const svn_checksum_t *sha1_checksum,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_queue_committed4, but with is_committed always
* TRUE.
*
* @since New in 1.7.
* @deprecated Provided for backwards compatibility with the 1.8 API.
*/
svn_error_t *
svn_wc_queue_committed3(svn_wc_committed_queue_t *queue,
@ -7093,7 +7235,7 @@ svn_wc_merge_prop_diffs(svn_wc_notify_state_t *state,
* the copy/move source (even if the copy-/move-here replaces a locally
* deleted file).
*
* If @a local_abspath refers to an unversioned or non-existing path, return
* If @a local_abspath refers to an unversioned or non-existent path, return
* @c SVN_ERR_WC_PATH_NOT_FOUND. Use @a wc_ctx to access the working copy.
* @a contents may not be @c NULL (unlike @a *contents).
*
@ -7142,20 +7284,60 @@ svn_wc_get_pristine_copy_path(const char *path,
/**
* Recurse from @a local_abspath, cleaning up unfinished log business. Perform
* any temporary allocations in @a scratch_pool. Any working copy locks under
* @a local_abspath will be taken over and then cleared by this function.
* Recurse from @a local_abspath, cleaning up unfinished tasks. Perform
* any temporary allocations in @a scratch_pool. If @a break_locks is TRUE
* Any working copy locks under @a local_abspath will be taken over and then
* cleared by this function.
* WARNING: If @a break_locks is TRUE there is no mechanism that will protect
* locks that are still being used.
*
* WARNING: there is no mechanism that will protect locks that are still being
* used.
* If @a fix_recorded_timestamps is TRUE the recorded timestamps of unmodified
* files will be updated, which will improve performance of future is-modified
* checks.
*
* If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
* mod_dav served repositories is cleared. This clearing invalidates some
* cached information used for pre-HTTPv2 repositories.
*
* If @a vacuum_pristines is TRUE, try to remove unreferenced pristines from
* the working copy. (Will not remove anything unless the obtained lock applies
* to the entire working copy)
*
* If @a cancel_func is non-NULL, invoke it with @a cancel_baton at various
* points during the operation. If it returns an error (typically
* #SVN_ERR_CANCELLED), return that error immediately.
*
* @since New in 1.7.
* If @a notify_func is non-NULL, invoke it with @a notify_baton to report
* the progress of the operation.
*
* @note In 1.9, @a notify_func does not get called at all. This may change
* in later releases.
*
* @since New in 1.9.
*/
svn_error_t *
svn_wc_cleanup4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_boolean_t break_locks,
svn_boolean_t fix_recorded_timestamps,
svn_boolean_t clear_dav_cache,
svn_boolean_t vacuum_pristines,
svn_cancel_func_t cancel_func,
void *cancel_baton,
svn_wc_notify_func2_t notify_func,
void *notify_baton,
apr_pool_t *scratch_pool);
/**
* Similar to svn_wc_cleanup4() but will always break locks, fix recorded
* timestamps, clear the dav cache and vacuum pristines. This function also
* doesn't support notifications.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_cleanup3(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_cancel_func_t cancel_func,
@ -7379,6 +7561,13 @@ svn_wc_relocate(const char *path,
* changelists. If @a changelist_filter is empty (or altogether @c NULL),
* no changelist filtering occurs.
*
* 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
@ -7395,9 +7584,30 @@ svn_wc_relocate(const char *path,
* If @a path is not under version control, return the error
* #SVN_ERR_UNVERSIONED_RESOURCE.
*
* @since New in 1.7.
* @since New in 1.9.
*/
svn_error_t *
svn_wc_revert5(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
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,
void *notify_baton,
apr_pool_t *scratch_pool);
/** Similar to svn_wc_revert5() but with @a clear_changelists always set to
* FALSE and @a metadata_only set to FALSE.
*
* @since New in 1.7.
* @deprecated Provided for backward compatibility with the 1.8 API.
*/
SVN_DEPRECATED
svn_error_t *
svn_wc_revert4(svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_depth_t depth,
@ -7875,7 +8085,8 @@ typedef struct svn_wc_revision_status_t
svn_boolean_t switched; /**< Is anything switched? */
svn_boolean_t modified; /**< Is anything modified? */
/** Whether any WC paths are at a depth other than #svn_depth_infinity.
/** Whether any WC paths are at a depth other than #svn_depth_infinity or
* are user excluded.
* @since New in 1.5.
*/
svn_boolean_t sparse_checkout;
@ -8020,7 +8231,17 @@ typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton,
/**
* ### TODO: Doc string, please.
* Beginning at @a local_abspath, crawl to @a depth to discover every path in
* or under @a local_abspath which belongs to one of the changelists in @a
* changelist_filter (an array of <tt>const char *</tt> changelist names).
* If @a changelist_filter is @c NULL, discover paths with any changelist.
* Call @a callback_func (with @a callback_baton) each time a
* changelist-having path is discovered.
*
* @a local_abspath is a local WC path.
*
* If @a cancel_func is not @c NULL, invoke it passing @a cancel_baton
* during the recursive walk.
*
* @since New in 1.7.
*/

View File

@ -0,0 +1,201 @@
/**
* @copyright
* ====================================================================
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
* ====================================================================
* @endcopyright
*
* @file svn_x509.h
* @brief Subversion's X509 parser
*/
#ifndef SVN_X509_H
#define SVN_X509_H
#include <apr_pools.h>
#include <apr_tables.h>
#include <apr_time.h>
#include "svn_error.h"
#include "svn_checksum.h"
#ifdef __cplusplus
extern "C" {
#endif
#define SVN_X509_OID_COMMON_NAME "\x55\x04\x03"
#define SVN_X509_OID_COUNTRY "\x55\x04\x06"
#define SVN_X509_OID_LOCALITY "\x55\x04\x07"
#define SVN_X509_OID_STATE "\x55\x04\x08"
#define SVN_X509_OID_ORGANIZATION "\x55\x04\x0A"
#define SVN_X509_OID_ORG_UNIT "\x55\x04\x0B"
#define SVN_X509_OID_EMAIL "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01"
/**
* Representation of parsed certificate info.
*
* @since New in 1.9.
*/
typedef struct svn_x509_certinfo_t svn_x509_certinfo_t;
/**
* Representation of an atttribute in an X.509 name (e.g. Subject or Issuer)
*
* @since New in 1.9.
*/
typedef struct svn_x509_name_attr_t svn_x509_name_attr_t;
/**
* Parse x509 @a der certificate data from @a buf with length @a
* buflen and return certificate information in @a *certinfo,
* allocated in @a result_pool.
*
* @note This function has been written with the intent of display data in a
* certificate for a user to see. As a result, it does not do much
* validation on the data it parses from the certificate. It does not
* for instance verify that the certificate is signed by the issuer. It
* does not verify a trust chain. It does not error on critical
* extensions it does not know how to parse. So while it can be used as
* part of a certificate validation scheme, it can't be used alone for
* that purpose.
*
* @since New in 1.9.
*/
svn_error_t *
svn_x509_parse_cert(svn_x509_certinfo_t **certinfo,
const char *buf,
apr_size_t buflen,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Returns a deep copy of the @a attr, allocated in @a result_pool.
* May use @a scratch_pool for temporary allocations.
* @since New in 1.9.
*/
svn_x509_name_attr_t *
svn_x509_name_attr_dup(const svn_x509_name_attr_t *attr,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Returns the OID of @a attr as encoded in the certificate. The
* length of the OID will be set in @a len.
* @since New in 1.9.
*/
const unsigned char *
svn_x509_name_attr_get_oid(const svn_x509_name_attr_t *attr, apr_size_t *len);
/**
* Returns the value of @a attr as a UTF-8 C string.
* @since New in 1.9.
*/
const char *
svn_x509_name_attr_get_value(const svn_x509_name_attr_t *attr);
/**
* Returns a deep copy of @a certinfo, allocated in @a result_pool.
* May use @a scratch_pool for temporary allocations.
* @since New in 1.9.
*/
svn_x509_certinfo_t *
svn_x509_certinfo_dup(const svn_x509_certinfo_t *certinfo,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/**
* Returns the subject DN from @a certinfo.
* @since New in 1.9.
*/
const char *
svn_x509_certinfo_get_subject(const svn_x509_certinfo_t *certinfo,
apr_pool_t *result_pool);
/**
* Returns a list of the attributes for the subject in the @a certinfo.
* Each member of the list is of type svn_x509_name_attr_t.
*
* @since New in 1.9.
*/
const apr_array_header_t *
svn_x509_certinfo_get_subject_attrs(const svn_x509_certinfo_t *certinfo);
/**
* Returns the cerficiate issuer DN from @a certinfo.
* @since New in 1.9.
*/
const char *
svn_x509_certinfo_get_issuer(const svn_x509_certinfo_t *certinfo,
apr_pool_t *result_pool);
/**
* Returns a list of the attributes for the issuer in the @a certinfo.
* Each member of the list is of type svn_x509_name_attr_t.
*
* @since New in 1.9.
*/
const apr_array_header_t *
svn_x509_certinfo_get_issuer_attrs(const svn_x509_certinfo_t *certinfo);
/**
* Returns the start of the certificate validity period from @a certinfo.
*
* @since New in 1.9.
*/
apr_time_t
svn_x509_certinfo_get_valid_from(const svn_x509_certinfo_t *certinfo);
/**
* Returns the end of the certificate validity period from @a certinfo.
*
* @since New in 1.9.
*/
const apr_time_t
svn_x509_certinfo_get_valid_to(const svn_x509_certinfo_t *certinfo);
/**
* Returns the digest (fingerprint) from @a certinfo
* @since New in 1.9.
*/
const svn_checksum_t *
svn_x509_certinfo_get_digest(const svn_x509_certinfo_t *certinfo);
/**
* Returns an array of (const char*) host names from @a certinfo.
*
* @since New in 1.9.
*/
const apr_array_header_t *
svn_x509_certinfo_get_hostnames(const svn_x509_certinfo_t *certinfo);
/**
* Given an @a oid return a null-terminated C string representation.
* For example an OID with the bytes "\x2A\x86\x48\x86\xF7\x0D\x01\x09\x01"
* would be converted to the string "1.2.840.113549.1.9.1". Returns
* NULL if the @oid can't be represented as a string.
*
* @since New in 1.9. */
const char *
svn_x509_oid_to_string(const unsigned char *oid, apr_size_t oid_len,
apr_pool_t *scratch_pool, apr_pool_t *result_pool);
#ifdef __cplusplus
}
#endif
#endif /* SVN_X509_H */

View File

@ -312,7 +312,7 @@ svn_xml_make_header(svn_stringbuf_t **str,
* If @a *str is @c NULL, set @a *str to a new stringbuf allocated
* in @a pool, else append to the existing stringbuf there.
*
* Take the tag's attributes from varargs, a NULL-terminated list of
* Take the tag's attributes from varargs, a SVN_VA_NULL-terminated list of
* alternating <tt>char *</tt> key and <tt>char *</tt> val. Do xml-escaping
* on each val.
*
@ -323,7 +323,7 @@ svn_xml_make_open_tag(svn_stringbuf_t **str,
apr_pool_t *pool,
enum svn_xml_open_tag_style style,
const char *tagname,
...);
...) SVN_NEEDS_SENTINEL_NULL;
/** Like svn_xml_make_open_tag(), but takes a @c va_list instead of being

View File

@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libsvn_auth_gnome_keyring
Description: Subversion GNOME Keyring Library
Version: @PACKAGE_VERSION@
Requires: apr-@SVN_APR_MAJOR_VERSION@ gnome-keyring-1
Requires.private: libsvn_subr
Libs: -L${libdir} -lsvn_auth_gnome_keyring
Cflags: -I${includedir}

View File

@ -47,6 +47,7 @@
#include "svn_auth.h"
#include "svn_config.h"
#include "svn_error.h"
#include "svn_hash.h"
#include "svn_io.h"
#include "svn_pools.h"
#include "svn_string.h"
@ -135,34 +136,36 @@ get_wid(void)
return wid;
}
/* Forward definition */
static apr_status_t
kwallet_terminate(void *data);
static KWallet::Wallet *
get_wallet(QString wallet_name,
apr_hash_t *parameters)
{
KWallet::Wallet *wallet =
static_cast<KWallet::Wallet *> (apr_hash_get(parameters,
"kwallet-wallet",
APR_HASH_KEY_STRING));
if (! wallet && ! apr_hash_get(parameters,
"kwallet-opening-failed",
APR_HASH_KEY_STRING))
static_cast<KWallet::Wallet *> (svn_hash_gets(parameters,
"kwallet-wallet"));
if (! wallet && ! svn_hash_gets(parameters, "kwallet-opening-failed"))
{
wallet = KWallet::Wallet::openWallet(wallet_name, get_wid(),
KWallet::Wallet::Synchronous);
}
if (wallet)
{
apr_hash_set(parameters,
"kwallet-wallet",
APR_HASH_KEY_STRING,
wallet);
}
else
{
apr_hash_set(parameters,
"kwallet-opening-failed",
APR_HASH_KEY_STRING,
"");
if (wallet)
{
svn_hash_sets(parameters, "kwallet-wallet", wallet);
apr_pool_cleanup_register(apr_hash_pool_get(parameters),
parameters, kwallet_terminate,
apr_pool_cleanup_null);
svn_hash_sets(parameters, "kwallet-initialized", "");
}
else
{
svn_hash_sets(parameters, "kwallet-opening-failed", "");
}
}
return wallet;
}
@ -171,14 +174,12 @@ static apr_status_t
kwallet_terminate(void *data)
{
apr_hash_t *parameters = static_cast<apr_hash_t *> (data);
if (apr_hash_get(parameters, "kwallet-initialized", APR_HASH_KEY_STRING))
if (svn_hash_gets(parameters, "kwallet-initialized"))
{
KWallet::Wallet *wallet = get_wallet(NULL, parameters);
delete wallet;
apr_hash_set(parameters,
"kwallet-initialized",
APR_HASH_KEY_STRING,
NULL);
svn_hash_sets(parameters, "kwallet-wallet", NULL);
svn_hash_sets(parameters, "kwallet-initialized", NULL);
}
return APR_SUCCESS;
}
@ -236,10 +237,6 @@ kwallet_password_get(svn_boolean_t *done,
KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
if (wallet)
{
apr_hash_set(parameters,
"kwallet-initialized",
APR_HASH_KEY_STRING,
"");
if (wallet->setFolder(folder))
{
QString q_password;
@ -254,9 +251,6 @@ kwallet_password_get(svn_boolean_t *done,
}
}
apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
apr_pool_cleanup_null);
return SVN_NO_ERROR;
}
@ -310,10 +304,6 @@ kwallet_password_set(svn_boolean_t *done,
KWallet::Wallet *wallet = get_wallet(wallet_name, parameters);
if (wallet)
{
apr_hash_set(parameters,
"kwallet-initialized",
APR_HASH_KEY_STRING,
"");
if (! wallet->hasFolder(folder))
{
wallet->createFolder(folder);
@ -329,9 +319,6 @@ kwallet_password_set(svn_boolean_t *done,
}
}
apr_pool_cleanup_register(pool, parameters, kwallet_terminate,
apr_pool_cleanup_null);
return SVN_NO_ERROR;
}

View File

@ -0,0 +1,12 @@
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
Name: libsvn_auth_kwallet
Description: Subversion KWallet Library
Version: @PACKAGE_VERSION@
Requires: apr-@SVN_APR_MAJOR_VERSION@
Requires.private: libsvn_subr
Libs: -L${libdir} -lsvn_auth_kwallet @SVN_KWALLET_LIBS@
Cflags: -I${includedir}

View File

@ -48,6 +48,7 @@
#include "private/svn_client_private.h"
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
#include "private/svn_sorts_private.h"
#include "private/svn_magic.h"
#include "svn_private_config.h"
@ -168,8 +169,8 @@ get_auto_props_for_pattern(apr_hash_t *properties,
hi != NULL;
hi = apr_hash_next(hi))
{
const char *propname = svn__apr_hash_index_key(hi);
const char *propval = svn__apr_hash_index_val(hi);
const char *propname = apr_hash_this_key(hi);
const char *propval = apr_hash_this_val(hi);
svn_string_t *propval_str =
svn_string_create_empty(apr_hash_pool_get(properties));
@ -206,8 +207,8 @@ svn_client__get_paths_auto_props(apr_hash_t **properties,
hi != NULL;
hi = apr_hash_next(hi))
{
const char *pattern = svn__apr_hash_index_key(hi);
apr_hash_t *propvals = svn__apr_hash_index_val(hi);
const char *pattern = apr_hash_this_key(hi);
apr_hash_t *propvals = apr_hash_this_val(hi);
get_auto_props_for_pattern(*properties, mimetype, &have_executable,
svn_dirent_basename(path, scratch_pool),
@ -316,7 +317,8 @@ add_file(const char *local_abspath,
}
/* Add the file */
SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, local_abspath, properties,
SVN_ERR(svn_wc_add_from_disk3(ctx->wc_ctx, local_abspath, properties,
FALSE /* skip checks */,
ctx->notify_func2, ctx->notify_baton2, pool));
return SVN_NO_ERROR;
@ -378,7 +380,8 @@ add_dir_recursive(const char *dir_abspath,
iterpool = svn_pool_create(scratch_pool);
/* Add this directory to revision control. */
err = svn_wc_add_from_disk2(ctx->wc_ctx, dir_abspath, NULL /*props*/,
err = svn_wc_add_from_disk3(ctx->wc_ctx, dir_abspath, NULL /*props*/,
FALSE /* skip checks */,
ctx->notify_func2, ctx->notify_baton2,
iterpool);
if (err)
@ -424,8 +427,8 @@ add_dir_recursive(const char *dir_abspath,
version control. */
for (hi = apr_hash_first(scratch_pool, dirents); hi; hi = apr_hash_next(hi))
{
const char *name = svn__apr_hash_index_key(hi);
svn_io_dirent2_t *dirent = svn__apr_hash_index_val(hi);
const char *name = apr_hash_this_key(hi);
svn_io_dirent2_t *dirent = apr_hash_this_val(hi);
const char *abspath;
svn_pool_clear(iterpool);
@ -704,15 +707,12 @@ svn_client__get_all_auto_props(apr_hash_t **autoprops,
for (i = 0; i < inherited_config_auto_props->nelts; i++)
{
apr_hash_index_t *hi;
svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
inherited_config_auto_props, i, svn_prop_inherited_item_t *);
const svn_string_t *propval =
svn_hash_gets(elt->prop_hash, SVN_PROP_INHERITABLE_AUTO_PROPS);
for (hi = apr_hash_first(scratch_pool, elt->prop_hash);
hi;
hi = apr_hash_next(hi))
{
const svn_string_t *propval = svn__apr_hash_index_val(hi);
const char *ch = propval->data;
svn_stringbuf_t *config_auto_prop_pattern;
svn_stringbuf_t *config_auto_prop_val;
@ -768,59 +768,6 @@ svn_client__get_all_auto_props(apr_hash_t **autoprops,
return SVN_NO_ERROR;
}
svn_error_t *svn_client__get_inherited_ignores(apr_array_header_t **ignores,
const char *path_or_url,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_opt_revision_t rev;
apr_hash_t *explicit_ignores;
apr_array_header_t *inherited_ignores;
svn_boolean_t target_is_url = svn_path_is_url(path_or_url);
svn_string_t *explicit_prop;
int i;
if (target_is_url)
rev.kind = svn_opt_revision_head;
else
rev.kind = svn_opt_revision_working;
SVN_ERR(svn_client_propget5(&explicit_ignores, &inherited_ignores,
SVN_PROP_INHERITABLE_IGNORES, path_or_url,
&rev, &rev, NULL, svn_depth_empty, NULL, ctx,
scratch_pool, scratch_pool));
explicit_prop = svn_hash_gets(explicit_ignores, path_or_url);
if (explicit_prop)
{
svn_prop_inherited_item_t *new_iprop =
apr_palloc(scratch_pool, sizeof(*new_iprop));
new_iprop->path_or_url = path_or_url;
new_iprop->prop_hash = apr_hash_make(scratch_pool);
svn_hash_sets(new_iprop->prop_hash, SVN_PROP_INHERITABLE_IGNORES,
explicit_prop);
APR_ARRAY_PUSH(inherited_ignores,
svn_prop_inherited_item_t *) = new_iprop;
}
*ignores = apr_array_make(result_pool, 16, sizeof(const char *));
for (i = 0; i < inherited_ignores->nelts; i++)
{
svn_prop_inherited_item_t *elt = APR_ARRAY_IDX(
inherited_ignores, i, svn_prop_inherited_item_t *);
svn_string_t *ignore_val = svn_hash_gets(elt->prop_hash,
SVN_PROP_INHERITABLE_IGNORES);
if (ignore_val)
svn_cstring_split_append(*ignores, ignore_val->data, "\n\r\t\v ",
FALSE, result_pool);
}
return SVN_NO_ERROR;
}
/* The main logic of the public svn_client_add5.
*
* EXISTING_PARENT_ABSPATH is the absolute path to the first existing
@ -841,7 +788,7 @@ add(const char *local_abspath,
svn_magic__cookie_t *magic_cookie;
apr_array_header_t *ignores = NULL;
svn_magic__init(&magic_cookie, scratch_pool);
SVN_ERR(svn_magic__init(&magic_cookie, ctx->config, scratch_pool));
if (existing_parent_abspath)
{
@ -876,8 +823,9 @@ add(const char *local_abspath,
parent_abspath, local_abspath);
SVN_ERR(svn_io_make_dir_recursively(parent_abspath, scratch_pool));
SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, parent_abspath,
SVN_ERR(svn_wc_add_from_disk3(ctx->wc_ctx, parent_abspath,
NULL /*props*/,
FALSE /* skip checks */,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
}
@ -1169,8 +1117,8 @@ mkdir_urls(const apr_array_header_t *urls,
}
}
}
qsort(targets->elts, targets->nelts, targets->elt_size,
svn_sort_compare_paths);
svn_sort__array(targets, svn_sort_compare_paths);
/* ### This reparent may be problematic in limited-authz-to-common-parent
### scenarios (compare issue #3242). See also issue #3649. */
@ -1228,53 +1176,58 @@ mkdir_urls(const apr_array_header_t *urls,
pool));
/* Call the path-based editor driver. */
err = svn_delta_path_driver2(editor, edit_baton, targets, TRUE,
path_driver_cb_func, (void *)editor, pool);
err = svn_error_trace(
svn_delta_path_driver2(editor, edit_baton, targets, TRUE,
path_driver_cb_func, (void *)editor, pool));
if (err)
{
/* At least try to abort the edit (and fs txn) before throwing err. */
return svn_error_compose_create(
err,
editor->abort_edit(edit_baton, pool));
svn_error_trace(editor->abort_edit(edit_baton, pool)));
}
if (ctx->notify_func2)
{
svn_wc_notify_t *notify;
notify = svn_wc_create_notify_url(common,
svn_wc_notify_commit_finalizing,
pool);
ctx->notify_func2(ctx->notify_baton2, notify, pool);
}
/* Close the edit. */
return editor->close_edit(edit_baton, pool);
return svn_error_trace(editor->close_edit(edit_baton, pool));
}
svn_error_t *
svn_client__make_local_parents(const char *path,
svn_client__make_local_parents(const char *local_abspath,
svn_boolean_t make_parents,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
apr_pool_t *scratch_pool)
{
svn_error_t *err;
svn_node_kind_t orig_kind;
SVN_ERR(svn_io_check_path(path, &orig_kind, pool));
SVN_ERR(svn_io_check_path(local_abspath, &orig_kind, scratch_pool));
if (make_parents)
SVN_ERR(svn_io_make_dir_recursively(path, pool));
SVN_ERR(svn_io_make_dir_recursively(local_abspath, scratch_pool));
else
SVN_ERR(svn_io_dir_make(path, APR_OS_DEFAULT, pool));
SVN_ERR(svn_io_dir_make(local_abspath, APR_OS_DEFAULT, scratch_pool));
/* Should no longer use svn_depth_empty to indicate that only the directory
itself is added, since it not only constraints the operation depth, but
also defines the depth of the target directory now. Moreover, the new
directory will have no children at all.*/
err = svn_client_add5(path, svn_depth_infinity, FALSE, FALSE, FALSE,
make_parents, ctx, pool);
err = svn_client_add5(local_abspath, svn_depth_empty, FALSE, FALSE, FALSE,
make_parents, ctx, scratch_pool);
/* If we created a new directory, but couldn't add it to version
control, then delete it. */
if (err && (orig_kind == svn_node_none))
{
/* ### If this returns an error, should we link it onto
err instead, so that the user is warned that we just
created an unversioned directory? */
svn_error_clear(svn_io_remove_dir2(path, FALSE, NULL, NULL, pool));
err = svn_error_compose_create(err,
svn_io_remove_dir2(local_abspath, FALSE,
NULL, NULL,
scratch_pool));
}
return svn_error_trace(err);
@ -1303,23 +1256,25 @@ svn_client_mkdir4(const apr_array_header_t *paths,
else
{
/* This is a regular "mkdir" + "svn add" */
apr_pool_t *subpool = svn_pool_create(pool);
apr_pool_t *iterpool = svn_pool_create(pool);
int i;
for (i = 0; i < paths->nelts; i++)
{
const char *path = APR_ARRAY_IDX(paths, i, const char *);
svn_pool_clear(subpool);
svn_pool_clear(iterpool);
/* See if the user wants us to stop. */
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
SVN_ERR(svn_dirent_get_absolute(&path, path, iterpool));
SVN_ERR(svn_client__make_local_parents(path, make_parents, ctx,
subpool));
iterpool));
}
svn_pool_destroy(subpool);
svn_pool_destroy(iterpool);
}
return SVN_NO_ERROR;

View File

@ -34,6 +34,7 @@
#include "svn_dirent_uri.h"
#include "svn_path.h"
#include "svn_props.h"
#include "svn_hash.h"
#include "svn_sorts.h"
#include "private/svn_wc_private.h"
@ -73,16 +74,16 @@ struct diff_baton {
const struct rev *rev;
};
/* The baton used for a file revision. */
/* The baton used for a file revision. Lives the entire operation */
struct file_rev_baton {
svn_revnum_t start_rev, end_rev;
svn_boolean_t backwards;
const char *target;
svn_client_ctx_t *ctx;
const svn_diff_file_options_t *diff_options;
/* name of file containing the previous revision of the file */
const char *last_filename;
struct rev *rev; /* the rev for which blame is being assigned
during a diff */
struct rev *last_rev; /* the rev of the last modification */
struct blame_chain *chain; /* the original blame chain. */
const char *repos_root_url; /* To construct a url */
apr_pool_t *mainpool; /* lives during the whole sequence of calls */
@ -91,22 +92,32 @@ struct file_rev_baton {
/* These are used for tracking merged revisions. */
svn_boolean_t include_merged_revisions;
svn_boolean_t merged_revision;
struct blame_chain *merged_chain; /* the merged blame chain. */
/* name of file containing the previous merged revision of the file */
const char *last_original_filename;
/* pools for files which may need to persist for more than one rev. */
apr_pool_t *filepool;
apr_pool_t *prevfilepool;
svn_boolean_t check_mime_type;
/* When blaming backwards we have to use the changes
on the *next* revision, as the interesting change
happens when we move to the previous revision */
svn_revnum_t last_revnum;
apr_hash_t *last_props;
};
/* The baton used by the txdelta window handler. */
/* The baton used by the txdelta window handler. Allocated per revision */
struct delta_baton {
/* Our underlying handler/baton that we wrap */
svn_txdelta_window_handler_t wrapped_handler;
void *wrapped_baton;
struct file_rev_baton *file_rev_baton;
svn_stream_t *source_stream; /* the delta source */
const char *filename;
svn_boolean_t is_merged_revision;
struct rev *rev; /* the rev struct for the current revision */
};
@ -280,6 +291,8 @@ add_file_blame(const char *last_file,
struct blame_chain *chain,
struct rev *rev,
const svn_diff_file_options_t *diff_options,
svn_cancel_func_t cancel_func,
void *cancel_baton,
apr_pool_t *pool)
{
if (!last_file)
@ -298,32 +311,28 @@ add_file_blame(const char *last_file,
/* We have a previous file. Get the diff and adjust blame info. */
SVN_ERR(svn_diff_file_diff_2(&diff, last_file, cur_file,
diff_options, pool));
SVN_ERR(svn_diff_output(diff, &diff_baton, &output_fns));
SVN_ERR(svn_diff_output2(diff, &diff_baton, &output_fns,
cancel_func, cancel_baton));
}
return SVN_NO_ERROR;
}
/* The delta window handler for the text delta between the previously seen
* revision and the revision currently being handled.
*
* Record the blame information for this revision in BATON->file_rev_baton.
*
* Implements svn_txdelta_window_handler_t.
/* Record the blame information for the revision in BATON->file_rev_baton.
*/
static svn_error_t *
window_handler(svn_txdelta_window_t *window, void *baton)
update_blame(void *baton)
{
struct delta_baton *dbaton = baton;
struct file_rev_baton *frb = dbaton->file_rev_baton;
struct blame_chain *chain;
/* Call the wrapped handler first. */
SVN_ERR(dbaton->wrapped_handler(window, dbaton->wrapped_baton));
/* We patiently wait for the NULL window marking the end. */
if (window)
return SVN_NO_ERROR;
/* Close the source file used for the delta.
It is important to do this early, since otherwise, they will be deleted
before all handles are closed, which leads to failures on some platforms
when new tempfiles are to be created. */
if (dbaton->source_stream)
SVN_ERR(svn_stream_close(dbaton->source_stream));
/* If we are including merged revisions, we need to add each rev to the
merged chain. */
@ -334,19 +343,23 @@ window_handler(svn_txdelta_window_t *window, void *baton)
/* Process this file. */
SVN_ERR(add_file_blame(frb->last_filename,
dbaton->filename, chain, frb->rev,
frb->diff_options, frb->currpool));
dbaton->filename, chain, dbaton->rev,
frb->diff_options,
frb->ctx->cancel_func, frb->ctx->cancel_baton,
frb->currpool));
/* If we are including merged revisions, and the current revision is not a
merged one, we need to add its blame info to the chain for the original
line of history. */
if (frb->include_merged_revisions && ! frb->merged_revision)
if (frb->include_merged_revisions && ! dbaton->is_merged_revision)
{
apr_pool_t *tmppool;
SVN_ERR(add_file_blame(frb->last_original_filename,
dbaton->filename, frb->chain, frb->rev,
frb->diff_options, frb->currpool));
dbaton->filename, frb->chain, dbaton->rev,
frb->diff_options,
frb->ctx->cancel_func, frb->ctx->cancel_baton,
frb->currpool));
/* This filename could be around for a while, potentially, so
use the longer lifetime pool, and switch it with the previous one*/
@ -374,6 +387,32 @@ window_handler(svn_txdelta_window_t *window, void *baton)
return SVN_NO_ERROR;
}
/* The delta window handler for the text delta between the previously seen
* revision and the revision currently being handled.
*
* Record the blame information for this revision in BATON->file_rev_baton.
*
* Implements svn_txdelta_window_handler_t.
*/
static svn_error_t *
window_handler(svn_txdelta_window_t *window, void *baton)
{
struct delta_baton *dbaton = baton;
/* Call the wrapped handler first. */
if (dbaton->wrapped_handler)
SVN_ERR(dbaton->wrapped_handler(window, dbaton->wrapped_baton));
/* We patiently wait for the NULL window marking the end. */
if (window)
return SVN_NO_ERROR;
/* Diff and update blame info. */
SVN_ERR(update_blame(baton));
return SVN_NO_ERROR;
}
/* Calculate and record blame information for one revision of the file,
* by comparing the file content against the previously seen revision.
@ -402,6 +441,26 @@ file_rev_handler(void *baton, const char *path, svn_revnum_t revnum,
/* Clear the current pool. */
svn_pool_clear(frb->currpool);
if (frb->check_mime_type)
{
apr_hash_t *props = svn_prop_array_to_hash(prop_diffs, frb->currpool);
const char *value;
frb->check_mime_type = FALSE; /* Only check first */
value = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
if (value && svn_mime_type_is_binary(value))
{
return svn_error_createf(
SVN_ERR_CLIENT_IS_BINARY_FILE, NULL,
_("Cannot calculate blame information for binary file '%s'"),
(svn_path_is_url(frb->target)
? frb->target
: svn_dirent_local_style(frb->target, pool)));
}
}
if (frb->ctx->notify_func2)
{
svn_wc_notify_t *notify
@ -422,72 +481,112 @@ file_rev_handler(void *baton, const char *path, svn_revnum_t revnum,
if (frb->ctx->cancel_func)
SVN_ERR(frb->ctx->cancel_func(frb->ctx->cancel_baton));
/* If there were no content changes, we couldn't care less about this
revision now. Note that we checked the mime type above, so things
work if the user just changes the mime type in a commit.
/* If there were no content changes and no (potential) merges, we couldn't
care less about this revision now. Note that we checked the mime type
above, so things work if the user just changes the mime type in a commit.
Also note that we don't switch the pools in this case. This is important,
since the tempfile will be removed by the pool and we need the tempfile
from the last revision with content changes. */
if (!content_delta_handler)
if (!content_delta_handler
&& (!frb->include_merged_revisions || merged_revision))
return SVN_NO_ERROR;
frb->merged_revision = merged_revision;
/* Create delta baton. */
delta_baton = apr_palloc(frb->currpool, sizeof(*delta_baton));
delta_baton = apr_pcalloc(frb->currpool, sizeof(*delta_baton));
/* Prepare the text delta window handler. */
if (frb->last_filename)
SVN_ERR(svn_stream_open_readonly(&last_stream, frb->last_filename,
SVN_ERR(svn_stream_open_readonly(&delta_baton->source_stream, frb->last_filename,
frb->currpool, pool));
else
last_stream = svn_stream_empty(frb->currpool);
/* Means empty stream below. */
delta_baton->source_stream = NULL;
last_stream = svn_stream_disown(delta_baton->source_stream, pool);
if (frb->include_merged_revisions && !frb->merged_revision)
if (frb->include_merged_revisions && !merged_revision)
filepool = frb->filepool;
else
filepool = frb->currpool;
SVN_ERR(svn_stream_open_unique(&cur_stream, &delta_baton->filename, NULL,
svn_io_file_del_on_pool_cleanup,
filepool, pool));
/* Get window handler for applying delta. */
svn_txdelta_apply(last_stream, cur_stream, NULL, NULL,
frb->currpool,
&delta_baton->wrapped_handler,
&delta_baton->wrapped_baton);
filepool, filepool));
/* Wrap the window handler with our own. */
delta_baton->file_rev_baton = frb;
*content_delta_handler = window_handler;
*content_delta_baton = delta_baton;
delta_baton->is_merged_revision = merged_revision;
/* Create the rev structure. */
frb->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
delta_baton->rev = apr_pcalloc(frb->mainpool, sizeof(struct rev));
if (revnum < frb->start_rev)
if (frb->backwards)
{
/* We shouldn't get more than one revision before the starting
revision (unless of including merged revisions). */
/* Use from last round...
SVN_INVALID_REVNUM on first, which is exactly
what we want */
delta_baton->rev->revision = frb->last_revnum;
delta_baton->rev->rev_props = frb->last_props;
/* Store for next delta */
if (revnum >= MIN(frb->start_rev, frb->end_rev))
{
frb->last_revnum = revnum;
frb->last_props = svn_prop_hash_dup(rev_props, frb->mainpool);
}
/* Else: Not needed on last rev */
}
else if (merged_revision
|| (revnum >= MIN(frb->start_rev, frb->end_rev)))
{
/* 1+ for the "youngest to oldest" blame */
SVN_ERR_ASSERT(revnum <= 1 + MAX(frb->end_rev, frb->start_rev));
/* Set values from revision props. */
delta_baton->rev->revision = revnum;
delta_baton->rev->rev_props = svn_prop_hash_dup(rev_props, frb->mainpool);
}
else
{
/* We shouldn't get more than one revision outside the
specified range (unless we alsoe receive merged revisions) */
SVN_ERR_ASSERT((frb->last_filename == NULL)
|| frb->include_merged_revisions);
/* The file existed before start_rev; generate no blame info for
lines from this revision (or before). */
frb->rev->revision = SVN_INVALID_REVNUM;
}
else
{
SVN_ERR_ASSERT(revnum <= frb->end_rev);
lines from this revision (or before).
/* Set values from revision props. */
frb->rev->revision = revnum;
frb->rev->rev_props = svn_prop_hash_dup(rev_props, frb->mainpool);
This revision specifies the state as it was at the start revision */
delta_baton->rev->revision = SVN_INVALID_REVNUM;
}
if (frb->include_merged_revisions)
frb->rev->path = apr_pstrdup(frb->mainpool, path);
delta_baton->rev->path = apr_pstrdup(frb->mainpool, path);
/* Keep last revision for postprocessing after all changes */
frb->last_rev = delta_baton->rev;
/* Handle all delta - even if it is empty.
We must do the latter to "merge" blame info from other branches. */
if (content_delta_handler)
{
/* Proper delta - get window handler for applying delta.
svn_ra_get_file_revs2 will drive the delta editor. */
svn_txdelta_apply(last_stream, cur_stream, NULL, NULL,
frb->currpool,
&delta_baton->wrapped_handler,
&delta_baton->wrapped_baton);
*content_delta_handler = window_handler;
*content_delta_baton = delta_baton;
}
else
{
/* Apply an empty delta, i.e. simply copy the old contents.
We can't simply use the existing file due to the pool rotation logic.
Trigger the blame update magic. */
SVN_ERR(svn_stream_copy3(last_stream, cur_stream, NULL, NULL, pool));
SVN_ERR(update_blame(delta_baton));
}
return SVN_NO_ERROR;
}
@ -572,7 +671,6 @@ svn_client_blame5(const char *target,
struct file_rev_baton frb;
svn_ra_session_t *ra_session;
svn_revnum_t start_revnum, end_revnum;
svn_client__pathrev_t *end_loc;
struct blame *walk, *walk_merged = NULL;
apr_pool_t *iterpool;
svn_stream_t *last_stream;
@ -590,44 +688,77 @@ svn_client_blame5(const char *target,
SVN_ERR(svn_dirent_get_absolute(&target_abspath_or_url, target, pool));
/* Get an RA plugin for this filesystem object. */
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &end_loc,
target, NULL, peg_revision, end,
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, NULL,
target, NULL, peg_revision,
peg_revision,
ctx, pool));
end_revnum = end_loc->rev;
SVN_ERR(svn_client__get_revision_number(&start_revnum, NULL, ctx->wc_ctx,
target_abspath_or_url, ra_session,
start, pool));
if (end_revnum < start_revnum)
return svn_error_create
(SVN_ERR_CLIENT_BAD_REVISION, NULL,
_("Start revision must precede end revision"));
SVN_ERR(svn_client__get_revision_number(&end_revnum, NULL, ctx->wc_ctx,
target_abspath_or_url, ra_session,
end, pool));
{
svn_client__pathrev_t *loc;
svn_opt_revision_t younger_end;
younger_end.kind = svn_opt_revision_number;
younger_end.value.number = MAX(start_revnum, end_revnum);
SVN_ERR(svn_client__resolve_rev_and_url(&loc, ra_session,
target, peg_revision,
&younger_end,
ctx, pool));
/* Make the session point to the real URL. */
SVN_ERR(svn_ra_reparent(ra_session, loc->url, pool));
}
/* We check the mime-type of the yougest revision before getting all
the older revisions. */
if (!ignore_mime_type)
if (!ignore_mime_type
&& start_revnum < end_revnum)
{
apr_hash_t *props;
apr_hash_index_t *hi;
const char *mime_type = NULL;
SVN_ERR(svn_client_propget5(&props, NULL, SVN_PROP_MIME_TYPE,
target_abspath_or_url, peg_revision,
end, NULL, svn_depth_empty, NULL, ctx,
pool, pool));
/* props could be keyed on URLs or paths depending on the
peg_revision and end values so avoid using the key. */
hi = apr_hash_first(pool, props);
if (hi)
if (svn_path_is_url(target)
|| start_revnum > end_revnum
|| (end->kind != svn_opt_revision_working
&& end->kind != svn_opt_revision_base))
{
svn_string_t *value;
SVN_ERR(svn_ra_get_file(ra_session, "", end_revnum, NULL, NULL,
&props, pool));
/* Should only be one value */
SVN_ERR_ASSERT(apr_hash_count(props) == 1);
mime_type = svn_prop_get_value(props, SVN_PROP_MIME_TYPE);
}
else
{
const svn_string_t *value;
value = svn__apr_hash_index_val(hi);
if (value && svn_mime_type_is_binary(value->data))
if (end->kind == svn_opt_revision_working)
SVN_ERR(svn_wc_prop_get2(&value, ctx->wc_ctx,
target_abspath_or_url,
SVN_PROP_MIME_TYPE,
pool, pool));
else
{
SVN_ERR(svn_wc_get_pristine_props(&props, ctx->wc_ctx,
target_abspath_or_url,
pool, pool));
value = props ? svn_hash_gets(props, SVN_PROP_MIME_TYPE)
: NULL;
}
mime_type = value ? value->data : NULL;
}
if (mime_type)
{
if (svn_mime_type_is_binary(mime_type))
return svn_error_createf
(SVN_ERR_CLIENT_IS_BINARY_FILE, 0,
_("Cannot calculate blame information for binary file '%s'"),
@ -643,6 +774,7 @@ svn_client_blame5(const char *target,
frb.diff_options = diff_options;
frb.include_merged_revisions = include_merged_revisions;
frb.last_filename = NULL;
frb.last_rev = NULL;
frb.last_original_filename = NULL;
frb.chain = apr_palloc(pool, sizeof(*frb.chain));
frb.chain->blame = NULL;
@ -655,6 +787,10 @@ svn_client_blame5(const char *target,
frb.merged_chain->avail = NULL;
frb.merged_chain->pool = pool;
}
frb.backwards = (frb.start_rev > frb.end_rev);
frb.last_revnum = SVN_INVALID_REVNUM;
frb.last_props = NULL;
frb.check_mime_type = (frb.backwards && !ignore_mime_type);
SVN_ERR(svn_ra_get_repos_root2(ra_session, &frb.repos_root_url, pool));
@ -675,8 +811,10 @@ svn_client_blame5(const char *target,
if available so that we can know what was actually changed in the start
revision. */
SVN_ERR(svn_ra_get_file_revs2(ra_session, "",
start_revnum - (start_revnum > 0 ? 1 : 0),
end_revnum, include_merged_revisions,
frb.backwards ? start_revnum
: MAX(0, start_revnum-1),
end_revnum,
include_merged_revisions,
file_rev_handler, &frb, pool));
if (end->kind == svn_opt_revision_working)
@ -732,7 +870,8 @@ svn_client_blame5(const char *target,
ctx->cancel_baton, pool));
SVN_ERR(add_file_blame(frb.last_filename, temppath, frb.chain, NULL,
frb.diff_options, pool));
frb.diff_options,
ctx->cancel_func, ctx->cancel_baton, pool));
frb.last_filename = temppath;
}
@ -762,7 +901,7 @@ svn_client_blame5(const char *target,
the most recently changed revision. ### Is this really what we want
to do here? Do the sematics of copy change? */
if (!frb.chain->blame)
frb.chain->blame = blame_create(frb.chain, frb.rev, 0);
frb.chain->blame = blame_create(frb.chain, frb.last_rev, 0);
normalize_blames(frb.chain, frb.merged_chain, pool);
walk_merged = frb.merged_chain->blame;

View File

@ -176,18 +176,21 @@ svn_client__get_normalized_stream(svn_stream_t **normal_stream,
}
svn_error_t *
svn_client_cat2(svn_stream_t *out,
svn_client_cat3(apr_hash_t **returned_props,
svn_stream_t *out,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_boolean_t expand_keywords,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
svn_ra_session_t *ra_session;
svn_client__pathrev_t *loc;
svn_string_t *eol_style;
svn_string_t *keywords;
apr_hash_t *props;
apr_hash_t *props = NULL;
const char *repos_root_url;
svn_stream_t *output = out;
svn_error_t *err;
@ -201,8 +204,6 @@ svn_client_cat2(svn_stream_t *out,
}
else
{
peg_revision = svn_cl__rev_default_to_head_or_working(peg_revision,
path_or_url);
revision = svn_cl__rev_default_to_peg(revision, peg_revision);
}
@ -213,32 +214,39 @@ svn_client_cat2(svn_stream_t *out,
const char *local_abspath;
svn_stream_t *normal_stream;
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url, pool));
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url,
scratch_pool));
SVN_ERR(svn_client__get_normalized_stream(&normal_stream, ctx->wc_ctx,
local_abspath, revision, TRUE, FALSE,
local_abspath, revision,
expand_keywords, FALSE,
ctx->cancel_func, ctx->cancel_baton,
pool, pool));
scratch_pool, scratch_pool));
/* We don't promise to close output, so disown it to ensure we don't. */
output = svn_stream_disown(output, pool);
output = svn_stream_disown(output, scratch_pool);
if (returned_props)
SVN_ERR(svn_wc_prop_list2(returned_props, ctx->wc_ctx, local_abspath,
result_pool, scratch_pool));
return svn_error_trace(svn_stream_copy3(normal_stream, output,
ctx->cancel_func,
ctx->cancel_baton, pool));
ctx->cancel_baton, scratch_pool));
}
/* Get an RA plugin for this filesystem object. */
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &loc,
path_or_url, NULL,
peg_revision,
revision, ctx, pool));
revision, ctx, scratch_pool));
/* Find the repos root URL */
SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, pool));
SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, scratch_pool));
/* Grab some properties we need to know in order to figure out if anything
special needs to be done with this file. */
err = svn_ra_get_file(ra_session, "", loc->rev, NULL, NULL, &props, pool);
err = svn_ra_get_file(ra_session, "", loc->rev, NULL, NULL, &props,
result_pool);
if (err)
{
if (err->apr_err == SVN_ERR_FS_NOT_FILE)
@ -272,7 +280,7 @@ svn_client_cat2(svn_stream_t *out,
}
if (keywords)
if (keywords && expand_keywords)
{
svn_string_t *cmt_rev, *cmt_date, *cmt_author;
apr_time_t when = 0;
@ -281,24 +289,45 @@ svn_client_cat2(svn_stream_t *out,
cmt_date = svn_hash_gets(props, SVN_PROP_ENTRY_COMMITTED_DATE);
cmt_author = svn_hash_gets(props, SVN_PROP_ENTRY_LAST_AUTHOR);
if (cmt_date)
SVN_ERR(svn_time_from_cstring(&when, cmt_date->data, pool));
SVN_ERR(svn_time_from_cstring(&when, cmt_date->data, scratch_pool));
SVN_ERR(svn_subst_build_keywords3(&kw, keywords->data,
cmt_rev->data, loc->url,
repos_root_url, when,
cmt_author ?
cmt_author->data : NULL,
pool));
scratch_pool));
}
else
kw = NULL;
/* Interject a translating stream */
output = svn_subst_stream_translated(svn_stream_disown(out, pool),
eol_str, FALSE, kw, TRUE, pool);
output = svn_subst_stream_translated(svn_stream_disown(out,
scratch_pool),
eol_str, FALSE, kw, TRUE,
scratch_pool);
}
SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev, output, NULL, NULL, pool));
if (returned_props)
{
/* filter entry and WC props */
apr_hash_index_t *hi;
const void *key;
apr_ssize_t klen;
for (hi = apr_hash_first(scratch_pool, props);
hi; hi = apr_hash_next(hi))
{
apr_hash_this(hi, &key, &klen, NULL);
if (!svn_wc_is_normal_prop(key))
apr_hash_set(props, key, klen, NULL);
}
*returned_props = props;
}
SVN_ERR(svn_ra_get_file(ra_session, "", loc->rev, output, NULL, NULL,
scratch_pool));
if (out != output)
/* Close the interjected stream */

View File

@ -67,6 +67,7 @@ initialize_area(const char *local_abspath,
svn_error_t *
svn_client__checkout_internal(svn_revnum_t *result_rev,
svn_boolean_t *timestamp_sleep,
const char *url,
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
@ -74,18 +75,16 @@ svn_client__checkout_internal(svn_revnum_t *result_rev,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
svn_boolean_t *timestamp_sleep,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
apr_pool_t *scratch_pool)
{
svn_node_kind_t kind;
apr_pool_t *session_pool = svn_pool_create(pool);
svn_ra_session_t *ra_session;
svn_client__pathrev_t *pathrev;
/* Sanity check. Without these, the checkout is meaningless. */
SVN_ERR_ASSERT(local_abspath != NULL);
SVN_ERR_ASSERT(svn_uri_is_canonical(url, pool));
SVN_ERR_ASSERT(svn_uri_is_canonical(url, scratch_pool));
SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
/* Fulfill the docstring promise of svn_client_checkout: */
@ -94,15 +93,38 @@ svn_client__checkout_internal(svn_revnum_t *result_rev,
&& (revision->kind != svn_opt_revision_head))
return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
/* Get the RA connection. */
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &pathrev,
url, NULL, peg_revision, revision,
ctx, session_pool));
/* Get the RA connection, if needed. */
if (ra_session)
{
svn_error_t *err = svn_ra_reparent(ra_session, url, scratch_pool);
pathrev = svn_client__pathrev_dup(pathrev, pool);
SVN_ERR(svn_ra_check_path(ra_session, "", pathrev->rev, &kind, pool));
if (err)
{
if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
{
svn_error_clear(err);
ra_session = NULL;
}
else
return svn_error_trace(err);
}
else
{
SVN_ERR(svn_client__resolve_rev_and_url(&pathrev,
ra_session, url,
peg_revision, revision,
ctx, scratch_pool));
}
}
svn_pool_destroy(session_pool);
if (!ra_session)
{
SVN_ERR(svn_client__ra_session_from_path2(&ra_session, &pathrev,
url, NULL, peg_revision,
revision, ctx, scratch_pool));
}
SVN_ERR(svn_ra_check_path(ra_session, "", pathrev->rev, &kind, scratch_pool));
if (kind == svn_node_none)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@ -112,31 +134,35 @@ svn_client__checkout_internal(svn_revnum_t *result_rev,
(SVN_ERR_UNSUPPORTED_FEATURE , NULL,
_("URL '%s' refers to a file, not a directory"), pathrev->url);
SVN_ERR(svn_io_check_path(local_abspath, &kind, pool));
SVN_ERR(svn_io_check_path(local_abspath, &kind, scratch_pool));
if (kind == svn_node_none)
{
/* Bootstrap: create an incomplete working-copy root dir. Its
entries file should only have an entry for THIS_DIR with a
URL, revnum, and an 'incomplete' flag. */
SVN_ERR(svn_io_make_dir_recursively(local_abspath, pool));
SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
SVN_ERR(svn_io_make_dir_recursively(local_abspath, scratch_pool));
SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx,
scratch_pool));
}
else if (kind == svn_node_dir)
{
int wc_format;
const char *entry_url;
SVN_ERR(svn_wc_check_wc2(&wc_format, ctx->wc_ctx, local_abspath, pool));
SVN_ERR(svn_wc_check_wc2(&wc_format, ctx->wc_ctx, local_abspath,
scratch_pool));
if (! wc_format)
{
SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx, pool));
SVN_ERR(initialize_area(local_abspath, pathrev, depth, ctx,
scratch_pool));
}
else
{
/* Get PATH's URL. */
SVN_ERR(svn_wc__node_get_url(&entry_url, ctx->wc_ctx, local_abspath,
pool, pool));
scratch_pool, scratch_pool));
/* If PATH's existing URL matches the incoming one, then
just update. This allows 'svn co' to restart an
@ -146,24 +172,25 @@ svn_client__checkout_internal(svn_revnum_t *result_rev,
SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
_("'%s' is already a working copy for a"
" different URL"),
svn_dirent_local_style(local_abspath, pool));
svn_dirent_local_style(local_abspath, scratch_pool));
}
}
else
{
return svn_error_createf(SVN_ERR_WC_NODE_KIND_CHANGE, NULL,
_("'%s' already exists and is not a directory"),
svn_dirent_local_style(local_abspath, pool));
svn_dirent_local_style(local_abspath,
scratch_pool));
}
/* Have update fix the incompleteness. */
SVN_ERR(svn_client__update_internal(result_rev, local_abspath,
revision, depth, TRUE,
SVN_ERR(svn_client__update_internal(result_rev, timestamp_sleep,
local_abspath, revision, depth, TRUE,
ignore_externals,
allow_unver_obstructions,
TRUE /* adds_as_modification */,
FALSE, FALSE,
timestamp_sleep, ctx, pool));
FALSE, FALSE, ra_session,
ctx, scratch_pool));
return SVN_NO_ERROR;
}
@ -186,10 +213,12 @@ svn_client_checkout3(svn_revnum_t *result_rev,
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
err = svn_client__checkout_internal(result_rev, URL, local_abspath,
err = svn_client__checkout_internal(result_rev, &sleep_here,
URL, local_abspath,
peg_revision, revision, depth,
ignore_externals,
allow_unver_obstructions, &sleep_here,
allow_unver_obstructions,
NULL /* ra_session */,
ctx, pool);
if (sleep_here)
svn_io_sleep_for_timestamps(local_abspath, pool);

View File

@ -32,32 +32,234 @@
#include "svn_client.h"
#include "svn_config.h"
#include "svn_dirent_uri.h"
#include "svn_hash.h"
#include "svn_path.h"
#include "svn_pools.h"
#include "client.h"
#include "svn_props.h"
#include "svn_private_config.h"
#include "private/svn_wc_private.h"
/*** Code. ***/
svn_error_t *
svn_client_cleanup(const char *path,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
struct cleanup_status_walk_baton
{
const char *local_abspath;
svn_error_t *err;
svn_boolean_t break_locks;
svn_boolean_t fix_timestamps;
svn_boolean_t clear_dav_cache;
svn_boolean_t vacuum_pristines;
svn_boolean_t remove_unversioned_items;
svn_boolean_t remove_ignored_items;
svn_boolean_t include_externals;
svn_client_ctx_t *ctx;
};
if (svn_path_is_url(path))
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
_("'%s' is not a local path"), path);
/* Forward declararion. */
static svn_error_t *
cleanup_status_walk(void *baton,
const char *local_abspath,
const svn_wc_status3_t *status,
apr_pool_t *scratch_pool);
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
static svn_error_t *
do_cleanup(const char *local_abspath,
svn_boolean_t break_locks,
svn_boolean_t fix_timestamps,
svn_boolean_t clear_dav_cache,
svn_boolean_t vacuum_pristines,
svn_boolean_t remove_unversioned_items,
svn_boolean_t remove_ignored_items,
svn_boolean_t include_externals,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
SVN_ERR(svn_wc_cleanup4(ctx->wc_ctx,
local_abspath,
break_locks,
fix_timestamps,
clear_dav_cache,
vacuum_pristines,
ctx->cancel_func, ctx->cancel_baton,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
err = svn_wc_cleanup3(ctx->wc_ctx, local_abspath, ctx->cancel_func,
ctx->cancel_baton, scratch_pool);
svn_io_sleep_for_timestamps(path, scratch_pool);
return svn_error_trace(err);
if (fix_timestamps)
svn_io_sleep_for_timestamps(local_abspath, scratch_pool);
if (remove_unversioned_items || remove_ignored_items || include_externals)
{
struct cleanup_status_walk_baton b;
apr_array_header_t *ignores;
b.break_locks = break_locks;
b.fix_timestamps = fix_timestamps;
b.clear_dav_cache = clear_dav_cache;
b.vacuum_pristines = vacuum_pristines;
b.remove_unversioned_items = remove_unversioned_items;
b.remove_ignored_items = remove_ignored_items;
b.include_externals = include_externals;
b.ctx = ctx;
SVN_ERR(svn_wc_get_default_ignores(&ignores, ctx->config, scratch_pool));
SVN_WC__CALL_WITH_WRITE_LOCK(
svn_wc_walk_status(ctx->wc_ctx, local_abspath,
svn_depth_infinity,
TRUE, /* get all */
remove_ignored_items,
TRUE, /* ignore textmods */
ignores,
cleanup_status_walk, &b,
ctx->cancel_func,
ctx->cancel_baton,
scratch_pool),
ctx->wc_ctx,
local_abspath,
FALSE /* lock_anchor */,
scratch_pool);
}
return SVN_NO_ERROR;
}
/* An implementation of svn_wc_status_func4_t. */
static svn_error_t *
cleanup_status_walk(void *baton,
const char *local_abspath,
const svn_wc_status3_t *status,
apr_pool_t *scratch_pool)
{
struct cleanup_status_walk_baton *b = baton;
svn_node_kind_t kind_on_disk;
svn_wc_notify_t *notify;
if (status->node_status == svn_wc_status_external && b->include_externals)
{
svn_error_t *err;
SVN_ERR(svn_io_check_path(local_abspath, &kind_on_disk, scratch_pool));
if (kind_on_disk == svn_node_dir)
{
if (b->ctx->notify_func2)
{
notify = svn_wc_create_notify(local_abspath,
svn_wc_notify_cleanup_external,
scratch_pool);
b->ctx->notify_func2(b->ctx->notify_baton2, notify,
scratch_pool);
}
err = do_cleanup(local_abspath,
b->break_locks,
b->fix_timestamps,
b->clear_dav_cache,
b->vacuum_pristines,
b->remove_unversioned_items,
b->remove_ignored_items,
TRUE /* include_externals */,
b->ctx, scratch_pool);
if (err && err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
{
svn_error_clear(err);
return SVN_NO_ERROR;
}
else
SVN_ERR(err);
}
return SVN_NO_ERROR;
}
if (status->node_status == svn_wc_status_ignored)
{
if (!b->remove_ignored_items)
return SVN_NO_ERROR;
}
else if (status->node_status == svn_wc_status_unversioned)
{
if (!b->remove_unversioned_items)
return SVN_NO_ERROR;
}
else
return SVN_NO_ERROR;
SVN_ERR(svn_io_check_path(local_abspath, &kind_on_disk, scratch_pool));
switch (kind_on_disk)
{
case svn_node_file:
case svn_node_symlink:
SVN_ERR(svn_io_remove_file2(local_abspath, FALSE, scratch_pool));
break;
case svn_node_dir:
SVN_ERR(svn_io_remove_dir2(local_abspath, FALSE,
b->ctx->cancel_func, b->ctx->cancel_baton,
scratch_pool));
break;
case svn_node_none:
default:
return SVN_NO_ERROR;
}
if (b->ctx->notify_func2)
{
notify = svn_wc_create_notify(local_abspath, svn_wc_notify_delete,
scratch_pool);
notify->kind = kind_on_disk;
b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool);
}
return SVN_NO_ERROR;
}
svn_error_t *
svn_client_cleanup2(const char *dir_abspath,
svn_boolean_t break_locks,
svn_boolean_t fix_recorded_timestamps,
svn_boolean_t clear_dav_cache,
svn_boolean_t vacuum_pristines,
svn_boolean_t include_externals,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
SVN_ERR(do_cleanup(dir_abspath,
break_locks,
fix_recorded_timestamps,
clear_dav_cache,
vacuum_pristines,
FALSE /* remove_unversioned_items */,
FALSE /* remove_ignored_items */,
include_externals,
ctx, scratch_pool));
return SVN_NO_ERROR;
}
svn_error_t *
svn_client_vacuum(const char *dir_abspath,
svn_boolean_t remove_unversioned_items,
svn_boolean_t remove_ignored_items,
svn_boolean_t fix_recorded_timestamps,
svn_boolean_t vacuum_pristines,
svn_boolean_t include_externals,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
SVN_ERR_ASSERT(svn_dirent_is_absolute(dir_abspath));
SVN_ERR(do_cleanup(dir_abspath,
FALSE /* break_locks */,
fix_recorded_timestamps,
FALSE /* clear_dav_cache */,
vacuum_pristines,
remove_unversioned_items,
remove_ignored_items,
include_externals,
ctx, scratch_pool));
return SVN_NO_ERROR;
}

View File

@ -45,60 +45,48 @@
extern "C" {
#endif /* __cplusplus */
/* Set *REVNUM to the revision number identified by REVISION.
If REVISION->kind is svn_opt_revision_number, just use
REVISION->value.number, ignoring LOCAL_ABSPATH and RA_SESSION.
/* Private client context.
*
* This is what is actually allocated by svn_client_create_context2(),
* which then returns the address of the public_ctx member. */
typedef struct svn_client__private_ctx_t
{
/* Reserved field, always zero, to detect misuse of the private
context as a public client context. */
apr_uint64_t magic_null;
Else if REVISION->kind is svn_opt_revision_committed,
svn_opt_revision_previous, or svn_opt_revision_base, or
svn_opt_revision_working, then the revision can be identified
purely based on the working copy's administrative information for
LOCAL_ABSPATH, so RA_SESSION is ignored. If LOCAL_ABSPATH is not
under revision control, return SVN_ERR_UNVERSIONED_RESOURCE, or if
LOCAL_ABSPATH is null, return SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED.
/* Reserved field, always set to a known magic number, to identify
this struct as the private client context. */
apr_uint64_t magic_id;
Else if REVISION->kind is svn_opt_revision_date or
svn_opt_revision_head, then RA_SESSION is used to retrieve the
revision from the repository (using REVISION->value.date in the
former case), and LOCAL_ABSPATH is ignored. If RA_SESSION is null,
return SVN_ERR_CLIENT_RA_ACCESS_REQUIRED.
/* Total number of bytes transferred over network across all RA sessions. */
apr_off_t total_progress;
Else if REVISION->kind is svn_opt_revision_unspecified, set
*REVNUM to SVN_INVALID_REVNUM.
/* The public context. */
svn_client_ctx_t public_ctx;
} svn_client__private_ctx_t;
If YOUNGEST_REV is non-NULL, it is an in/out parameter. If
*YOUNGEST_REV is valid, use it as the youngest revision in the
repository (regardless of reality) -- don't bother to lookup the
true value for HEAD, and don't return any value in *REVNUM greater
than *YOUNGEST_REV. If *YOUNGEST_REV is not valid, and a HEAD
lookup is required to populate *REVNUM, then also populate
*YOUNGEST_REV with the result. This is useful for making multiple
serialized calls to this function with a basically static view of
the repository, avoiding race conditions which could occur between
multiple invocations with HEAD lookup requests.
Else return SVN_ERR_CLIENT_BAD_REVISION.
Use SCRATCH_POOL for any temporary allocation. */
svn_error_t *
svn_client__get_revision_number(svn_revnum_t *revnum,
svn_revnum_t *youngest_rev,
svn_wc_context_t *wc_ctx,
const char *local_abspath,
svn_ra_session_t *ra_session,
const svn_opt_revision_t *revision,
apr_pool_t *scratch_pool);
/* Given a public client context CTX, return the private context
within which it is allocated. */
svn_client__private_ctx_t *
svn_client__get_private_ctx(svn_client_ctx_t *ctx);
/* Set *ORIGINAL_REPOS_RELPATH and *ORIGINAL_REVISION to the original location
that served as the source of the copy from which PATH_OR_URL at REVISION was
created, or NULL and SVN_INVALID_REVNUM (respectively) if PATH_OR_URL at
REVISION was not the result of a copy operation. */
REVISION was not the result of a copy operation.
If RA_SESSION is not NULL it is an existing session to the repository that
might be reparented temporarily to obtain the information.
*/
svn_error_t *
svn_client__get_copy_source(const char **original_repos_relpath,
svn_revnum_t *original_revision,
const char *path_or_url,
const svn_opt_revision_t *revision,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@ -212,7 +200,6 @@ svn_client__repos_location_segments(apr_array_header_t **segments,
See also svn_client__calc_youngest_common_ancestor() to find youngest
common ancestor for already fetched history-as-mergeinfo information.
See also svn_client__youngest_common_ancestor().
*/
svn_error_t *
svn_client__get_youngest_common_ancestor(svn_client__pathrev_t **ancestor_p,
@ -422,17 +409,6 @@ svn_error_t *svn_client__get_all_auto_props(apr_hash_t **autoprops,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Get a list of ignore patterns defined by the svn:global-ignores
properties set on, or inherited by, PATH_OR_URL. Store the collected
patterns as const char * elements in the array *IGNORES. Allocate
*IGNORES and its contents in RESULT_POOL. Use SCRATCH_POOL for
temporary allocations. */
svn_error_t *svn_client__get_inherited_ignores(apr_array_header_t **ignores,
const char *path_or_url,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* The main logic for client deletion from a working copy. Deletes PATH
from CTX->WC_CTX. If PATH (or any item below a directory PATH) is
modified the delete will fail and return an error unless FORCE or KEEP_LOCAL
@ -467,10 +443,10 @@ svn_client__wc_delete_many(const apr_array_header_t *targets,
apr_pool_t *pool);
/* Make PATH and add it to the working copy, optionally making all the
intermediate parent directories if MAKE_PARENTS is TRUE. */
/* Make LOCAL_ABSPATH and add it to the working copy, optionally making all
the intermediate parent directories if MAKE_PARENTS is TRUE. */
svn_error_t *
svn_client__make_local_parents(const char *path,
svn_client__make_local_parents(const char *local_abspath,
svn_boolean_t make_parents,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@ -519,10 +495,14 @@ svn_client__make_local_parents(const char *path,
(with depth=empty) any parent directories of the requested update
target which are missing from the working copy.
If RA_SESSION is NOT NULL, it may be used to avoid creating a new
session. The session may point to a different URL after returning.
NOTE: You may not specify both INNERUPDATE and MAKE_PARENTS as true.
*/
svn_error_t *
svn_client__update_internal(svn_revnum_t *result_rev,
svn_boolean_t *timestamp_sleep,
const char *local_abspath,
const svn_opt_revision_t *revision,
svn_depth_t depth,
@ -532,7 +512,7 @@ svn_client__update_internal(svn_revnum_t *result_rev,
svn_boolean_t adds_as_modification,
svn_boolean_t make_parents,
svn_boolean_t innerupdate,
svn_boolean_t *timestamp_sleep,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@ -548,11 +528,6 @@ svn_client__update_internal(svn_revnum_t *result_rev,
DEPTH must be a definite depth, not (e.g.) svn_depth_unknown.
RA_CACHE is a pointer to a cache of information for the URL at
REVISION based on the PEG_REVISION. Any information not in
*RA_CACHE is retrieved by a round-trip to the repository. RA_CACHE
may be NULL which indicates that no cache information is available.
If IGNORE_EXTERNALS is true, do no externals processing.
Set *TIMESTAMP_SLEEP to TRUE if a sleep is required; otherwise do not
@ -564,10 +539,12 @@ svn_client__update_internal(svn_revnum_t *result_rev,
the repos are tolerated; if FALSE, these obstructions cause the checkout
to fail.
If INNERCHECKOUT is true, no anchor check is performed on the target.
If RA_SESSION is NOT NULL, it may be used to avoid creating a new
session. The session may point to a different URL after returning.
*/
svn_error_t *
svn_client__checkout_internal(svn_revnum_t *result_rev,
svn_boolean_t *timestamp_sleep,
const char *URL,
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
@ -575,7 +552,7 @@ svn_client__checkout_internal(svn_revnum_t *result_rev,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
svn_boolean_t *timestamp_sleep,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@ -707,24 +684,28 @@ svn_client__get_diff_editor2(const svn_delta_editor_t **editor,
/*** Editor for diff summary ***/
/* Set *CALLBACKS and *CALLBACK_BATON to a set of diff callbacks that will
report a diff summary, i.e. only providing information about the changed
items without the text deltas.
/* Set *DIFF_PROCESSOR to a diff processor that will report a diff summary
to SUMMARIZE_FUNC.
TARGET is the target path, relative to the anchor, of the diff.
P_ROOT_RELPATH will return a pointer to a string that must be set to
the root of the operation before the processor is called.
ORIGINAL_PATH specifies the original path and will be used with
**ANCHOR_PATH to create paths as the user originally provided them
to the diff function.
SUMMARIZE_FUNC is called with SUMMARIZE_BATON as parameter by the
created callbacks for each changed item.
*/
svn_error_t *
svn_client__get_diff_summarize_callbacks(
svn_wc_diff_callbacks4_t **callbacks,
void **callback_baton,
const char *target,
svn_boolean_t reversed,
const svn_diff_tree_processor_t **diff_processor,
const char ***p_root_relpath,
svn_client_diff_summarize_func_t summarize_func,
void *summarize_baton,
apr_pool_t *pool);
const char *original_target,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* ---------------------------------------------------------------- */
@ -921,11 +902,6 @@ svn_client__get_copy_committables(svn_client__committables_t **committables,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* A qsort()-compatible sort routine for sorting an array of
svn_client_commit_item_t *'s by their URL member. */
int svn_client__sort_commit_item_urls(const void *a, const void *b);
/* Rewrite the COMMIT_ITEMS array to be sorted by URL. Also, discover
a common *BASE_URL for the items in the array, and rewrite those
items' URLs to be relative to that *BASE_URL.
@ -939,18 +915,6 @@ svn_client__condense_commit_items(const char **base_url,
apr_array_header_t *commit_items,
apr_pool_t *pool);
/* Like svn_ra_stat() on the ra session root, but with a compatibility
hack for pre-1.2 svnserve that don't support this api. */
svn_error_t *
svn_client__ra_stat_compatible(svn_ra_session_t *ra_session,
svn_revnum_t rev,
svn_dirent_t **dirent_p,
apr_uint32_t dirent_fields,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool);
/* Commit the items in the COMMIT_ITEMS array using EDITOR/EDIT_BATON
to describe the committed local mods. Prior to this call,
COMMIT_ITEMS should have been run through (and BASE_URL generated
@ -1016,6 +980,9 @@ svn_client__do_commit(const char *base_url,
change *TIMESTAMP_SLEEP. The output will be valid even if the function
returns an error.
If RA_SESSION is NOT NULL, it may be used to avoid creating a new
session. The session may point to a different URL after returning.
Use POOL for temporary allocation. */
svn_error_t *
svn_client__handle_externals(apr_hash_t *externals_new,
@ -1024,6 +991,7 @@ svn_client__handle_externals(apr_hash_t *externals_new,
const char *target_abspath,
svn_depth_t requested_depth,
svn_boolean_t *timestamp_sleep,
svn_ra_session_t *ra_session,
svn_client_ctx_t *ctx,
apr_pool_t *pool);
@ -1157,8 +1125,62 @@ svn_client__resolve_conflicts(svn_boolean_t *conflicts_remain,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool);
/* Produce a diff with depth DEPTH between two files or two directories at
* LEFT_ABSPATH1 and RIGHT_ABSPATH, using the provided diff callbacks to
* show changes in files. The files and directories involved may be part of
* a working copy or they may be unversioned. For versioned files, show
* property changes, too.
*
* If ANCHOR_ABSPATH is not null, set it to the anchor of the diff before
* the first processor call. (The anchor is LEFT_ABSPATH or an ancestor of it)
*/
svn_error_t *
svn_client__arbitrary_nodes_diff(const char **root_relpath,
svn_boolean_t *root_is_dir,
const char *left_abspath,
const char *right_abspath,
svn_depth_t depth,
const svn_diff_tree_processor_t *diff_processor,
svn_client_ctx_t *ctx,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
/* Helper for the remote case of svn_client_propget.
*
* If PROPS is not null, then get the value of property PROPNAME in
* REVNUM, using RA_SESSION. Store the value ('svn_string_t *') in
* PROPS, under the path key "TARGET_PREFIX/TARGET_RELATIVE"
* ('const char *').
*
* If INHERITED_PROPS is not null, then set *INHERITED_PROPS to a
* depth-first ordered array of svn_prop_inherited_item_t * structures
* representing the PROPNAME properties inherited by the target. If
* INHERITABLE_PROPS in not null and no inheritable properties are found,
* then set *INHERITED_PROPS to an empty array.
*
* Recurse according to DEPTH, similarly to svn_client_propget3().
*
* KIND is the kind of the node at "TARGET_PREFIX/TARGET_RELATIVE".
* Yes, caller passes this; it makes the recursion more efficient :-).
*
* Allocate PROPS and *INHERITED_PROPS in RESULT_POOL, but do all temporary
* work in SCRATCH_POOL. The two pools can be the same; recursive
* calls may use a different SCRATCH_POOL, however.
*/
svn_error_t *
svn_client__remote_propget(apr_hash_t *props,
apr_array_header_t **inherited_props,
const char *propname,
const char *target_prefix,
const char *target_relative,
svn_node_kind_t kind,
svn_revnum_t revnum,
svn_ra_session_t *ra_session,
svn_depth_t depth,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
#ifdef __cplusplus
}
#endif /* __cplusplus */

View File

@ -87,7 +87,7 @@ check_root_url_of_target(const char **root_url,
if ((err->apr_err == SVN_ERR_ENTRY_NOT_FOUND)
|| (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
|| (err->apr_err == SVN_ERR_WC_NOT_WORKING_COPY)
|| (err->apr_err == SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED)
|| (err->apr_err == SVN_ERR_RA_CANNOT_CREATE_SESSION)
|| (err->apr_err == SVN_ERR_CLIENT_BAD_REVISION))
{
svn_error_clear(err);
@ -200,6 +200,15 @@ svn_client_args_to_target_array2(apr_array_header_t **targets_p,
SVN_ERR(svn_opt__split_arg_at_peg_revision(&true_target, &peg_rev,
utf8_target, pool));
/* Reject the form "@abc", a peg specifier with no path. */
if (true_target[0] == '\0' && peg_rev[0] != '\0')
{
return svn_error_createf(SVN_ERR_BAD_FILENAME, NULL,
_("'%s' is just a peg revision. "
"Maybe try '%s@' instead?"),
utf8_target, utf8_target);
}
/* URLs and wc-paths get treated differently. */
if (svn_path_is_url(true_target))
{
@ -278,7 +287,7 @@ svn_client_args_to_target_array2(apr_array_header_t **targets_p,
}
}
target = apr_pstrcat(pool, true_target, peg_rev, (char *)NULL);
target = apr_pstrcat(pool, true_target, peg_rev, SVN_VA_NULL);
if (rel_url_found)
{
@ -338,7 +347,7 @@ svn_client_args_to_target_array2(apr_array_header_t **targets_p,
SVN_ERR(svn_opt__arg_canonicalize_url(&true_target, abs_target,
pool));
target = apr_pstrcat(pool, true_target, peg_rev, (char *)NULL);
target = apr_pstrcat(pool, true_target, peg_rev, SVN_VA_NULL);
}
APR_ARRAY_PUSH(*targets_p, const char *) = target;

View File

@ -45,6 +45,7 @@
#include "client.h"
#include "private/svn_wc_private.h"
#include "private/svn_ra_private.h"
#include "private/svn_sorts_private.h"
#include "svn_private_config.h"
@ -110,7 +111,8 @@ get_ra_editor(const svn_delta_editor_t **editor,
continue;
svn_pool_clear(iterpool);
SVN_ERR(svn_wc__node_get_origin(NULL, NULL, &relpath, NULL, NULL, NULL,
SVN_ERR(svn_wc__node_get_origin(NULL, NULL, &relpath, NULL, NULL,
NULL, NULL,
ctx->wc_ctx, item->path, FALSE, pool,
iterpool));
if (relpath)
@ -203,8 +205,8 @@ collect_lock_tokens(apr_hash_t **result,
for (hi = apr_hash_first(pool, all_tokens); hi; hi = apr_hash_next(hi))
{
const char *url = svn__apr_hash_index_key(hi);
const char *token = svn__apr_hash_index_val(hi);
const char *url = apr_hash_this_key(hi);
const char *token = apr_hash_this_val(hi);
const char *relpath = svn_uri_skip_ancestor(base_url, url, pool);
if (relpath)
@ -238,91 +240,30 @@ post_process_commit_item(svn_wc_committed_queue_t *queue,
loop_recurse = TRUE;
remove_lock = (! keep_locks && (item->state_flags
& SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN));
& (SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN
| SVN_CLIENT_COMMIT_ITEM_ADD
| SVN_CLIENT_COMMIT_ITEM_DELETE)));
/* When the node was deleted (or replaced), we need to always remove the
locks, as they're invalidated on the server. We cannot honor the
/* When the node was deleted (or replaced), we need to always remove the
locks, as they're invalidated on the server. We cannot honor the
SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN flag here because it does not tell
us whether we have locked children. */
if (item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE)
remove_lock = TRUE;
return svn_wc_queue_committed3(queue, wc_ctx, item->path,
loop_recurse, item->incoming_prop_changes,
return svn_error_trace(
svn_wc_queue_committed4(queue, wc_ctx, item->path,
loop_recurse,
0 != (item->state_flags &
(SVN_CLIENT_COMMIT_ITEM_ADD
| SVN_CLIENT_COMMIT_ITEM_DELETE
| SVN_CLIENT_COMMIT_ITEM_TEXT_MODS
| SVN_CLIENT_COMMIT_ITEM_PROP_MODS)),
item->incoming_prop_changes,
remove_lock, !keep_changelists,
sha1_checksum, scratch_pool);
sha1_checksum, scratch_pool));
}
static svn_error_t *
check_nonrecursive_dir_delete(svn_wc_context_t *wc_ctx,
const char *target_abspath,
svn_depth_t depth,
apr_pool_t *scratch_pool)
{
svn_node_kind_t kind;
SVN_ERR_ASSERT(depth != svn_depth_infinity);
SVN_ERR(svn_wc_read_kind2(&kind, wc_ctx, target_abspath,
TRUE, FALSE, scratch_pool));
/* ### TODO(sd): This check is slightly too strict. It should be
### possible to:
###
### * delete a directory containing only files when
### depth==svn_depth_files;
###
### * delete a directory containing only files and empty
### subdirs when depth==svn_depth_immediates.
###
### But for now, we insist on svn_depth_infinity if you're
### going to delete a directory, because we're lazy and
### trying to get depthy commits working in the first place.
###
### This would be fairly easy to fix, though: just, well,
### check the above conditions!
###
### GJS: I think there may be some confusion here. there is
### the depth of the commit, and the depth of a checked-out
### directory in the working copy. Delete, by its nature, will
### always delete all of its children, so it seems a bit
### strange to worry about what is in the working copy.
*/
if (kind == svn_node_dir)
{
svn_wc_schedule_t schedule;
/* ### Looking at schedule is probably enough, no need for
pristine compare etc. */
SVN_ERR(svn_wc__node_get_schedule(&schedule, NULL,
wc_ctx, target_abspath,
scratch_pool));
if (schedule == svn_wc_schedule_delete
|| schedule == svn_wc_schedule_replace)
{
const apr_array_header_t *children;
SVN_ERR(svn_wc__node_get_children(&children, wc_ctx,
target_abspath, TRUE,
scratch_pool, scratch_pool));
if (children->nelts > 0)
return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
_("Cannot delete the directory '%s' "
"in a non-recursive commit "
"because it has children"),
svn_dirent_local_style(target_abspath,
scratch_pool));
}
}
return SVN_NO_ERROR;
}
/* Given a list of committables described by their common base abspath
BASE_ABSPATH and a list of relative dirents TARGET_RELPATHS determine
which absolute paths must be locked to commit all these targets and
@ -393,8 +334,8 @@ determine_lock_targets(apr_array_header_t **lock_targets,
hi = apr_hash_next(hi))
{
const char *common;
const char *wcroot_abspath = svn__apr_hash_index_key(hi);
apr_array_header_t *wc_targets = svn__apr_hash_index_val(hi);
const char *wcroot_abspath = apr_hash_this_key(hi);
apr_array_header_t *wc_targets = apr_hash_this_val(hi);
svn_pool_clear(iterpool);
@ -420,8 +361,7 @@ determine_lock_targets(apr_array_header_t **lock_targets,
SVN_ERR(svn_dirent_condense_targets(&common, &wc_targets, wc_targets,
FALSE, iterpool, iterpool));
qsort(wc_targets->elts, wc_targets->nelts, wc_targets->elt_size,
svn_sort_compare_paths);
svn_sort__array(wc_targets, svn_sort_compare_paths);
if (wc_targets->nelts == 0
|| !svn_path_is_empty(APR_ARRAY_IDX(wc_targets, 0, const char*))
@ -599,6 +539,7 @@ svn_client_commit6(const apr_array_header_t *targets,
const char *current_abspath;
const char *notify_prefix;
int depth_empty_after = -1;
apr_hash_t *move_youngest = NULL;
int i;
SVN_ERR_ASSERT(depth != svn_depth_unknown && depth != svn_depth_exclude);
@ -673,26 +614,6 @@ svn_client_commit6(const apr_array_header_t *targets,
base_abspath,
pool);
/* If a non-recursive commit is desired, do not allow a deleted directory
as one of the targets. */
if (depth != svn_depth_infinity && ! commit_as_operations)
for (i = 0; i < rel_targets->nelts; i++)
{
const char *relpath = APR_ARRAY_IDX(rel_targets, i, const char *);
const char *target_abspath;
svn_pool_clear(iterpool);
target_abspath = svn_dirent_join(base_abspath, relpath, iterpool);
cmt_err = svn_error_trace(
check_nonrecursive_dir_delete(ctx->wc_ctx, target_abspath,
depth, iterpool));
if (cmt_err)
goto cleanup;
}
/* Crawl the working copy for commit items. */
{
struct check_url_kind_baton cukb;
@ -741,7 +662,7 @@ svn_client_commit6(const apr_array_header_t *targets,
apr_hash_index_t *hi = apr_hash_first(iterpool,
committables->by_repository);
commit_items = svn__apr_hash_index_val(hi);
commit_items = apr_hash_this_val(hi);
}
/* If our array of targets contains only locks (and no actual file
@ -789,62 +710,12 @@ svn_client_commit6(const apr_array_header_t *targets,
if (cmt_err)
goto cleanup;
if (moved_from_abspath && delete_op_root_abspath &&
strcmp(moved_from_abspath, delete_op_root_abspath) == 0)
if (moved_from_abspath && delete_op_root_abspath)
{
svn_boolean_t found_delete_half =
(svn_hash_gets(committables->by_path, delete_op_root_abspath)
!= NULL);
svn_client_commit_item3_t *delete_half =
svn_hash_gets(committables->by_path, delete_op_root_abspath);
if (!found_delete_half)
{
const char *delete_half_parent_abspath;
/* The delete-half isn't in the commit target list.
* However, it might itself be the child of a deleted node,
* either because of another move or a deletion.
*
* For example, consider: mv A/B B; mv B/C C; commit;
* C's moved-from A/B/C is a child of the deleted A/B.
* A/B/C does not appear in the commit target list, but
* A/B does appear.
* (Note that moved-from information is always stored
* relative to the BASE tree, so we have 'C moved-from
* A/B/C', not 'C moved-from B/C'.)
*
* An example involving a move and a delete would be:
* mv A/B C; rm A; commit;
* Now C is moved-from A/B which does not appear in the
* commit target list, but A does appear.
*/
/* Scan upwards for a deletion op-root from the
* delete-half's parent directory. */
delete_half_parent_abspath =
svn_dirent_dirname(delete_op_root_abspath, iterpool);
if (strcmp(delete_op_root_abspath,
delete_half_parent_abspath) != 0)
{
const char *parent_delete_op_root_abspath;
cmt_err = svn_error_trace(
svn_wc__node_get_deleted_ancestor(
&parent_delete_op_root_abspath,
ctx->wc_ctx, delete_half_parent_abspath,
iterpool, iterpool));
if (cmt_err)
goto cleanup;
if (parent_delete_op_root_abspath)
found_delete_half =
(svn_hash_gets(committables->by_path,
parent_delete_op_root_abspath)
!= NULL);
}
}
if (!found_delete_half)
if (!delete_half)
{
cmt_err = svn_error_createf(
SVN_ERR_ILLEGAL_TARGET, NULL,
@ -854,8 +725,32 @@ svn_client_commit6(const apr_array_header_t *targets,
svn_dirent_local_style(item->path, iterpool),
svn_dirent_local_style(delete_op_root_abspath,
iterpool));
if (ctx->notify_func2)
{
svn_wc_notify_t *notify;
notify = svn_wc_create_notify(
delete_op_root_abspath,
svn_wc_notify_failed_requires_target,
iterpool);
notify->err = cmt_err;
ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
}
goto cleanup;
}
else if (delete_half->revision == item->copyfrom_rev)
{
/* Ok, now we know that we perform an out-of-date check
on the copyfrom location. Remember this for a fixup
round right before committing. */
if (!move_youngest)
move_youngest = apr_hash_make(pool);
svn_hash_sets(move_youngest, item->path, item);
}
}
}
@ -885,6 +780,19 @@ svn_client_commit6(const apr_array_header_t *targets,
svn_dirent_local_style(item->path, iterpool),
svn_dirent_local_style(copy_op_root_abspath,
iterpool));
if (ctx->notify_func2)
{
svn_wc_notify_t *notify;
notify = svn_wc_create_notify(
copy_op_root_abspath,
svn_wc_notify_failed_requires_target,
iterpool);
notify->err = cmt_err;
ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
}
goto cleanup;
}
}
@ -941,6 +849,37 @@ svn_client_commit6(const apr_array_header_t *targets,
if (cmt_err)
goto cleanup;
if (move_youngest != NULL)
{
apr_hash_index_t *hi;
svn_revnum_t youngest;
SVN_ERR(svn_ra_get_latest_revnum(ra_session, &youngest, pool));
for (hi = apr_hash_first(iterpool, move_youngest);
hi;
hi = apr_hash_next(hi))
{
svn_client_commit_item3_t *item = apr_hash_this_val(hi);
/* We delete the original side with its original revision and will
receive an out-of-date error if that node changed since that
revision.
The copy is of that same revision and we know that this revision
didn't change between this revision and youngest. So we can just
as well commit a copy from youngest.
Note that it is still possible to see gaps between the delete and
copy revisions as the repository might handle multiple commits
at the same time (or when an out of date proxy is involved), but
in general it should decrease the number of gaps. */
if (item->copyfrom_rev < youngest)
item->copyfrom_rev = youngest;
}
}
cmt_err = svn_error_trace(
get_ra_editor(&editor, &edit_baton, ra_session, ctx,
log_msg, commit_items, revprop_table,
@ -996,6 +935,9 @@ svn_client_commit6(const apr_array_header_t *targets,
commit_info->author,
ctx->cancel_func, ctx->cancel_baton,
iterpool);
if (bump_err)
goto cleanup;
}
cleanup:
@ -1004,16 +946,16 @@ svn_client_commit6(const apr_array_header_t *targets,
working copies. */
if (timestamp_sleep)
{
const char *wcroot_abspath;
svn_error_t *err = svn_wc__get_wcroot(&wcroot_abspath, ctx->wc_ctx,
const char *sleep_abspath;
svn_error_t *err = svn_wc__get_wcroot(&sleep_abspath, ctx->wc_ctx,
base_abspath, pool, pool);
if (err)
{
svn_error_clear(err);
wcroot_abspath = NULL;
sleep_abspath = base_abspath;
}
svn_io_sleep_for_timestamps(wcroot_abspath, pool);
svn_io_sleep_for_timestamps(sleep_abspath, pool);
}
/* Abort the commit if it is still in progress. */

View File

@ -40,11 +40,11 @@
#include "svn_hash.h"
#include <assert.h>
#include <stdlib.h> /* for qsort() */
#include "svn_private_config.h"
#include "private/svn_wc_private.h"
#include "private/svn_client_private.h"
#include "private/svn_sorts_private.h"
/*** Uncomment this to turn on commit driver debugging. ***/
/*
@ -62,10 +62,12 @@ fixup_commit_error(const char *local_abspath,
apr_pool_t *scratch_pool)
{
if (err->apr_err == SVN_ERR_FS_NOT_FOUND
|| err->apr_err == SVN_ERR_FS_CONFLICT
|| err->apr_err == SVN_ERR_FS_ALREADY_EXISTS
|| err->apr_err == SVN_ERR_FS_TXN_OUT_OF_DATE
|| err->apr_err == SVN_ERR_RA_DAV_PATH_NOT_FOUND
|| err->apr_err == SVN_ERR_RA_DAV_ALREADY_EXISTS
|| err->apr_err == SVN_ERR_RA_DAV_PRECONDITION_FAILED
|| svn_error_find_cause(err, SVN_ERR_RA_OUT_OF_DATE))
{
if (ctx->notify_func2)
@ -102,6 +104,7 @@ fixup_commit_error(const char *local_abspath,
}
else if (svn_error_find_cause(err, SVN_ERR_FS_NO_LOCK_TOKEN)
|| err->apr_err == SVN_ERR_FS_LOCK_OWNER_MISMATCH
|| err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN
|| err->apr_err == SVN_ERR_RA_NOT_LOCKED)
{
if (ctx->notify_func2)
@ -464,10 +467,12 @@ harvest_not_present_for_copy(svn_wc_context_t *wc_ctx,
apr_pool_t *iterpool = svn_pool_create(scratch_pool);
int i;
SVN_ERR_ASSERT(commit_relpath != NULL);
/* A function to retrieve not present children would be nice to have */
SVN_ERR(svn_wc__node_get_children_of_working_node(
&children, wc_ctx, local_abspath, TRUE,
scratch_pool, iterpool));
SVN_ERR(svn_wc__node_get_not_present_children(&children, wc_ctx,
local_abspath,
scratch_pool, iterpool));
for (i = 0; i < children->nelts; i++)
{
@ -483,13 +488,10 @@ harvest_not_present_for_copy(svn_wc_context_t *wc_ctx,
this_abspath, FALSE, scratch_pool));
if (!not_present)
continue;
continue; /* Node is replaced */
if (commit_relpath == NULL)
this_commit_relpath = NULL;
else
this_commit_relpath = svn_relpath_join(commit_relpath, name,
iterpool);
this_commit_relpath = svn_relpath_join(commit_relpath, name,
iterpool);
/* We should check if we should really add a delete operation */
if (check_url_func)
@ -502,7 +504,7 @@ harvest_not_present_for_copy(svn_wc_context_t *wc_ctx,
/* Determine from what parent we would be the deleted child */
SVN_ERR(svn_wc__node_get_origin(
NULL, &parent_rev, &parent_repos_relpath,
&parent_repos_root_url, NULL, NULL,
&parent_repos_root_url, NULL, NULL, NULL,
wc_ctx,
svn_dirent_dirname(this_abspath,
scratch_pool),
@ -768,13 +770,14 @@ harvest_status_callback(void *status_baton,
&& !(state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE))
{
svn_revnum_t dir_rev = SVN_INVALID_REVNUM;
const char *dir_repos_relpath = NULL;
if (!copy_mode_root && !status->switched && !is_added)
SVN_ERR(svn_wc__node_get_base(NULL, &dir_rev, NULL, NULL, NULL, NULL,
if (!copy_mode_root && !is_added)
SVN_ERR(svn_wc__node_get_base(NULL, &dir_rev, &dir_repos_relpath, NULL,
NULL, NULL,
wc_ctx, svn_dirent_dirname(local_abspath,
scratch_pool),
FALSE /* ignore_enoent */,
FALSE /* show_hidden */,
scratch_pool, scratch_pool));
if (copy_mode_root || status->switched || node_rev != dir_rev)
@ -794,6 +797,25 @@ harvest_status_callback(void *status_baton,
cf_rev = status->revision;
cf_relpath = status->repos_relpath;
}
if (!copy_mode_root && !is_added && baton->check_url_func
&& dir_repos_relpath)
{
svn_node_kind_t me_kind;
/* Maybe we need to issue an delete (mixed rev/switched) */
SVN_ERR(baton->check_url_func(
baton->check_url_baton, &me_kind,
svn_path_url_add_component2(repos_root_url,
svn_relpath_join(dir_repos_relpath,
svn_dirent_basename(local_abspath,
NULL),
scratch_pool),
scratch_pool),
dir_rev, scratch_pool));
if (me_kind != svn_node_none)
state_flags |= SVN_CLIENT_COMMIT_ITEM_DELETE;
}
}
}
@ -919,7 +941,7 @@ harvest_status_callback(void *status_baton,
* directory. In either case, we require the op-root of the parent
* to be part of the commit. See issue #4059. */
SVN_ERR(svn_wc__node_get_origin(&parent_is_copy, NULL, NULL, NULL,
NULL, &copy_root_abspath,
NULL, NULL, &copy_root_abspath,
wc_ctx, parent_abspath,
FALSE, scratch_pool, scratch_pool));
@ -1233,13 +1255,13 @@ svn_client__harvest_committables(svn_client__committables_t **committables,
/* Make sure that every path in danglers is part of the commit. */
for (hi = apr_hash_first(scratch_pool, danglers); hi; hi = apr_hash_next(hi))
{
const char *dangling_parent = svn__apr_hash_index_key(hi);
const char *dangling_parent = apr_hash_this_key(hi);
svn_pool_clear(iterpool);
if (! look_up_committable(*committables, dangling_parent, iterpool))
{
const char *dangling_child = svn__apr_hash_index_val(hi);
const char *dangling_child = apr_hash_this_val(hi);
if (ctx->notify_func2 != NULL)
{
@ -1357,7 +1379,10 @@ svn_client__get_copy_committables(svn_client__committables_t **committables,
}
int svn_client__sort_commit_item_urls(const void *a, const void *b)
/* A svn_sort__array()/qsort()-compatible sort routine for sorting
an array of svn_client_commit_item_t *'s by their URL member. */
static int
sort_commit_item_urls(const void *a, const void *b)
{
const svn_client_commit_item3_t *item1
= *((const svn_client_commit_item3_t * const *) a);
@ -1381,8 +1406,7 @@ svn_client__condense_commit_items(const char **base_url,
SVN_ERR_ASSERT(ci && ci->nelts);
/* Sort our commit items by their URLs. */
qsort(ci->elts, ci->nelts,
ci->elt_size, svn_client__sort_commit_item_urls);
svn_sort__array(ci, sort_commit_item_urls);
/* Loop through the URLs, finding the longest usable ancestor common
to all of them, and making sure there are no duplicate URLs. */
@ -1470,6 +1494,7 @@ struct file_mod_t
{
const svn_client_commit_item3_t *item;
void *file_baton;
apr_pool_t *file_pool;
};
@ -1535,6 +1560,9 @@ do_item_commit(void **dir_baton,
else
file_pool = pool;
/* Subpools are cheap, but memory isn't */
file_pool = svn_pool_create(file_pool);
/* Call the cancellation function. */
if (ctx->cancel_func)
SVN_ERR(ctx->cancel_func(ctx->cancel_baton));
@ -1618,11 +1646,12 @@ do_item_commit(void **dir_baton,
else
notify = NULL;
if (notify)
{
notify->kind = item->kind;
notify->path_prefix = icb->notify_path_prefix;
(*ctx->notify_func2)(ctx->notify_baton2, notify, pool);
ctx->notify_func2(ctx->notify_baton2, notify, pool);
}
}
@ -1783,6 +1812,7 @@ do_item_commit(void **dir_baton,
/* Add this file mod to the FILE_MODS hash. */
mod->item = item;
mod->file_baton = file_baton;
mod->file_pool = file_pool;
svn_hash_sets(file_mods, item->session_relpath, mod);
}
else if (file_baton)
@ -1790,7 +1820,7 @@ do_item_commit(void **dir_baton,
/* Close any outstanding file batons that didn't get caught by
the "has local mods" conditional above. */
err = editor->close_file(file_baton, NULL, file_pool);
svn_pool_destroy(file_pool);
if (err)
goto fixup_error;
}
@ -1858,7 +1888,7 @@ svn_client__do_commit(const char *base_url,
hi;
hi = apr_hash_next(hi))
{
struct file_mod_t *mod = svn__apr_hash_index_val(hi);
struct file_mod_t *mod = apr_hash_this_val(hi);
const svn_client_commit_item3_t *item = mod->item;
const svn_checksum_t *new_text_base_md5_checksum;
const svn_checksum_t *new_text_base_sha1_checksum;
@ -1905,6 +1935,17 @@ svn_client__do_commit(const char *base_url,
if (sha1_checksums)
svn_hash_sets(*sha1_checksums, item->path, new_text_base_sha1_checksum);
svn_pool_destroy(mod->file_pool);
}
if (ctx->notify_func2)
{
svn_wc_notify_t *notify;
notify = svn_wc_create_notify_url(base_url,
svn_wc_notify_commit_finalizing,
iterpool);
ctx->notify_func2(ctx->notify_baton2, notify, iterpool);
}
svn_pool_destroy(iterpool);

View File

@ -27,6 +27,10 @@
/*** Includes. ***/
/* We define this here to remove any further warnings about the usage of
deprecated functions in this file. */
#define SVN_DEPRECATED
#include "svn_auth.h"
#include "svn_client.h"

File diff suppressed because it is too large Load Diff

View File

@ -160,7 +160,7 @@ dir_change_prop(void *dir_baton,
if (! db->created)
{
/* We can still store them in the hash for immediate addition
with the svn_wc_add_from_disk2() call */
with the svn_wc_add_from_disk3() call */
if (! db->properties)
db->properties = apr_hash_make(db->pool);
@ -173,7 +173,7 @@ dir_change_prop(void *dir_baton,
/* We have already notified for this directory, so don't do that again */
SVN_ERR(svn_wc_prop_set4(eb->wc_ctx, db->local_abspath, name, value,
svn_depth_empty, FALSE, NULL,
NULL, NULL, /* Cancelation */
NULL, NULL, /* Cancellation */
NULL, NULL, /* Notification */
scratch_pool));
}
@ -213,9 +213,10 @@ ensure_added(struct dir_baton_t *db,
db->created = TRUE;
/* Add the directory with all the already collected properties */
SVN_ERR(svn_wc_add_from_disk2(db->eb->wc_ctx,
SVN_ERR(svn_wc_add_from_disk3(db->eb->wc_ctx,
db->local_abspath,
db->properties,
TRUE /* skip checks */,
db->eb->notify_func,
db->eb->notify_baton,
scratch_pool));
@ -306,7 +307,7 @@ file_change_prop(void *file_baton,
}
/* We store all properties in the hash for immediate addition
with the svn_wc_add_from_disk2() call */
with the svn_wc_add_from_disk3() call */
if (! fb->properties)
fb->properties = apr_hash_make(fb->pool);
@ -375,7 +376,8 @@ file_close(void *file_baton,
fb->pool)));
}
SVN_ERR(svn_wc_add_from_disk2(eb->wc_ctx, fb->local_abspath, fb->properties,
SVN_ERR(svn_wc_add_from_disk3(eb->wc_ctx, fb->local_abspath, fb->properties,
TRUE /* skip checks */,
eb->notify_func, eb->notify_baton,
fb->pool));
@ -526,7 +528,7 @@ svn_client__copy_foreign(const char *url,
for (hi = apr_hash_first(scratch_pool, props); hi;
hi = apr_hash_next(hi))
{
const char *name = svn__apr_hash_index_key(hi);
const char *name = apr_hash_this_key(hi);
if (svn_property_kind2(name) != svn_prop_regular_kind
|| ! strcmp(name, SVN_PROP_MERGEINFO))
@ -538,12 +540,14 @@ svn_client__copy_foreign(const char *url,
if (!already_locked)
SVN_WC__CALL_WITH_WRITE_LOCK(
svn_wc_add_from_disk2(ctx->wc_ctx, dst_abspath, props,
svn_wc_add_from_disk3(ctx->wc_ctx, dst_abspath, props,
TRUE /* skip checks */,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool),
ctx->wc_ctx, dir_abspath, FALSE, scratch_pool);
else
SVN_ERR(svn_wc_add_from_disk2(ctx->wc_ctx, dst_abspath, props,
SVN_ERR(svn_wc_add_from_disk3(ctx->wc_ctx, dst_abspath, props,
TRUE /* skip checks */,
ctx->notify_func2, ctx->notify_baton2,
scratch_pool));
}

View File

@ -27,6 +27,7 @@
/*** Includes. ***/
#include <stddef.h>
#include <apr_pools.h>
#include "svn_hash.h"
#include "svn_client.h"
@ -34,6 +35,8 @@
#include "private/svn_wc_private.h"
#include "client.h"
/*** Code. ***/
@ -76,6 +79,20 @@ call_conflict_func(svn_wc_conflict_result_t **result,
return SVN_NO_ERROR;
}
/* The magic number in client_ctx_t.magic_id. */
#define CLIENT_CTX_MAGIC APR_UINT64_C(0xDEADBEEF600DF00D)
svn_client__private_ctx_t *
svn_client__get_private_ctx(svn_client_ctx_t *ctx)
{
svn_client__private_ctx_t *const private_ctx =
(void*)((char *)ctx - offsetof(svn_client__private_ctx_t, public_ctx));
SVN_ERR_ASSERT_NO_RETURN(&private_ctx->public_ctx == ctx);
SVN_ERR_ASSERT_NO_RETURN(0 == private_ctx->magic_null);
SVN_ERR_ASSERT_NO_RETURN(CLIENT_CTX_MAGIC == private_ctx->magic_id);
return private_ctx;
}
svn_error_t *
svn_client_create_context2(svn_client_ctx_t **ctx,
apr_hash_t *cfg_hash,
@ -83,23 +100,29 @@ svn_client_create_context2(svn_client_ctx_t **ctx,
{
svn_config_t *cfg_config;
*ctx = apr_pcalloc(pool, sizeof(svn_client_ctx_t));
svn_client__private_ctx_t *const private_ctx =
apr_pcalloc(pool, sizeof(*private_ctx));
svn_client_ctx_t *const public_ctx = &private_ctx->public_ctx;
(*ctx)->notify_func2 = call_notify_func;
(*ctx)->notify_baton2 = *ctx;
private_ctx->magic_null = 0;
private_ctx->magic_id = CLIENT_CTX_MAGIC;
(*ctx)->conflict_func2 = call_conflict_func;
(*ctx)->conflict_baton2 = *ctx;
public_ctx->notify_func2 = call_notify_func;
public_ctx->notify_baton2 = public_ctx;
(*ctx)->config = cfg_hash;
public_ctx->conflict_func2 = call_conflict_func;
public_ctx->conflict_baton2 = public_ctx;
public_ctx->config = cfg_hash;
if (cfg_hash)
cfg_config = svn_hash_gets(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG);
else
cfg_config = NULL;
SVN_ERR(svn_wc_context_create(&(*ctx)->wc_ctx, cfg_config, pool,
pool));
SVN_ERR(svn_wc_context_create(&public_ctx->wc_ctx, cfg_config,
pool, pool));
*ctx = public_ctx;
return SVN_NO_ERROR;
}

View File

@ -258,6 +258,15 @@ single_repos_delete(svn_ra_session_t *ra_session,
editor->abort_edit(edit_baton, pool)));
}
if (ctx->notify_func2)
{
svn_wc_notify_t *notify;
notify = svn_wc_create_notify_url(base_uri,
svn_wc_notify_commit_finalizing,
pool);
ctx->notify_func2(ctx->notify_baton2, notify, pool);
}
/* Close the edit. */
return svn_error_trace(editor->close_edit(edit_baton, pool));
}
@ -296,7 +305,7 @@ delete_urls_multi_repos(const apr_array_header_t *uris,
for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
{
const char *repos_root = svn__apr_hash_index_key(hi);
const char *repos_root = apr_hash_this_key(hi);
repos_relpath = svn_uri_skip_ancestor(repos_root, uri, pool);
if (repos_relpath)
@ -304,7 +313,7 @@ delete_urls_multi_repos(const apr_array_header_t *uris,
/* Great! We've found another URI underneath this
session. We'll pick out the related RA session for
use later, store the new target, and move on. */
repos_deletables = svn__apr_hash_index_val(hi);
repos_deletables = apr_hash_this_val(hi);
APR_ARRAY_PUSH(repos_deletables->target_uris, const char *) =
apr_pstrdup(pool, uri);
break;
@ -346,14 +355,14 @@ delete_urls_multi_repos(const apr_array_header_t *uris,
RA error code otherwise for 1.6 compatibility.) */
if (!repos_relpath || !*repos_relpath)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
"URL '%s' not within a repository", uri);
_("URL '%s' not within a repository"), uri);
/* Now, test to see if the thing actually exists in HEAD. */
SVN_ERR(svn_ra_check_path(repos_deletables->ra_session, repos_relpath,
SVN_INVALID_REVNUM, &kind, pool));
if (kind == svn_node_none)
return svn_error_createf(SVN_ERR_FS_NOT_FOUND, NULL,
"URL '%s' does not exist", uri);
_("URL '%s' does not exist"), uri);
}
/* Now we iterate over the DELETABLES hash, issuing a commit for
@ -361,7 +370,7 @@ delete_urls_multi_repos(const apr_array_header_t *uris,
iterpool = svn_pool_create(pool);
for (hi = apr_hash_first(pool, deletables); hi; hi = apr_hash_next(hi))
{
struct repos_deletables_t *repos_deletables = svn__apr_hash_index_val(hi);
struct repos_deletables_t *repos_deletables = apr_hash_this_val(hi);
const char *base_uri;
apr_array_header_t *target_relpaths;
@ -573,7 +582,7 @@ svn_client_delete4(const apr_array_header_t *paths,
for (hi = apr_hash_first(pool, wcroots); hi; hi = apr_hash_next(hi))
{
const char *root_abspath;
const apr_array_header_t *targets = svn__apr_hash_index_val(hi);
const apr_array_header_t *targets = apr_hash_this_val(hi);
svn_pool_clear(iterpool);

View File

@ -626,6 +626,28 @@ svn_client_commit(svn_client_commit_info_t **commit_info_p,
}
/*** From copy.c ***/
svn_error_t *
svn_client_copy6(const apr_array_header_t *sources,
const char *dst_path,
svn_boolean_t copy_as_child,
svn_boolean_t make_parents,
svn_boolean_t ignore_externals,
const apr_hash_t *revprop_table,
svn_commit_callback2_t commit_callback,
void *commit_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
return svn_error_trace(svn_client_copy7(sources, dst_path, copy_as_child,
make_parents, ignore_externals,
FALSE /* metadata_only */,
FALSE /* pin_externals */,
NULL /* externals_to_pin */,
revprop_table,
commit_callback, commit_baton,
ctx, pool));
}
svn_error_t *
svn_client_copy5(svn_commit_info_t **commit_info_p,
const apr_array_header_t *sources,
@ -1498,6 +1520,7 @@ svn_client_ls(apr_hash_t **dirents,
}
/*** From log.c ***/
svn_error_t *
svn_client_log4(const apr_array_header_t *targets,
const svn_opt_revision_t *peg_revision,
@ -1970,8 +1993,8 @@ svn_client_propget3(apr_hash_t **props,
for (hi = apr_hash_first(pool, temp_props); hi;
hi = apr_hash_next(hi))
{
const char *abspath = svn__apr_hash_index_key(hi);
svn_string_t *value = svn__apr_hash_index_val(hi);
const char *abspath = apr_hash_this_key(hi);
svn_string_t *value = apr_hash_this_val(hi);
const char *relpath = svn_dirent_join(path_or_url,
svn_dirent_skip_ancestor(target, abspath),
pool);
@ -2031,9 +2054,9 @@ string_hash_dup(apr_hash_t *hash, apr_pool_t *pool)
for (hi = apr_hash_first(pool, hash); hi; hi = apr_hash_next(hi))
{
const char *key = apr_pstrdup(pool, svn__apr_hash_index_key(hi));
apr_ssize_t klen = svn__apr_hash_index_klen(hi);
svn_string_t *val = svn_string_dup(svn__apr_hash_index_val(hi), pool);
const char *key = apr_pstrdup(pool, apr_hash_this_key(hi));
apr_ssize_t klen = apr_hash_this_key_len(hi);
svn_string_t *val = svn_string_dup(apr_hash_this_val(hi), pool);
apr_hash_set(new_hash, key, klen, val);
}
@ -2185,6 +2208,28 @@ svn_client_proplist(apr_array_header_t **props,
/*** From status.c ***/
svn_error_t *
svn_client_status5(svn_revnum_t *result_rev,
svn_client_ctx_t *ctx,
const char *path,
const svn_opt_revision_t *revision,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t update,
svn_boolean_t no_ignore,
svn_boolean_t ignore_externals,
svn_boolean_t depth_as_sticky,
const apr_array_header_t *changelists,
svn_client_status_func_t status_func,
void *status_baton,
apr_pool_t *scratch_pool)
{
return svn_client_status6(result_rev, ctx, path, revision, depth,
get_all, update, TRUE, no_ignore,
ignore_externals, depth_as_sticky, changelists,
status_func, status_baton, scratch_pool);
}
struct status4_wrapper_baton
{
svn_wc_context_t *wc_ctx;
@ -2438,6 +2483,21 @@ svn_client_switch(svn_revnum_t *result_rev,
}
/*** From cat.c ***/
svn_error_t *
svn_client_cat2(svn_stream_t *out,
const char *path_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
return svn_client_cat3(NULL /* props */,
out, path_or_url, peg_revision, revision,
TRUE /* expand_keywords */,
ctx, pool, pool);
}
svn_error_t *
svn_client_cat(svn_stream_t *out,
const char *path_or_url,
@ -2487,6 +2547,32 @@ svn_client_checkout(svn_revnum_t *result_rev,
/*** From info.c ***/
svn_error_t *
svn_client_info3(const char *abspath_or_url,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
svn_depth_t depth,
svn_boolean_t fetch_excluded,
svn_boolean_t fetch_actual_only,
const apr_array_header_t *changelists,
svn_client_info_receiver2_t receiver,
void *receiver_baton,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
return svn_error_trace(
svn_client_info4(abspath_or_url,
peg_revision,
revision,
depth,
fetch_excluded,
fetch_actual_only,
FALSE /* include_externals */,
changelists,
receiver, receiver_baton,
ctx, pool));
}
svn_info_t *
svn_info_dup(const svn_info_t *info, apr_pool_t *pool)
{
@ -2746,6 +2832,22 @@ svn_client_resolved(const char *path,
svn_wc_conflict_choose_merged, ctx, pool);
}
/*** From revert.c ***/
svn_error_t *
svn_client_revert2(const apr_array_header_t *paths,
svn_depth_t depth,
const apr_array_header_t *changelists,
svn_client_ctx_t *ctx,
apr_pool_t *pool)
{
return svn_error_trace(svn_client_revert3(paths,
depth,
changelists,
FALSE /* clear_changelists */,
FALSE /* metadata_only */,
ctx,
pool));
}
svn_error_t *
svn_client_revert(const apr_array_header_t *paths,
svn_boolean_t recursive,
@ -2783,7 +2885,7 @@ svn_client_uuid_from_url(const char **uuid,
/* destroy the RA session */
svn_pool_destroy(subpool);
return svn_error_trace(err);;
return svn_error_trace(err);
}
svn_error_t *
@ -2964,3 +3066,24 @@ svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
return new_item;
}
svn_error_t *
svn_client_cleanup(const char *path,
svn_client_ctx_t *ctx,
apr_pool_t *scratch_pool)
{
const char *local_abspath;
if (svn_path_is_url(path))
return svn_error_createf(SVN_ERR_ILLEGAL_TARGET, NULL,
_("'%s' is not a local path"), path);
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, scratch_pool));
return svn_error_trace(svn_client_cleanup2(local_abspath,
TRUE /* break_locks */,
TRUE /* fix_recorded_timestamps */,
TRUE /* clear_dav_cache */,
TRUE /* vacuum_pristines */,
FALSE /* include_externals */,
ctx, scratch_pool));
}

Some files were not shown because too many files have changed in this diff Show More