svn/apache.git
21 years ago* dag.c (NR_HEADER, NR_PROP_KEY, NR_DATA_KEY, HDR_KIND, HDR_REV,strings-reps-devstrings-reps-dev
Karl Fogel [Thu, 28 Jun 2001 23:11:24 +0000 (28 23:11 +0000)]
* dag.c (NR_HEADER, NR_PROP_KEY, NR_DATA_KEY, HDR_KIND, HDR_REV,
HDR_FLAGS): New macros.  Use them everywhere, instead of unpacking
node revision skels by hand.

* structure: Notes on deltification.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839610 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(node_rev_has_mutable_flag): Got rid of last ### tweakit comment.
Karl Fogel [Thu, 28 Jun 2001 17:54:47 +0000 (28 17:54 +0000)]
(node_rev_has_mutable_flag): Got rid of last ### tweakit comment.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839604 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_fs/fs.c
C. Michael Pilato [Thu, 28 Jun 2001 15:37:59 +0000 (28 15:37 +0000)]
* libsvn_fs/fs.c

  (svn_fs_open_berkeley): Hm.  We should probably remember to open the
  strings and representations tables as well.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839602 13f79535-47bb-0310-9956-ffa450edef68

21 years agoYahoo! All fs-test's now PASS!
C. Michael Pilato [Wed, 27 Jun 2001 20:52:00 +0000 (27 20:52 +0000)]
Yahoo!  All fs-test's now PASS!

* libsvn_fs/key-gen.c

  (svn_fs__next_key): Grr...freakin' OBO error wasting my whole day...

* tests/libsvn_fs/key-test.c

  (next_key): Added another test case to catch a stupid OBO error
  case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839599 13f79535-47bb-0310-9956-ffa450edef68

21 years agoChugging along, making the fs-test's pass. Right now 17 and 24 FAIL,
C. Michael Pilato [Wed, 27 Jun 2001 16:02:40 +0000 (27 16:02 +0000)]
Chugging along, making the fs-test's pass.  Right now 17 and 24 FAIL,
and 20 SEGFAULTs.

* libsvn_fs/dag.c

  (svn_fs__dag_file_length): Doh!  I can't *beLIEVE* I tried to check
  the length of a list skel with skel->len...

  (make_node_immutable): Add some segfault protection.

* libsvn_fs/tree.c

  Itty bitty formatting fix

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839597 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAvoid newlines in string literals, as per Joe Orton's change to the
Karl Fogel [Wed, 27 Jun 2001 01:40:36 +0000 (27 01:40 +0000)]
Avoid newlines in string literals, as per Joe Orton's change to the
trunk on 2001-06-26 20:08, but use \n's to make sure the resulting
string still contains actual newlines where Mike Pilato had them.

This will conflict with Joe's change when we merge, but it'll be easy
to resolve in favor of the branch.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839596 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* reps-strings.h, reps-string.c (svn_fs__delete_rep_if_mutable): New
Karl Fogel [Wed, 27 Jun 2001 00:28:12 +0000 (27 00:28 +0000)]
* reps-strings.h, reps-string.c (svn_fs__delete_rep_if_mutable): New
func.

* dag.c (svn_fs__dag_delete_if_mutable): Delete any mutable
representations referred to by this node, too.

Mike Pilato, this is my last commit for today.  If you want to code at
home, or on the train coming to work tomorrow, don't worry about
conflicts with my stuff.  Tests 1-15 in fs-test.c pass now... and test
16 seg faults.  Good luck. :-)

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839590 13f79535-47bb-0310-9956-ffa450edef68

21 years agoThis fixes fs-test 15 ("delete mutable nodes from directories"):
Karl Fogel [Wed, 27 Jun 2001 00:09:17 +0000 (27 00:09 +0000)]
This fixes fs-test 15 ("delete mutable nodes from directories"):

* reps-strings.h, reps-string.c (svn_fs__make_rep_immutable): New
func.

* dag.c (delete_entry): Test for target's emptiness correctly.
(make_node_immutable): Immutate representations too.  Loop over header
correctly.  Don't use a subpool, we don't need it anymore.
(svn_fs__dag_delete_if_mutable): Note necessary future work.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839589 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMore work on fs-test 15 ("delete mutable nodes from directories"),
Karl Fogel [Tue, 26 Jun 2001 23:49:34 +0000 (26 23:49 +0000)]
More work on fs-test 15 ("delete mutable nodes from directories"),
still not there:

* reps-strings.h, reps-string.c (svn_fs__make_rep_immutable): New
func.

* dag.c (make_node_immutable): Immutate representations too.
Loop over header correctly now.  Don't use a subpool, we don't need it
anymore.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839587 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMore debugging. This does not completely fix test 15 ("delete mutable
Karl Fogel [Tue, 26 Jun 2001 23:26:14 +0000 (26 23:26 +0000)]
More debugging.  This does not completely fix test 15 ("delete mutable
nodes from directories") in fs-test.c, but brings us closer:

* dag.c (find_dir_entry): Return previous entry too.
(dir_entry_from_node, set_entry): Call find_dir_entry correctly.
(delete_entry): Get a previous entry from find_dir_entry, use it.
Clear the old entries list, so we're overwriting, not appending.
Remember to use the SVN_ERR macro.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839584 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMore debugging. Test 14 ("set and get some node properties") in
Karl Fogel [Tue, 26 Jun 2001 22:27:30 +0000 (26 22:27 +0000)]
More debugging.  Test 14 ("set and get some node properties") in
fs-test.c passes now:

* proplist.c (svn_fs__set_prop): Check value exists before adding a
new property.

* dag.c (svn_fs__dag_set_proplist): Remember to set the new rep key in
the node revision, if created a new rep key.  Also, use
svn_fs__validate_proplist() instead of inline code, and return an
error if it's invalid, instead of calling abort().
(svn_fs__dag_get_proplist): Fetch the rep skel before using it.

Unrelated change:

* tests/libsvn_delta/ra-local-test.c: Make compilation warnings go
away.  This whole test is listed as "skip" in build.conf anyway.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839583 13f79535-47bb-0310-9956-ffa450edef68

21 years agoThis fixes fs-test #8, reading and writing of files. Now fs-test:1-13
Karl Fogel [Tue, 26 Jun 2001 21:39:47 +0000 (26 21:39 +0000)]
This fixes fs-test #8, reading and writing of files.  Now fs-test:1-13
are passing.  Test 14 seg faults, though. :-)

* dag.c (svn_fs__dag_get_contents): Handle non-existent reps by
setting the baton's rep skel to null.  This case covers files that
have never had contents.
(txn_body_read_file_contents): Handle null rep skel.
(file_content_baton_t): Document meaning of a null rep skel.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839582 13f79535-47bb-0310-9956-ffa450edef68

21 years agoList `svn_fs__dag_set_contents' as done. Now to debug everyone...
Karl Fogel [Tue, 26 Jun 2001 21:22:25 +0000 (26 21:22 +0000)]
List `svn_fs__dag_set_contents' as done.  Now to debug everyone...

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839581 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* reps-strings.h, reps-strings.c (svn_fs__get_mutable_rep): Handle
Karl Fogel [Tue, 26 Jun 2001 21:18:03 +0000 (26 21:18 +0000)]
* reps-strings.h, reps-strings.c (svn_fs__get_mutable_rep): Handle
non-keys gracefully.

* tests/libsvn_fs/strings-reps-test.c (write_null_string): New test.
(test_funcs): Run new test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839580 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_fs/dag.c
C. Michael Pilato [Tue, 26 Jun 2001 20:17:43 +0000 (26 20:17 +0000)]
* libsvn_fs/dag.c

  (svn_fs__dag_get_proplist): Safety first!  Added code for trivial case.

  (svn_fs__dag_set_proplist): Converted this to use new reps/strings stuff.

* this-branch.txt

  (svn_fs__dag_set_proplist): Completed.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839578 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* dag.c (svn_fs__dag_set_contents): Use reps/strings code.
Karl Fogel [Tue, 26 Jun 2001 20:08:16 +0000 (26 20:08 +0000)]
* dag.c (svn_fs__dag_set_contents): Use reps/strings code.

* this-branch.txt: note that these are done now:
     svn_fs__dag_get_contents
     read_file_contents
(The latter was actually done in a previous commit).

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839577 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMike Pilato and I are not just on the same page, we are on the same
Karl Fogel [Tue, 26 Jun 2001 19:15:43 +0000 (26 19:15 +0000)]
Mike Pilato and I are not just on the same page, we are on the same
medulla oblongata:

* include/svn_fs.h (svn_fs_file_contents): Doc fix.

* libsvn_fs/tree.c (txn_body_get_mutable_source_stream): Doc fix.
(svn_fs_apply_textdelta): Add a note for the future.

* libsvn_fs/reps-strings.h, libsvn_fs/reps-strings.c: New files.
svn_fs__string_key_from_rep, svn_fs__string_from_rep,
svn_fs__get_mutable_rep, svn_fs__rep_is_mutable, rep_set_mutable_flag,
rep_is_fulltext): Moved here from reps-table.h and reps-table.c.
(svn_fs__rep_read_range): New func.

