subversion

Checkout Tools
  • last updated 4 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 868169 is being indexed.

Follow up to r28022: test that poking a path under an excluded path fails.

* subversion/tests/libsvn_repos/repos-test.c

(reporter_depth_exclude): Try some illegal reporting, expect failure.

Standardize our use of sqlite3_bind_*. Use the Subversion error

system as much as possible instead of passing around sqlite_result

values; hardcode arguments that are always the same; and look up the

db in the statement.

* subversion/libsvn_fs_util/sqlite-util.h

* subversion/libsvn_fs_util/sqlite-util.c

(svn_fs__sqlite_bind_int64, svn_fs__sqlite_bind_text): New

helpers.

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

(index_path_mergeinfo, parse_mergeinfo_from_db,

get_mergeinfo_for_path, get_mergeinfo_for_children):

* subversion/libsvn_fs_util/node-origins-sqlite-index.c

(get_origin, set_origin):

Use new helpers.

Consolidate use of sqlite3_prepare into a helper function which passes

the args that we always use, and uses our normal error system.

* subversion/libsvn_fs_util/sqlite-util.h

(svn_fs__sqlite_prepare): Declare.

* subversion/libsvn_fs_util/sqlite-util.c

(svn_fs__sqlite_prepare): Implement.

(check_format): Use svn_fs__sqlite_prepare.

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

(index_path_mergeinfo, table_has_any_rows_with_rev,

parse_mergeinfo_from_db, get_mergeinfo_for_path,

get_mergeinfo_for_children):

* subversion/libsvn_fs_util/node-origins-sqlite-index.c

(get_origin, set_origin):

Use svn_fs__sqlite_prepare.

Standardize our use of sqlite3_step (which now only appears in one

place!). Use the Subversion error system as much as possible instead

of passing around sqlite_result values.

* subversion/libsvn_fs_util/sqlite-util.h

(svn_fs__sqlite_step_row): New helper function that runs

sqlite3_step, expecting SQLITE_ROW to be returned.

* subversion/libsvn_fs_util/sqlite-util.c

(svn_fs__sqlite_step_done): Reimplement using step_with_expectation.

(step_with_expectation): Guts of svn_fs__sqlite_step_done, now using

svn_fs__sqlite_step.

(svn_fs__sqlite_step_row): New.

(check_format): Use new helpers.

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

(parse_mergeinfo_from_db): Use new helpers. Also remove a comment

about fallthrough that has been meaningless since r22184.

(get_mergeinfo_for_path, get_mergeinfo_for_children): Use new

helpers.

* subversion/libsvn_fs_util/node-origins-sqlite-index.c

(get_origin): Use new helpers.

If a call to svn_fs_mergeinfo__update_index is ultimately going to be

a no-op, don't perform any write operations at all.

The upshot of this change is that commits that don't change any

svn:mergeinfo will no longer block (or be blocked by) commands that

read from the merge tracking database.

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

(table_has_any_rows_with_rev): New helper function.

(clean_tables): New helper function to do the cleanup of failed

transactions, factored out of svn_fs_mergeinfo__update_index.

(svn_fs_mergeinfo__update_index): Factor out clean_tables.

* subversion/libsvn_fs_util/sqlite-util.c

* subversion/libsvn_fs_util/sqlite-util.h

(svn_fs__sqlite_step): New helper for calling sqlite3_step when you

don't know if you expect SQLITE_ROW or SQLITE_DONE.

* CHANGES: Add r22355 for 1.4.x.

Add --design option to the python test suite. At this time the option only

makes the tests continue when one of the run_and_verify fails. This is a

(small) start to making it easier to write python regression tests.

* subversion/tests/cmdline/svntest/main.py

(setup_design_mode, wrap_ex): Wrap/decorate all run_and_verify* functions. In

the wrapper, print out but further ignore all exceptions.

(usage, run_tests): Add '--design' option.

Update a TODO item.
On the 'fix-ra-mergeinfo-api' branch...

Treat paths provided to svn_ra_get_mergeinfo() as relative to the

session URL. (Oddly, mod_dav_svn already made this assumption.)

WARNING: This causes merge-tests 45 and 52 to fail. Various tweaks

I've made over time cause those same tests to fail only over

certain RA layers, but right now they all fail consistently.

* subversion/include/svn_ra.h,

* subversion/libsvn_ra/ra_loader.c

(svn_ra_get_mergeinfo): Require and verify that the provided paths

are relative.

* subversion/svnserve/serve.c

(get_mergeinfo): Treat incoming paths as relative to the session root.

Re-relative-ize the output paths.

* subversion/mod_dav_svn/reports/mergeinfo.c

(dav_svn__get_mergeinfo_report): Re-relative-ize the output paths.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_mergeinfo): Treat incoming paths as relative to

the session root, and re-relative-ize the output paths.

* subversion/libsvn_client/client.h

(svn_client__path_relative_to_session): Add prototype.

* subversion/libsvn_client/ra.c

(svn_client__path_relative_to_session): Was path_relative_to_session()

in copy.c; now no longer static.

* subversion/libsvn_client/mergeinfo.h

(svn_client__get_repos_mergeinfo): Treat 'rel_path' as relative to

the repository root instead of relative to the session.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo): Rework logic a bit,

using svn_client__path_relative_to_root() instead of doing path math.

(svn_client__get_repos_mergeinfo): Treat 'rel_path' as relative to

the repository root instead of relative to the session. (Most

callers were treating it relative to the session URL anyway, it

was merely a fluke that it ever worked.)

(svn_client_mergeinfo_get_merged): Request no leading slash on

mergeinfo path.

* subversion/libsvn_client/copy.c

(path_relative_to_session): Now ra.c:svn_client__path_relative_to_session().

(calculate_target_mergeinfo): Lose reparenting logic.

(repos_to_wc_copy, repos_to_wc_copy_single): Track renamed function.

* subversion/libsvn_client/merge.c

(filter_reflected_revisions): Request no leading slash on mergeinfo paths.

* TODO-1.5-branch

Remove the TODO item related to this change.

    • ?
    /branches/fix-ra-mergeinfo-api/TODO-1.5-branch
* subversion/libsvn_client/merge.c

(merge_cmd_baton_t): Tweak comment for mergeinfo_capable, based on

the fact that Subversion 1.5 code is always mergeinfo capable,

unless it's talking to the repository via a 1.4 or lower server.

Suggested by: glasser