* libsvn_fs/dag.h (svn_fs__dag_get_contents): Doc fix.

* libsvn_fs/dag.c: Read file contents streamily, using the new
strings/reps code.
(file_content_baton_t): Store a rep skel and fs, instead of a
node_revision skel.
(svn_fs__dag_get_contents): Set up baton appropriately.
(read_file_contents_args, txn_body_read_file_contents): New struct and
func, respectively.
(read_file_contents): Rewritten to use above.

* strings-table.h, strings-table.c (svn_fs__string_read): Change
placement of buf argument.  All callers changed.

* libsvn_fs/this-branch.txt: Note that the following are now done:
      svn_fs__dag_delete
      svn_fs__dag_delete_tree
      svn_fs__dag_delete_if_mutable
      delete_entry

* tests/libsvn_fs/strings-reps-test.c: Put this file on the
`strings-reps-dev' branch too.
(txn_body_string_copy, copy_string): Re-enable.
(test_funcs): Run `copy_string' test.
(rep_args): Constify key.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839573 13f79535-47bb-0310-9956-ffa450edef68

21 years agoThis commit was manufactured by cvs2svn to create branch 'strings-reps-dev'.
No Author [Tue, 26 Jun 2001 18:10:05 +0000 (26 18:10 +0000)]
This commit was manufactured by cvs2svn to create branch 'strings-reps-dev'.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839571 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_fs/dag.c
C. Michael Pilato [Tue, 26 Jun 2001 14:54:56 +0000 (26 14:54 +0000)]
* libsvn_fs/dag.c

  (get_dir_entries): Added some error-checking.

  (set_entry): Make sure to clear the old string before writing a new
  one.

  (make_entry): Cut-n-paste-o repair.

  (delete_entry): Update to use reps and skels.

* reps-table.c
* reps-table.h

  (svn_fs_string_key_from_rep): Take POOL argument so we can assure a
  null-terminated string return.  All callers changed.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839568 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMore tandem coding with Mike Pilato:
Karl Fogel [Mon, 25 Jun 2001 19:48:32 +0000 (25 19:48 +0000)]
More tandem coding with Mike Pilato:

* dag.c (make_entry): Finished.
(set_entry): Replaces add_new_entry, new calling discipline.  All
callers changed.
(replace_dir_entry): Removed, just use set_entry now.
(add_new_entry_skel): Removed, code folded into set_entry, see below.
(svn_fs__dag_file_length): Get the string key from the right skel.
(svn_fs__dag_make_copy): Abort immediately, so no one is tempted to
use this perpetually in-progress function.

* reps-table.h, reps-table.c (svn_fs__string_key_from_rep): Simplify
calling discipline.  All callers changed.

* this-branch.txt: Note that the following are done:
     svn_fs__dag_set_entry
     svn_fs__dag_clone_child
     svn_fs__dag_make_file
     svn_fs__dag_make_dir
     svn_fs__dag_link

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839567 13f79535-47bb-0310-9956-ffa450edef68

21 years agoTandem coding with Mike Pilato:
Karl Fogel [Mon, 25 Jun 2001 16:26:03 +0000 (25 16:26 +0000)]
Tandem coding with Mike Pilato:

* reps-table.c (svn_fs__string_key_from_rep, svn_fs__string_from_rep,
svn_fs__rep_is_mutable): Removed redundant doc strings.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839566 13f79535-47bb-0310-9956-ffa450edef68

21 years agoTandem coding with Mike Pilato:
Karl Fogel [Mon, 25 Jun 2001 16:20:23 +0000 (25 16:20 +0000)]
Tandem coding with Mike Pilato:

* reps-table.h, reps-table.c (svn_fs__get_mutable_rep): Finish.
(svn_fs__write_new_rep): Add `const' to arg.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839565 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* subversion/libsvn_fs/dag.c
C. Michael Pilato [Mon, 25 Jun 2001 15:45:44 +0000 (25 15:45 +0000)]
* subversion/libsvn_fs/dag.c

  (rep_has_mutable_flag, rep_set_mutable_flag, string_from_rep,
  string_key_from_rep): Moved to reps-table.c.

  (txn_body_dag_init_fs): Write a valid skel for the root node,
  thanks.

  (make_entry): Build a valid skel for the new node.

  (svn_fs__dag_file_length): svn_fs__string_key_from_rep only needs a
  const char *, so why use an svn_string_t?

* subversion/libsvn_fs/reps-table.c

  (rep_is_fulltext):  New helper function.

  (svn_fs__string_key_from_rep): Was dag.c:string_key_from_rep().

  (svn_fs__string_from_rep): Was dag.c:string_from_rep().

  (svn_fs__rep_is_mutable): Was dag.c:rep_is_mutable().

  (rep_set_mutable_flag): Moved from dag.c

  (svn_fs__get_mutable_rep): New function.

* subversion/libsvn_fs/reps-table.h

  (svn_fs__string_key_from_rep): Was dag.c:string_key_from_rep().

  (svn_fs__string_from_rep): Was dag.c:string_from_rep().

  (svn_fs__rep_is_mutable): Was dag.c:rep_is_mutable().

  (svn_fs__get_mutable_rep): New function.

* subversion/libsvn_fs/strings-table.c

  (svn_fs__string_copy): New function

* subversion/libsvn_fs/strings-table.h

  (svn_fs__string_copy): New function

* subversion/tests/libsvn_fs/strings-reps-test.c

  (txn_body_string_copy, copy_string): New funcs.

  (test_funcs): Include new copy_string() test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839563 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMike and Karl, still pluggin' away at FS changes.
C. Michael Pilato [Fri, 22 Jun 2001 20:20:12 +0000 (22 20:20 +0000)]
Mike and Karl, still pluggin' away at FS changes.

* libsvn_fs/dag.h

  (svn_fs__dag_file_length): Length argument is now an apr_size_t.

* libsvn_fs/dag.c

  (string_key_from_rep): New helper function.

  (string_from_rep): Use string_key_from_rep.

  (svn_fs__dag_file_length): Use new strings/reps stuff.  Also, length
  argument is now an apr_size_t.

  (svn_fs__dag_commit_txn): Remove to-done "todo".

* libsvn_fs/tree.c

  (file_length_args): Changed type for 'length'.

* libsvn_fs/structure

  "Correct brain-o" --kfogel

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839562 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_fs/nodes-rev.h
C. Michael Pilato [Fri, 22 Jun 2001 19:11:41 +0000 (22 19:11 +0000)]
* libsvn_fs/nodes-rev.h
* libsvn_fs/nodes-rev.c

  Removed (contents now in nodes-table.h and .c).

* libsvn_fs/nodes-table.h

  (svn_fs__get_rep, svn_fs__put_rep): Removed obsolete functions.

  (svn_fs__get_node_revision, svn_fs__put_node_revision,
  svn_fs__create_node, svn_fs__create_successor, svn_fs__stable_node,
  svn_fs__delete_node_revision): Moved from node-rev.h.

* libsvn_fs/err.c
* libsvn_fs/err.h

  (svn_fs__err_corrupt_representation): Removed function.

* libsvn_fs/nodes-table.c

  Dump a bunch of junk formerly found in node-rev.c

  (is_valid_header, is_valid_node_revision): Updated to handle New and
  Improved (tm) node revision skels.

  (is_valid_representation): Removed function.

  (svn_fs__get_node_revision): New home for former contents of
  now-absent function svn_fs__get_rep().

  (svn_fs__put_node_revision): Now write the node-revision skel to the
  database (reps live elsewhere).  Replaces svn_fs__put_rep().

  (svn_fs__create_node, svn_fs__create_successor, svn_fs__stable_node,
  svn_fs__delete_node_revision): Moved from node-rev.c but NOT edited.

* libsvn_fs/dag.c

  No longer #include node-rev.h (cuz it's GONE!).

  Some formatting fixes throughout (Gnu-style, if you will).

  (get_node_revision, set_node_revision, svn_fs__dag_get_node,
  svn_fs__dag_dir_entries_hash): Remove ### tweakit comment.

  (dir_entry_from_node): Now use svn_fs__dag_dir_entries_skel.

  (svn_fs__dag_get_proplist): Implement using reps/strings.

  (get_dir_entries): Moved some sanity checking into here from
  svn_fs__dag_dir_entries_skel.

  (svn_fs__dag_dir_entries_skel, dir_entry_from_node): Compactified.

* tests/libsvn_fs/fs-test.c

  (txn_body_check_id): Use svn_fs__get_node_revision instead of
  now-defunct svn_fs__get_rep.

* libsvn_fs/txn.c

  No longer #include node-rev.h (cuz it's GONE!).

* libsvn_fs/this-branch.txt

  Status updated.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839561 13f79535-47bb-0310-9956-ffa450edef68

21 years agoScratch pad Mike and I can use to help us keep track of what remains
Karl Fogel [Fri, 22 Jun 2001 17:42:59 +0000 (22 17:42 +0000)]
Scratch pad Mike and I can use to help us keep track of what remains
to be done for this change.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839560 13f79535-47bb-0310-9956-ffa450edef68

21 years agoStart on code to use the `strings' and `reps' tables, with Mike
Karl Fogel [Thu, 21 Jun 2001 20:07:00 +0000 (21 20:07 +0000)]
Start on code to use the `strings' and `reps' tables, with Mike
Pilato.  This is happening on branch "strings-reps-dev" until it's
ready to be merged into the main line.

* dag.c: #include reps-table.h, strings-table.h.

(node_rev_has_mutable_flag, node_rev_set_mutable_flag): New names for
`has_mutable_flag' and `set_mutable_flag' respectively, since these
only handle node revisions.

(rep_has_mutable_flag, rep_set_mutable_flag): New funcs.