Create a new 'fix-ra-mergeinfo-api' branch.
Revert r28080.
A follow-up to r27875 (for issue #2723), using clearer verbiage

regarding the RELATIVE_TO_DIR parameter being NULL.

* subversion/include/svn_client.h

(svn_client_diff4): Document RELATIVE_TO_DIR more clearly.

* subversion/include/svn_diff.h

(svn_diff_file_output_unified3): Document RELATIVE_TO_DIR more clearly.

Patch by: Jeremy Whitlock <jwhitlock@collab.net>

Suggested by: glasser

* STATUS: Vote for the r25833 branch.
Followup to r28077, fixing a typo.

* subversion/libsvn_fs_util/sqlite-util.c

(svn_fs__sqlite_open): Add missing *.

Remove a TODO item, not because it is done, but because it shouldn't be.

*** This was reverted in r28084. Turns out the work should be done,

*** but should at least be done the right way.

Revert r28075 in its entirety. It was misimplemented.
Merge r22355 from trunk to the 1.4.x branch, putting the repository and

WC UUIDs in the correct order in a "svn switch --relocate" error message.

Approved by: +1: glasser, hwright, dlr

Followup to r28073: set the case-sensitivity pragma at connection

time, not database initialization time.

(Note, by the way, that in addition to making the (path LIKE "foo/%")

queries correct, it also allows the sqlite query optimization to

transform them into (path >= "foo/" AND path < "foo0") and use the

index. Correctness and efficiency: two great tastes that taste great

together!)

[ Note from the future: perhaps I shouldn't brag about correctness in

revisions that don't typecheck... see r28081. ]

* subversion/libsvn_fs_util/sqlite-util.c

(schema_create_sql): Don't make LIKEs case-sensitive here...

(svn_fs__sqlite_open): ... do it here instead.

* STATUS: Vote for r22355, approving.
*** NOTE: This change (which coincidentally scored a revision number

*** that matches its author's US ZIP code) was misimplemented

*** and subsequently reverted in r28079 (which is over in Indian

*** Trail, NC, as ZIP codes go...).

Treat paths provided to svn_ra_get_mergeinfo() as relative to the

session URL. (Oddly, mod_dav_svn already made this assumption.)

* subversion/include/svn_ra.h,

* subversion/libsvn_ra/ra_loader.c

(svn_ra_get_mergeinfo): Require and verify that the provided paths

are relative.

* subversion/svnserve/serve.c

(get_mergeinfo): Treat incoming paths as relative to the session root.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_mergeinfo): Treat incoming paths as relative to

the session root.

* subversion/libsvn_client/client.h

(svn_client__path_relative_to_session): Add prototype.

* subversion/libsvn_client/ra.c

(svn_client__path_relative_to_session): Was path_relative_to_session()

in copy.c; now no longer static.

* subversion/libsvn_client/mergeinfo.h

(svn_client__get_repos_mergeinfo): Rename 'rel_path' to 'fs_path',

and treat it as an absolute filesystem path, not a

session-relative path.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_or_repos_mergeinfo): Rework logic a bit,

using svn_client__path_relative_to_root() instead of doing path math.

(svn_client__get_repos_mergeinfo): Rename 'rel_path' to 'fs_path',

and treat it as an absolute filesystem path, not a

session-relative path. (No callers were treating it relative to

the session URL anyway, it was merely a fluke that it ever

worked.)

* subversion/libsvn_client/copy.c

(path_relative_to_session): Now ra.c:svn_client__path_relative_to_session().

(calculate_target_mergeinfo): Now request an absolute fs-path.

(repos_to_wc_copy, repos_to_wc_copy_single): Track renamed function.

* TODO-1.5-branch

Remove the TODO item related to this change.

* TODO-1.5-branch: Snag a task.
We make at least one LIKE query against paths, to find paths that are

children of a given path. This really really really needs to be

case-sensitive!

* subversion/libsvn_fs_util/sqlite-util.c

(schema_create_sql): Make all LIKEs case-sensitive when the database

is created.

A follow-up to r28053, incorporating some stylistic changes suggested

to make the code more easily modifiable, by replacing a variable used

to hold ternary state with a boolean variable, and using another flag

to indicate whether or not it's been set.

* subversion/libsvn_client/merge.c

(merge_cmd_baton_t): Change the data type of mergeinfo_capable from

svn_boolean_t * to svn_boolean_t.

(mergeinfo_behavior, do_merge): Adjust for mergeinfo_capable data

type change.

Suggested by: cmpilato

* TODO-1.5-branch: Add a TODO.

* subversion/mod_dav_svn/reports/update.c

(upd_change_xxx_prop, dav_svn__update_report): Use "strcmp() == 0"

rather than "!strcmp()" in conditionals, to more clearly relate the

return type of the strcmp() function.

* subversion/include/svn_wc.h:

(svn_wc_entry_t): Improve comment about extending svn_wc_entry_t,

listing additional functions in subversion/libsvn_wc/entries.c

that may need to be extended.

Patch by: Stephen Butler <sbutler@elego.de>

Approved by: hwright

Initialize all svn_merge_range_t fields in representation of "" mergeinfo.

See http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=133009

* subversion/libsvn_fs_util/mergeinfo-sqlite-index.c

(no_mergeinfo): Initialize the inheritable field of this svn_merge_range_t

representing mergeinfo of "" to TRUE.

Suggested by: glasser

Stylistic tweak, no functional change.

* subversion/tests/cmdline/svndumpfilter_tests.py

(reflect_dropped_renumbered_revs): Add whitespace between parameters.

Suggested by: dlr

A follow-up to r28044.

* subversion/tests/cmdline/svndumpfilter_tests.py

(reflect_dropped_renumbered_revs): Remove unnecessary None argument passed

to load_and_verify_dumpstream() for *varargs.

Suggested by: dlr