(string_from_rep, get_dir_entries, find_dir_entry): New func.
(dir_entry_from_node): Replace `find_dir_entry_skel', wrapping above
new funcs.  All callers changed.

(svn_fs__dag_open): Removed redundant doc string in source file, fix
indentation.

(make_entry): Use svn_error_create instead of svn_error_createf.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839558 13f79535-47bb-0310-9956-ffa450edef68

21 years agoThis commit was manufactured by cvs2svn to create branch 'strings-reps-dev'.
No Author [Thu, 21 Jun 2001 17:28:51 +0000 (21 17:28 +0000)]
This commit was manufactured by cvs2svn to create branch 'strings-reps-dev'.

git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/strings-reps-dev@839557 13f79535-47bb-0310-9956-ffa450edef68

21 years agoExplain mutability flags for representations; plus a few corrections.
Karl Fogel [Thu, 21 Jun 2001 17:28:50 +0000 (21 17:28 +0000)]
Explain mutability flags for representations; plus a few corrections.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839556 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* subversion/libsvn_fs/strings-table.h
C. Michael Pilato [Wed, 20 Jun 2001 15:38:45 +0000 (20 15:38 +0000)]
* subversion/libsvn_fs/strings-table.h

  (svn_fs__string_delete): Renamed from svn_fs__delete_string for
  consistency.

* subversion/libsvn_fs/strings-table.c

  (svn_fs__string_read): Provide ugly workaround for a bug in Berkeley
  3.2.9 (and yes, a patch is being submitted to Sleepycat).

  (svn_fs__string_size): Expect ENOMEM from request for string size as
  documented in Berkeley C API.

  (svn_fs__string_append): Only check size of strings presumed to
  exist.

  (svn_fs__string_delete): Renamed from svn_fs__delete_string for
  consistency.

* subversion/tests/libsvn_fs/strings-reps-test.c

  (txn_body_write_new_rep, txn_body_write_rep, txn_body_read_rep,
  txn_body_delete_rep): Dinky little pointless edit, really.

  (struct string_args, verify_expected_record, txn_body_verify_string,
  txn_body_string_append, txn_body_string_clear,
  txn_body_string_delete, txn_body_string_size): New helper structure
  and functions for string tests.

  (bigstring1, bigstring2, bigstring3): Data for strings tests.

  (test_strings): New Strings Table test.

  (test_funcs): Added test_strings() test.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839555 13f79535-47bb-0310-9956-ffa450edef68

21 years agoNot including "entry.py" in this package yet.
C. Michael Pilato [Wed, 20 Jun 2001 15:28:33 +0000 (20 15:28 +0000)]
Not including "entry.py" in this package yet.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839554 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* example_tests1.py: obsolete, nuke.
Ben Collins-Sussman [Tue, 19 Jun 2001 16:58:22 +0000 (19 16:58 +0000)]
* example_tests1.py:  obsolete, nuke.

* local_tests.py:  trying a suggeston from comp.python.lang, which
  might make python 1.X compilers not choke hideously on our scripts.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839553 13f79535-47bb-0310-9956-ffa450edef68

21 years agoKeep README up-to-date with new package reorganization.
Ben Collins-Sussman [Tue, 19 Jun 2001 16:50:49 +0000 (19 16:50 +0000)]
Keep README up-to-date with new package reorganization.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839552 13f79535-47bb-0310-9956-ffa450edef68

21 years agoIgnore .pyc files in the package
Ben Collins-Sussman [Tue, 19 Jun 2001 16:42:18 +0000 (19 16:42 +0000)]
Ignore .pyc files in the package

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839551 13f79535-47bb-0310-9956-ffa450edef68

21 years agoOrganize our python framework into a single package 'svntest',
Ben Collins-Sussman [Tue, 19 Jun 2001 16:40:58 +0000 (19 16:40 +0000)]
Organize our python framework into a single package 'svntest',
contained in its own subdirectory.  Mmmm, convenience, yessssss...

Renamed some routines as well, and changed all callers.

* svntest/__init__py:  define 'svntest' package.

* svntest/main.py:  renamed from svn_test_main.py

  (run_one_test):  renamed from run_test()
  (run_tests):     renamed from client_tests()

* svntest/tree.py:  renamed from svn_tree.py

  (get_props):  invoke main.run_svn(), using new module name.

* svntest/entry.py: renamed from svn_entry.py (unused module right now)

* local_tests.py:  import the 'svntest' package, change all calls into
  this new namespace.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839550 13f79535-47bb-0310-9956-ffa450edef68

21 years agoStart noting what will need to change to switch us to the new node
Karl Fogel [Mon, 18 Jun 2001 23:13:29 +0000 (18 23:13 +0000)]
Start noting what will need to change to switch us to the new node
contents representation scheme; search for "### tweakit".

Reviewed to line 855, the beginning of the "Proplists" section.  More
to come.

Development context: Mike Pilato is finishing up the implementations
and tests for the strings table; when that's done, we're ready to
start the switchover.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839549 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(svn_fs__string_append): Fix comments, compactify error handling.
Karl Fogel [Mon, 18 Jun 2001 21:00:26 +0000 (18 21:00 +0000)]
(svn_fs__string_append): Fix comments, compactify error handling.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839548 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* subversion/libsvn_fs/reps-table.c
C. Michael Pilato [Mon, 18 Jun 2001 20:52:50 +0000 (18 20:52 +0000)]
* subversion/libsvn_fs/reps-table.c

  Removed printf's.  Karl's debugger works now! :-)

* subversion/libsvn_fs/strings-table.c

  (svn_fs__open_strings_table): Make sure to initialize the 'next-key'
  table entry.

  (svn_fs__string_read, svn_fs__string_append, svn_fs__string_clear):
  Re-implement based on new interface.

* subversion/libsvn_fs/strings-table.h

  (svn_fs__string_append): Updated docstring to explain that new keys
  are allocated in trail.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839547 13f79535-47bb-0310-9956-ffa450edef68

21 years agoReorganize strings interface to give caller control over trail scope,
Karl Fogel [Mon, 18 Jun 2001 19:24:41 +0000 (18 19:24 +0000)]
Reorganize strings interface to give caller control over trail scope,
and simplify while we're at it:

(svn_fs__read_string_stream, svn_fs__write_string_stream,
svn_fs__new_string_stream, svn_fs__append_string_stream): Removed.

(svn_fs__string_clear, svn_fs__string_append, svn_fs__string_size,
svn_fs__string_read): New functions.  No implementations yet, just an
interface that compiles and does nothing.

(svn_fs__delete_string): Doc fix.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839546 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMake text fit context better.
Karl Fogel [Mon, 18 Jun 2001 15:36:11 +0000 (18 15:36 +0000)]
Make text fit context better.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839545 13f79535-47bb-0310-9956-ffa450edef68

21 years agoSolution to the problem of storing in each node revision the revision
Karl Fogel [Mon, 18 Jun 2001 15:35:04 +0000 (18 15:35 +0000)]
Solution to the problem of storing in each node revision the revision
number when it was created.  Comments welcome.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839544 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* local_tests.py: rename some tests for clarity and consistency.
Ben Collins-Sussman [Mon, 18 Jun 2001 03:25:28 +0000 (18 03:25 +0000)]
* local_tests.py:  rename some tests for clarity and consistency.

  (basic_commit):   used to be "commit_from_wc_top"
  (basic_update):   used to be "update_from_wc_top"
  (basic_merge):    used to be "merge_from_wc_top"
  (basic_conflict): used to be "conflict_from_wc_top"

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839543 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMake sure this script returns an errorvalue to the operating system,
Ben Collins-Sussman [Mon, 18 Jun 2001 03:05:31 +0000 (18 03:05 +0000)]
Make sure this script returns an errorvalue to the operating system,
so that `make check` works properly.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839542 13f79535-47bb-0310-9956-ffa450edef68

21 years agoReexamine all our old tests. It seems like a whole bunch ought to be
Ben Collins-Sussman [Mon, 18 Jun 2001 00:51:29 +0000 (18 00:51 +0000)]
Reexamine all our old tests.  It seems like a whole bunch ought to be
removed, or fixed, or rewritten.

* build.conf

  ([test-scripts]): better document all scripts being run by `make
  check`.  Also, no need to run redundant checkout-test if we're
  running all the other XML tests.

  (Build Targets):  better documentation

  (Test Targets):  better documentation, categorize for later cleanup.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839541 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* svn_test_main.py: remove sanity check, it doesn't work. is there
Ben Collins-Sussman [Sun, 17 Jun 2001 20:34:51 +0000 (17 20:34 +0000)]
* svn_test_main.py:  remove sanity check, it doesn't work.  is there
  any way for a python module to "require" a certain version of python
  and error out gracefully?

  (client_test):  add resilience to bogus arguments.  script arg is
  either an integer or "list";  anything else (or no args) just runs
  all the tests.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839540 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFood for thought.
Karl Fogel [Sat, 16 Jun 2001 20:12:32 +0000 (16 20:12 +0000)]
Food for thought.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839539 13f79535-47bb-0310-9956-ffa450edef68

21 years agoWrap an outer directory around the Berkeley DB portion of a
Karl Fogel [Sat, 16 Jun 2001 19:47:34 +0000 (16 19:47 +0000)]
Wrap an outer directory around the Berkeley DB portion of a
repository, so we have an area inside the repository, yet outside the
Berkeley namespace, to use for our own purposes.

* fs.c (dir_empty): New helper func.
(svn_fs_create_berkeley): Create tiered repository.
(svn_fs_open_berkeley, svn_fs_berkeley_recover): Handle tiered
repository.
(svn_fs_delete_berkeley): Handle tiered repository, and use Ben's
apr_dir_remove_recursively() to remove the directory; no point having
two implementations of directory removal.
(check_apr): Removed, as it is now unused.

* fs.h (SVN_FS__REPOS_README, SVN_FS__REPOS_DB_DIR): New #defines.
(svn_fs_t): Update documentation of `env_path' member.

* svn_fs.h (svn_fs_create_berkeley): Document new error convention,
and change parameter name to `path' instead of `env'.  Interestingly
enough, it was already called `path' in the function definition.
(svn_fs_open_berkeley): Change parameter name to `path' instead of
`env', adjust doc string accordingly.  Suspiciously enough, it was
already called `path' in the function definition.
(svn_fs_berkeley_recover): Adjust doc string to refer to `path'
instead of `env'.  Provocatively enough, it was already called `path'
in both the prototype and the definition.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839538 13f79535-47bb-0310-9956-ffa450edef68

21 years agoLittle tweaks.
Ben Collins-Sussman [Fri, 15 Jun 2001 17:07:03 +0000 (15 17:07 +0000)]
Little tweaks.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839537 13f79535-47bb-0310-9956-ffa450edef68

21 years agoPoint to developer installation instructions.
Karl Fogel [Fri, 15 Jun 2001 17:00:25 +0000 (15 17:00 +0000)]
Point to developer installation instructions.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839536 13f79535-47bb-0310-9956-ffa450edef68

21 years agoHeavily update this file. It had fallen way behind in documenting the
Ben Collins-Sussman [Fri, 15 Jun 2001 16:59:39 +0000 (15 16:59 +0000)]
Heavily update this file.  It had fallen way behind in documenting the
current state of our testing systems.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839535 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFinish conversion to Greg Stein's new error system:
Karl Fogel [Fri, 15 Jun 2001 16:23:36 +0000 (15 16:23 +0000)]
Finish conversion to Greg Stein's new error system:

* svn_error.h: Get rid of old system, add comments for new one.
(svn_strerror): Document new behavior.

* svn_error.c: Got rid of top-level conditionals.
(svn_handle_error): Use the new system.
(svn_strerror): Removed old implementation of this function.
(set_error_hash, initialize_svn_error_descriptions): Removed.

* svn_error_codes.h: Added explanatory comment.  Reformatted error
list and removed redundant comments.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839534 13f79535-47bb-0310-9956-ffa450edef68

21 years agoSo that the record may forever be kept in version control history,
C. Michael Pilato [Fri, 15 Jun 2001 05:07:57 +0000 (15 05:07 +0000)]
So that the record may forever be kept in version control history,
the following tests (and the fact that they all passed as soon as they
were written) are a testament to the fact that Karl Fogel wrote the
entirety of the reps-table code seemingly without err.  Way to go, Karl!

* tests/libsvn_fs/strings-reps-test.c

  (rep_args): Renamed from write_new_rep_args.

  (txn_body_write_rep, txn_body_read_rep, txn_body_delete_rep): New
  helper-ish functions for representation table tests.

  (write_rep, read_rep, delete_rep): New representation table tests.

  (test_funcs): Now include write_rep, read_rep, and delete_rep.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839533 13f79535-47bb-0310-9956-ffa450edef68

21 years agoRevert previous accidental commit of in-progress work.
Karl Fogel [Thu, 14 Jun 2001 23:16:54 +0000 (14 23:16 +0000)]
Revert previous accidental commit of in-progress work.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839532 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(svn_wc_remove_from_revision_control): if this routine runs with the
Ben Collins-Sussman [Thu, 14 Jun 2001 22:34:50 +0000 (14 22:34 +0000)]
(svn_wc_remove_from_revision_control):  if this routine runs with the
`destroy' flag, it not only preserves local mods, but now unversioned
objects too.

No, no tests yet;  they'll be coming soon.  But Karl and I *did* find
an APR bug in apr_read_dir().  Will commit that fix tomorrow morning.
.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839531 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFix obsolete comment.
Karl Fogel [Thu, 14 Jun 2001 20:24:45 +0000 (14 20:24 +0000)]
Fix obsolete comment.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839530 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* tests/libsvn_fs/strings-reps-test.c
C. Michael Pilato [Thu, 14 Jun 2001 17:41:22 +0000 (14 17:41 +0000)]
* tests/libsvn_fs/strings-reps-test.c

  (write_new_rep): Don't use illegal characters in your skels, please.
  Double-quotes are disallowed per the table in skel.c.

* tests/libsvn_fs/.cvsignore

  (strings-reps-test): Ignore me.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839529 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMike Pilato here, using Karl's computer.
Karl Fogel [Thu, 14 Jun 2001 17:20:25 +0000 (14 17:20 +0000)]
Mike Pilato here, using Karl's computer.

* tests/libsvn_fs/strings-reps-test.c

  New test file.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839528 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_wc/adm_crawler.c
C. Michael Pilato [Thu, 14 Jun 2001 17:07:52 +0000 (14 17:07 +0000)]
* libsvn_wc/adm_crawler.c

  (crawl_dir): Oops!  Forgot to set the adds_only variable when I
  supposed to do so.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839527 13f79535-47bb-0310-9956-ffa450edef68

21 years ago*** empty log message ***
Karl Fogel [Thu, 14 Jun 2001 16:28:58 +0000 (14 16:28 +0000)]
*** empty log message ***

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839526 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* subversion/libsvn_fs/reps-table.h (svn_fs__write_rep,
Karl Fogel [Thu, 14 Jun 2001 16:28:57 +0000 (14 16:28 +0000)]
* subversion/libsvn_fs/reps-table.h (svn_fs__write_rep,
svn_fs__write_new_rep): Prototype fixes.

* subversion/libsvn_fs/reps-table.c (svn_fs__write_new_rep):
Implement.
(svn_fs__open_reps_table): Initialize the "next-key" entry.

* subversion/libsvn_fs/strings-table.h (svn_fs__new_string_stream):
New func.

* subversion/libsvn_fs/strings-table.c (svn_fs__new_string_stream):
Implement.

* subversion/libsvn_fs/key-gen.h (svn_fs__next_key_key): Replaces
`next_key_key', doc fix.  All references changed.

New tests for strings and representations interfaces:

* subversion/tests/libsvn_fs/strings-reps-test.c: New file.

* build.conf (strings-reps-test): New target.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839525 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFixes for the commit process, allowing commits of a single directory
C. Michael Pilato [Thu, 14 Jun 2001 16:01:46 +0000 (14 16:01 +0000)]
Fixes for the commit process, allowing commits of a single directory
to actually commit that directory (not just the things in it).

* include/svn_wc.h

  (svn_wc_get_actual_target): renamed from svn_wc_get_actual_update_target.

* libsvn_wc/adm_crawler.c

  (struct target_baton): No longer need prop_modified_p.

  (struct stack_object): Added a pool to this structure (so we
  don't have to pass this through all the recursion layers).

  (push_stack, pop_stack): Use new pool.

  (do_dir_replaces): No longer need temporarily pool.

  (do_dir_closures, do_apply_textdelta, do_prop_deltas): Code
  formatting/cleanup.

  (report_single_mod): New function, code broken out from old
  report_local_mods.

  (crawl_dir): Was report_local_mods.

  (svn_wc_crawl_local_mods): Modified to allow for commits of single
  directories.

* libsvn_client/commit.c

  (svn_client_commit): Use svn_wc_get_actual_target to get a valid
  base_dir and target when committing a single target.

* clients/cmdline/commit-cmd.c

  (svn_cl__commit): Use svn_wc_get_actual_target to calculate the
  base_dir the same way that svn_client_commit does.

* clients/cmdline/update-cmd.c

  (svn_cl__update): svn_wc_get_actual_target renamed from
  svn_wc_get_actual_update_target.

* libsvn_wc/get_editor.c

  (svn_wc_get_actual_target): renamed from svn_wc_get_actual_update_target.

  (make_editor): svn_wc_get_actual_target renamed from
  svn_wc_get_actual_update_target.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839524 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* tests/clients/cmdline/local_tests.py
C. Michael Pilato [Thu, 14 Jun 2001 15:51:19 +0000 (14 15:51 +0000)]
* tests/clients/cmdline/local_tests.py

  (run_and_verify_commit): Don't try to pop from an empty array!

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839523 13f79535-47bb-0310-9956-ffa450edef68

21 years agoCheck in a new error string system, per discussion on list.
Greg Stein [Thu, 14 Jun 2001 09:48:52 +0000 (14 09:48 +0000)]
Check in a new error string system, per discussion on list.

NOTE: this is /not/ enabled yet (no obvious conclusions on the list yet).
tweak svn_error.h to define TEST_ALTERNATE_ERROR_SYSTEM to try it out

* include/svn_error.h: include svn_error_codes.h to pick up the enumerated
    constants. use a different signature for svn_strerror()

* include/svn_error_codes.h: new file. this file defines all of the custom
    error codes (when normally included). svn_error.c includes it with a
    magic incantation to construct a lookup table instead.

* libsvn_subr/svn_error.c: redefine svn_strerror() with the new signature,
    and using the error_table[] array built by svn_error_codes.h. if the
    error isn't found, fall back to apr_strerror() (which will fill in a
    default if it doesn't know the error).

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839522 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* clients/cmdline/feedback.c
C. Michael Pilato [Wed, 13 Jun 2001 13:04:06 +0000 (13 13:04 +0000)]
* clients/cmdline/feedback.c

  Squashed some compiler warnings.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839521 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAnd the mother is back...
Greg Stein [Wed, 13 Jun 2001 09:10:36 +0000 (13 09:10 +0000)]
And the mother is back...

Change svn_string_FUNC to svn_stringbuf_FUNC.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839520 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_subr/svn_error.c
C. Michael Pilato [Wed, 13 Jun 2001 03:26:51 +0000 (13 03:26 +0000)]
* libsvn_subr/svn_error.c

  (initialize_svn_error_descriptions): Squash some compile warnings.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839519 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* svn_error.c (initialize_svn_error_descriptions): duh, we have to
Ben Collins-Sussman [Tue, 12 Jun 2001 21:43:47 +0000 (12 21:43 +0000)]
* svn_error.c (initialize_svn_error_descriptions):  duh, we have to
  *copy* the key before setting it in the hash.
  (set_error_hash):  new helper routine for this purpose.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839518 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* svn_error.c (initialize_svn_error_descriptions): new func - build a
Ben Collins-Sussman [Tue, 12 Jun 2001 20:48:58 +0000 (12 20:48 +0000)]
* svn_error.c (initialize_svn_error_descriptions): new func - build a
  hash table that maps svn errorcodes to english descriptions.

  (svn_strerror):  take a pool instead of stringbuf.  pass
  this pool to initialize_svn_error_descriptions() the first time this
  routine is called, and then cache the hash in a static variable
  thereafter.  use the hash for lookups.

  (svn_error_strings[]):  removed, now part of hash initialization.

* svn_error.h (svn_strerror):  update declaration.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839517 13f79535-47bb-0310-9956-ffa450edef68

21 years agoReally, truly fixing bug #388, the Right Way:
Ben Collins-Sussman [Tue, 12 Jun 2001 17:41:28 +0000 (12 17:41 +0000)]
Really, truly fixing bug #388, the Right Way:

* svn_delta.h, default_editor.c (abort_edit):  new editor function!
  Allows the editor-driver to inform the editor of a bailout, so that
  the editor can do cleanup if it needs to.  All editors now have a
  'dummy' version of this routine which does nothing.

* libsvn_client/commit.c (send_to_repos):  if import() or
  svn_wc_crawl_local_mods() returns an error, call editor->abort_edit().

* compose_editors.c (abort_edit):  write a composed version of this
  new routine.
  (svn_delta_compose_editors):  add pointer to composed abort_edit.

* svn_repos.h (svn_repos_get_commit_txn):  removed.  this was a Bad Idea.

* commit_editor.c (svn_repos_get_commit_txn):  removed.

  (abort_edit):  this is the only non-dummy version of this editor
  routine.  It actually calls svn_fs_abort_txn().

  (svn_repos_get_editor):  add abort_edit to editor.

* svn_ra.h (abort_commit):  remove this RA interface, no longer needed.

* libsvn_ra_local/ra_plugin.c (abort_commit):  removed.
  (ra_local_plugin):  remove abort_commit.

* libsvn_ra_dav/session.c (dav_plugin):  remove svn_ra_dav__abort_commit

* libsvn_ra_dav/commit.c (svn_ra_dav__abort_commit):  removed.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839516 13f79535-47bb-0310-9956-ffa450edef68

21 years agoReviewing at Ben's request:
Karl Fogel [Tue, 12 Jun 2001 17:35:53 +0000 (12 17:35 +0000)]
Reviewing at Ben's request:

(Committing additions): More precise behavior description.

(Additions from updates): Clarification.

(Removing items): More precise behavior descriptions, some wording
tweaks.

(Committing removals): Typos (fixed, not added, that is).

(Removals in updates): More precise behavior description.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839515 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFix typo.
Karl Fogel [Tue, 12 Jun 2001 15:55:25 +0000 (12 15:55 +0000)]
Fix typo.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839514 13f79535-47bb-0310-9956-ffa450edef68

21 years agoBugfix for #388: If the client wants to bail during a commit, tell the
Ben Collins-Sussman [Tue, 12 Jun 2001 01:43:36 +0000 (12 01:43 +0000)]
Bugfix for #388: If the client wants to bail during a commit, tell the
RA layer about it (...so it can call svn_fs_abort_txn().)

* svn_ra.h (svn_ra_plugin_t->abort_commit):  new RA vtable func.

* svn_repos.h, commit_editor.c (svn_repos_get_commit_txn): new func to
  return the the fs_txn within the edit_baton.  libsvn_ra_local needs
  this to abort the txn.
  (svn_repos_get_editor):  set eb->txn to NULL for paranoia's sake.

* libsvn_ra_local/ra_plugin.c (abort_commit):  implement new RA func.
  (ra_local_plugin):  add abort_commit to static vtable.

* libsvn_ra_dav/commit.c ra_dav.h (svn_ra_dav__abort_commit): dummy
  version of new RA func.

* libsvn_ra_dav/session.c (dav_plugin): add svn_ra_dav___abort_commit
  to static vtable.

* libsvn_client/commit.c (send_to_repos): call ra->abort_commit if the
  editor-driver chokes during either a commit or an import.  That's
  the whole point of all this.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839513 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFix bug #392: print human-readable descriptions of svn error-codes.
Ben Collins-Sussman [Tue, 12 Jun 2001 00:24:38 +0000 (12 00:24 +0000)]
Fix bug #392:  print human-readable descriptions of svn error-codes.
(Finally!)

* svn_error.h (svn_strerror):  declare.

* svn_error.c (svn_error_strings):  monstrous table of strings that
  describe svn-specific errorcodes.

  (svn_strerror):  new func to lookup SVN error descriptions.

  (svn_handle_error):  call *both* svn_strerror() and apr_strerror().

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839512 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(add_or_replace_file): rewrite the sanity checks. It's okay to add a
Ben Collins-Sussman [Mon, 11 Jun 2001 20:53:34 +0000 (11 20:53 +0000)]
(add_or_replace_file):  rewrite the sanity checks.  It's okay to add a
file already in `entries', but it's *not* okay to add a file if an
dirent of the same name already exists on disk.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839511 13f79535-47bb-0310-9956-ffa450edef68

21 years agoMake the update-reporter use the feedback vtable to report unversioned
Ben Collins-Sussman [Mon, 11 Jun 2001 17:35:04 +0000 (11 17:35 +0000)]
Make the update-reporter use the feedback vtable to report unversioned
items.  (i.e. no more printf() inside libsvn_wc. :) )

Again, the joint work of Mssrs. Pilato and Collins-Sussman.

* svn_pools.h (svn_pool_feedback_t):  add apr_status_t to report_warning().

* svn_error.c (report_warning):  adjust dummy func.

* cl.h, feedback.c (svn_cl__init_feedback_vtable):  new func called by main().

* main.c (main):  call svn_cl__init_feedback_vtable.

* adm_crawler.c (svn_wc_crawl_revisions):  get feedback table, pass it down.
  (report_revisions):  now accepts feedback table as arg, uses it to
  report unversioned items.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839510 13f79535-47bb-0310-9956-ffa450edef68

21 years agoUn-do the feedback stream stuff, Do-do the feedback vtable stuff. A
C. Michael Pilato [Mon, 11 Jun 2001 16:10:49 +0000 (11 16:10 +0000)]
Un-do the feedback stream stuff, Do-do the feedback vtable stuff.  A
"Collab"-orative effort by Ben Collins-Sussman and C-Mike Pilato.

* subversion/include/svn_pools.h

  (svn_pool_feedback_t): New vtable for returning feedback to client.

  (svn_pool_get_feedback_vtable): New function prototype.

  (svn_pool_get_feedback_stream): Removed obsolete function prototype.

* subversion/libsvn_subr/svn_error.c

  (SVN_ERROR_FEEDBACK_VTABLE): New hash key for global feedback
  vtable.

  (SVN_ERROR_STREAM): Removed unused hash key.

  (svn_pool_get_feedback_vtable): New function.

  (svn_pool_get_feedback_stream): Removed obsolete function.

  (svn_error_init_pool, svn_pool_create, svn_pool_clear): No longer
  care about feedback streams.  We're doing vtable stuff now!

  (report_unversioned_item, report_warning, report_progress): Dummy
  functions for default svn_pool_feedback_t allocations.

* subversion/tests/libsvn_subr/stream-test.c

  Obsolete file removed.

* build.conf

  (stream_test): ...is no more.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839509 13f79535-47bb-0310-9956-ffa450edef68

21 years agoTesting CVS commit access for Daniel Steinberg. -dlr@collab.net
daniel [Mon, 11 Jun 2001 16:10:10 +0000 (11 16:10 +0000)]
Testing CVS commit access for Daniel Steinberg. -dlr@collab.net

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839508 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAnother filesytem requirement for M3.
Ben Collins-Sussman [Mon, 11 Jun 2001 15:41:41 +0000 (11 15:41 +0000)]
Another filesytem requirement for M3.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839507 13f79535-47bb-0310-9956-ffa450edef68

21 years agoTweak fuzzy status bars.
Ben Collins-Sussman [Mon, 11 Jun 2001 14:48:36 +0000 (11 14:48 +0000)]
Tweak fuzzy status bars.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839506 13f79535-47bb-0310-9956-ffa450edef68

21 years agoUpdating status page.
Ben Collins-Sussman [Mon, 11 Jun 2001 14:45:52 +0000 (11 14:45 +0000)]
Updating status page.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839505 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAdd freebsd 4.3.
Ben Collins-Sussman [Mon, 11 Jun 2001 14:02:22 +0000 (11 14:02 +0000)]
Add freebsd 4.3.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839504 13f79535-47bb-0310-9956-ffa450edef68

21 years agoChange the "data" member in the skel_t to a "const char *". Change parameter
Greg Stein [Mon, 11 Jun 2001 10:49:05 +0000 (11 10:49 +0000)]
Change the "data" member in the skel_t to a "const char *". Change parameter
type of svn_fs__mem_atom to include a const.

* node-rev.c (svn_fs__put_node_revision): remove an unneeded cast

* proplist.c (svn_fs__set_prop): remove unneeded casts

* skel.c (parse, list, implicit_atom, explicit_atom): add a "const" to the
    data parameter. add const to some local variables.
  (explicit_atom, svn_fs__str_atom): remove unneeded casts
  (svn_fs__mem_atom): add "const" to the "addr" parameter

* skel.h (struct skel_t): add "const" to the "data" member
  (svn_fs__mem_atom): add "const" to the "addr" parameter

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839503 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(svn_fs__make_prop_hash): The data member in a skel_t refers directly to the
Greg Stein [Mon, 11 Jun 2001 03:37:59 +0000 (11 03:37 +0000)]
(svn_fs__make_prop_hash): The data member in a skel_t refers directly to the
  content in a skel string from the DB. The values are not null-terminated.
  We put the values into an apr_hash_t with the correct length (thus, they
  are hashed properly). However, we specified these as char* (with the
  commensurate expectation of them being null-terminated); an
  apr_hash_this() to extract the string could give you something that isn't
  null-terminated.

  Null-terminate the key by copying it.

  (conceivably, an alternative is to clarify the spec that the proplist hash
   has non-terminated byte sequences, and avoid the copy)

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839502 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(node_props): the property values were placed into the wrong string
Greg Stein [Mon, 11 Jun 2001 03:30:09 +0000 (11 03:30 +0000)]
(node_props): the property values were placed into the wrong string
   structure (and broke test 14).

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839501 13f79535-47bb-0310-9956-ffa450edef68

21 years agoChange some FS interfaces over to use the new svn_string_t rather than
Greg Stein [Mon, 11 Jun 2001 02:50:33 +0000 (11 02:50 +0000)]
Change some FS interfaces over to use the new svn_string_t rather than
svn_stringbuf_t.

* include/svn_fs.h (svn_fs_txn_prop, svn_fs_change_txn_prop,
    svn_fs_node_prop, svn_fs_change_node_prop, svn_fs_revision_prop,
    svn_fs_change_rev_prop): change property name and value (input)
    parameters to use "const svn_string_t *".
    (note: the outputs are still svn_stringbuf_t)

* libsvn_fs/proplist.[ch] (svn_fs__get_prop, svn_fs__set_prop): change name
    value value (input) parameters to use "const svn_string_t *".

* libsvn_fs/rev-table.c (struct revision_prop_args): change propname type
  (svn_fs_revision_prop): change propname parameter type
  (struct change_rev_prop_args): change name, value types
  (svn_fs_change_rev_prop): change name, value types

* libsvn_fs/skel.[ch] (svn_fs__atom_matches_string): change str param type

* libsvn_fs/tree.c (struct node_prop_args): change propname type
  (svn_fs_node_prop): change propname param type
  (struct change_node_prop_args): change name, value types
  (svn_fs_change_node_prop): change name, value types

* libsvn_fs/txn-table.c (struct txn_prop_args): change propname type
  (svn_fs_txn_prop): change propname param type
  (struct change_txn_prop_args): change name, value types
  (svn_fs_change_txn_prop): change name, value types

* libsvn_repos/commit-editor.c (struct edit_baton): change log_msg member
    from svn_stringbuf_t* to svn_string_t.
  (change_file_prop, change_dir_prop): construct svn_string_t structures
    from NAME and VALUE and pass the structures to svn_fs_change_node_prop.
  (close_edit): construct PROPNAME variable as an svn_string_t and pass it
    to svn_fs_change_txn_prop(). tweak passing of log_msg.
  (svn_repos_get_editor): construct eb->log_msg a bit differently

* mod_dav_svn/deadprops.c (dav_svn_db_fetch, dav_svn_db_store,
    dav_svn_db_remove, dav_svn_db_exists): construct and pass svn_string_t
    instead of an svn_stringbuf_t structure.

* tests/libsvn_fs/fs-test.c (call_functions_with_unopened_fs,
    revision_props, transactions_props, node_props): construct and pass
    svn_string_t structures instead of svn_stringbuf_t.

* tests/libsvn_repos/dir-delta-editor.c (test_change_file_prop,
    test_change_dir_prop): construct and pass svn_string_t structures
    instead of svn_stringbuf_t.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839500 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAdd #include "svn_pools.h" to get these files to compile cleanly.
Greg Stein [Mon, 11 Jun 2001 02:22:08 +0000 (11 02:22 +0000)]
Add #include "svn_pools.h" to get these files to compile cleanly.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839499 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAdd new svn_string_t datatype and a bunch of commentary of the two types.
Greg Stein [Mon, 11 Jun 2001 00:39:10 +0000 (11 00:39 +0000)]
Add new svn_string_t datatype and a bunch of commentary of the two types.

Some simple white space changes (reindenting).

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839498 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFix cut/paste typo. INSTALL_APACHE_RULE should be install-mods-shared for
Greg Stein [Sun, 10 Jun 2001 23:47:50 +0000 (10 23:47 +0000)]
Fix cut/paste typo. INSTALL_APACHE_RULE should be install-mods-shared for
the shared case.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839497 13f79535-47bb-0310-9956-ffa450edef68

21 years agoAlways subst SVN_DB_INCLUDES and SVN_DB_LIBS.
Branko Cibej [Sun, 10 Jun 2001 21:17:00 +0000 (10 21:17 +0000)]
Always subst SVN_DB_INCLUDES and SVN_DB_LIBS.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839496 13f79535-47bb-0310-9956-ffa450edef68

21 years agoIf update reporter chokes, it should no longer leave an orphaned fs
Ben Collins-Sussman [Sat, 9 Jun 2001 12:36:08 +0000 (9 12:36 +0000)]
If update reporter chokes, it should no longer leave an orphaned fs
transaction.

* svn_ra.h (abort_report):  new reporter func, allows report-driver to
  tell the RA layer to destroy the fs transaction.

* svn_repos.h, reporter.c (svn_repos_abort_report):  simple func calls
  svn_fs_abort_txn().

* libsvn_ra_local/ra_plugin.c (ra_local_reporter): add pointer to
  svn_repos_abort_report().

* libsvn_ra_dav/fetch.c (reporter_abort_report):  add dummy func.
  gstein, see its comment.
  (ra_dav_reporter):  add pointer to reporter_abort_report.

* adm_crawler.c (svn_wc_crawl_revisions): if report_revisions()
  returns error, call abort_report().  That's the whole point of all this.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839495 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(report_revisions): make the `?'-printing algorithm less stupid. :)
Ben Collins-Sussman [Sat, 9 Jun 2001 03:39:42 +0000 (9 03:39 +0000)]
(report_revisions):  make the `?'-printing algorithm less stupid.  :)

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839494 13f79535-47bb-0310-9956-ffa450edef68

21 years agoFinish fix for bug #337:
Ben Collins-Sussman [Sat, 9 Jun 2001 03:04:35 +0000 (9 03:04 +0000)]
Finish fix for bug #337:
Updates now notice missing items and re-add them, and print '?'  next
to unversioned items.

Note:  the 'auto-replacement' trick only works with ra_local right
now, not yet ra_dav.

* svn_io.h (svn_io_get_dirents):  new helper function.

* io.c (svn_io_get_dirents):  implement.

* adm_crawler.c (report_revisions):  big rewrite -- compare SVN
  entries against actual dirents.

* get_editor.c (add_or_replace_file):  remove the sanity check in this
  function, as it was preventing files from being re-added.  see the
  comments in the code.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839493 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* tests/libsvn_fs/.cvsignore
C. Michael Pilato [Fri, 8 Jun 2001 21:35:39 +0000 (8 21:35 +0000)]
* tests/libsvn_fs/.cvsignore

  Ignore key-test binary.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839492 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* libsvn_wc/entries.c
C. Michael Pilato [Fri, 8 Jun 2001 21:33:57 +0000 (8 21:33 +0000)]
* libsvn_wc/entries.c

  (check_entries): New svn_stringbuf_t is what I *really* wanted here!

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839491 13f79535-47bb-0310-9956-ffa450edef68

21 years agoBig Ol' Change: Moved pool-related function prototypes into new
C. Michael Pilato [Fri, 8 Jun 2001 21:31:23 +0000 (8 21:31 +0000)]
Big Ol' Change: Moved pool-related function prototypes into new
include file, svn_pools.h.  This was done to solve some circular
dependency issues related another change -- the addition of an
svn_stream_t to the userdata of SVN pools.  Dubbed the "feedback
stream", this stream provides a way for any function with access to a
Subversion pool to send bytes out to whoever may want them, and is
scheduled to be used for non-fatal warnings and such.

In the future, this mechanism may be replaced by a function v-table to
optimize data transmission (why package up in a string protocol data
that is just going to be unpackaged by in-process methods?)

* subversion/include/svn_pools.h

  New header file for pool-related function prototypes.

* subversion/tests/libsvn_subr/stream-test.c

  New file for stream-related tests.  Current contains just the one
  test for the feedback stream, but your contributions and patches are
  welcome....

* subversion/tests/libsvn_subr/.cvsignore

  Please ignore the generated stream-test binary.

* build.conf

  (stream-test): New section for stream-test test.

* subversion/include/svn_error.h

  Big change:  Moved pool-related prototypes and related epic
  storytelling to new file, svn_pools.h.

  (SVN_ERR_WC_CORRUPT): New error type for corrupted working copies.

* subversion/libsvn_subr/svn_error.c

  (SVN_ERROR_STREAM): New key into pool's userdata for the feedback
  stream.

  (svn_pool_get_feedback_stream): New function for retrieving the
  feedback stream from a pool.

  (svn_error_init_pool, svn_pool_create, svn_pool_clear): Keep the new
  feedback stream in mind when creating and destroying pools.

* subversion/include/svn_io.h
* subversion/libsvn_subr/io.c

  (svn_stream_dup): New function for duplicating streams.

  (svn_stream_set_baton): New accessor function for setting the baton
  associated with a stream (just in case you didn't have one handy at
  stream creation time).

* subversion/clients/cmdline/main.c
* subversion/clients/cmdline/trace-update.c
* subversion/libsvn_client/add.c
* subversion/libsvn_client/commit.c
* subversion/libsvn_delta/svndiff.c
* subversion/libsvn_delta/text_delta.c
* subversion/libsvn_delta/xml_output.c
* subversion/libsvn_delta/xml_parse.c
* subversion/libsvn_fs/dag.c
* subversion/libsvn_fs/fs.c
* subversion/libsvn_fs/trail.c
* subversion/libsvn_fs/tree.c
* subversion/libsvn_fs/txn.c
* subversion/libsvn_ra_dav/commit.c
* subversion/libsvn_ra_local/checkout.c
* subversion/libsvn_ra_local/ra_plugin.c
* subversion/libsvn_ra_local/split_url.c
* subversion/libsvn_repos/commit_editor.c
* subversion/libsvn_repos/delta.c
* subversion/libsvn_subr/base64.c
* subversion/libsvn_subr/quoprint.c
* subversion/libsvn_subr/target.c
* subversion/libsvn_subr/xml.c
* subversion/libsvn_wc/adm_crawler.c
* subversion/libsvn_wc/adm_ops.c
* subversion/libsvn_wc/get_editor.c
* subversion/svnadmin/main.c
* subversion/tests/fs-helpers.c
* subversion/tests/svn_tests_main.c
* subversion/tests/libsvn_delta/deltaparse-test.c
* subversion/tests/libsvn_delta/random-test.c
* subversion/tests/libsvn_delta/xml-output-test.c
* subversion/tests/libsvn_fs/fs-test.c
* subversion/tests/libsvn_fs/skel-test.c
* subversion/tests/libsvn_repos/repos-test.c
* subversion/tests/libsvn_wc/commit-test.c

  Now #include svn_pools.h

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839490 13f79535-47bb-0310-9956-ffa450edef68

21 years agoNew file; accidentally left out of previous commit.
Karl Fogel [Fri, 8 Jun 2001 21:25:59 +0000 (8 21:25 +0000)]
New file; accidentally left out of previous commit.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839489 13f79535-47bb-0310-9956-ffa450edef68

21 years ago* subversion/tests/libsvn_subr/path-test.c
C. Michael Pilato [Fri, 8 Jun 2001 21:05:17 +0000 (8 21:05 +0000)]
* subversion/tests/libsvn_subr/path-test.c

  Oops!  Forgot to edit a copied header docstring.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839488 13f79535-47bb-0310-9956-ffa450edef68

21 years agoIndex: libsvn_wc/entries.c
C. Michael Pilato [Fri, 8 Jun 2001 21:03:39 +0000 (8 21:03 +0000)]
Index: libsvn_wc/entries.c

  (check_entries): New validation function (this is a work in
  progress, part of a bigger picture that has not yet been painted.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839487 13f79535-47bb-0310-9956-ffa450edef68

21 years ago(send_response): ap_fputstrs() now returns an apr_status_t. toss the
Greg Stein [Fri, 8 Jun 2001 20:49:57 +0000 (8 20:49 +0000)]
(send_response): ap_fputstrs() now returns an apr_status_t. toss the
  comment, and bring back the status checking code.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839486 13f79535-47bb-0310-9956-ffa450edef68

21 years agoHelper routine and tests for sequential key generation in the
Karl Fogel [Fri, 8 Jun 2001 20:27:32 +0000 (8 20:27 +0000)]
Helper routine and tests for sequential key generation in the
`representations' and `strings' tables, plus a minor reorganization to
put all key manufacturing in one place:

* convert-size.h, convert-size.c: Renamed, see below.

* key-gen.h, key-gen.c: Replace convert-size.h, convert-size.c.

* id.c, skel.c, txn-table.c: #include key-gen.h instead of
convert-size.h.

* key-gen.h (next_key_key): Declare extern.
(svn_fs__next_key): New declaration.

* key-gen.c (next_key_key): Define.
(svn_fs__next_key): New func.

* key-test.c: New file, tests svn_fs__next_key.

* run-fs-tests.sh: Run `key-test' program.

* build.conf (key-test): New target.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@839485 13f79535-47bb-0310-9956-ffa450edef68