#
# add_file "contrib/monotone-cvs-ignore.lua"
#
# add_file "contrib/parse-accounting.pl"
#
# add_file "contrib/perf-test.sh"
#
# add_file "tests/t_automate_get_file.at"
#
# add_file "tests/t_automate_get_manifest.at"
#
# add_file "tests/t_automate_get_revision.at"
#
# add_file "tests/t_mt_ignore.at"
#
# add_file "tests/t_unreadable_db.at"
#
# patch ".mt-attrs"
# from [8287c8c8f48067074ca9e114e6aec78129343f60]
# to [f64f76c6bd0167f72362edd8c47724dffbe31907]
#
# patch "ChangeLog"
# from [5387993cd1182600f3f4459588e89af64f7feb59]
# to [50802639ded49c79d2f4bbfa018f0adb56206858]
#
# patch "Makefile.am"
# from [8aefb7ba1e9e19ac619b8828bbcdd8106ee3e7fa]
# to [4fdc45d300225991df7992a71cedf7936a7d76b5]
#
# patch "annotate.cc"
# from [583bfb6d988073642e901dfa36d85c7c44c4ca37]
# to [613ae82123687d6e26b088c8f769d4efe9abd3fa]
#
# patch "automate.cc"
# from [b110377e8696e41dda47f78a8486b649b4743c5a]
# to [5b96e0ff436ae87bdb8bd25121cd53a522af80d6]
#
# patch "basic_io.cc"
# from [59d07d48475fc4a7d1a5301f162fdb7245bbab62]
# to [3c575f5fd41d00730c3a0a9eafe84105fa51f28a]
#
# patch "botan/allocate.cpp"
# from [bf95f795b13f03947041d16bae44b936d914f30d]
# to [8222a5340314265755a2b79469a367158fc2f99b]
#
# patch "cert.cc"
# from [7375c4ce0944680b0b1347414d653139f6c828c7]
# to [43de7f5240b7caa27fc590630afe3ffeea0bfa0b]
#
# patch "commands.cc"
# from [3176e0a5397306096cf3ad3da067252881ddb413]
# to [55800638c9bd2da0aa48ab46d06beba1d5845c32]
#
# patch "configure.ac"
# from [84632e90c32942348f38e80ec5d0e47baed43ad4]
# to [289e0cb6ea26e1a8e515e7f81626a49e77381d69]
#
# patch "contrib/monotone-cvs-ignore.lua"
# from []
# to [9d8fe793ab5c6f3a5c21f534ceedea2796ee58eb]
#
# patch "contrib/parse-accounting.pl"
# from []
# to [4b8d042f81fbd18ab8efeedaf705fb5854e31e18]
#
# patch "contrib/perf-test.sh"
# from []
# to [37672e98ef9148f8aef18ac7a520139d8de860d9]
#
# patch "database.cc"
# from [99621dc8dd3b871fc41204945906db116111519d]
# to [04b7bf7f3d9722bb194a0623a339babc83d95c74]
#
# patch "file_io.cc"
# from [a887c87104212bab175b54ec1ceb1fa5153024e5]
# to [e39a1c13030c5378ea4cb3aa9621148ce0c8fb7d]
#
# patch "file_io.hh"
# from [f104a889390ecd8eb031a56a81862cfef3aec01a]
# to [16f383f0e4eb6fa8454fce1071880f066fc69bdb]
#
# patch "keys.cc"
# from [444db9ef45da738d82da852b28e12e3c378b6d7e]
# to [cf21506cfc9735f800dccf4d1c3b575fa97bab90]
#
# patch "keys.hh"
# from [3618c073f57fdabfaf53fbf596c4d7d324aa2be5]
# to [16c620ec000b13c0ef656a92a59c18660d4c1aaf]
#
# patch "lua.cc"
# from [60a450c0fcb35a460fdfe3a6fe4d74b5dd9612e0]
# to [f8a4f1818ea770532218416cb55752238c1f3ce3]
#
# patch "main.cc"
# from [0f905ade02dd9188922f3c04700501c6f7d4b57d]
# to [ca8383ced00bdb686905f58eaeac7b1446347219]
#
# patch "monotone.cc"
# from [eb094c5de51330e85c983f50a0f93ad8dce047eb]
# to [21176c710f4d646215c27d82b55f182830d13268]
#
# patch "monotone.texi"
# from [3abc599a9ba2f2739baafe5c4b147f7253488761]
# to [b9423f2c78e69bf6307613fd2c4efc81427a92b9]
#
# patch "netsync.cc"
# from [f3c3491e4db786749296f7f3e3b3461521191101]
# to [1a08b80949f7458e7868d09b0647dbdfd2f5d645]
#
# patch "packet.cc"
# from [ac38aac6e3209972c9417388914ddc795ed4a53a]
# to [407e15cf1c485e09665a372588be2f99491a17d7]
#
# patch "paths.cc"
# from [83dd54b6c048d9b009bbf910be0e8e4a994996c0]
# to [3ea54d2be240cc811a52130f6711f3c3ae410763]
#
# patch "paths.hh"
# from [0c935d21c18770ef295b3580e53b9171e124c80a]
# to [62c42e07a3d83608626a02cf57f7148c5c66b5a2]
#
# patch "po/Makevars"
# from [ba95e10f69eae3e0645b3146a2c70bfc991a0481]
# to [9f9d9179aaa8771ab4ddd5300c063d6a2f9e2f11]
#
# patch "po/fr.po"
# from [41fc7b72e3b2c116bdded67313dde960bae9eea4]
# to [2385bcc193a5aa321863cda06106737be42a1bee]
#
# patch "revision.cc"
# from [5a02450e4801bc630e837aa9726cfb4d36b2e3a6]
# to [278be7ae9f1e835cf402808d651e5a1d1a49d72f]
#
# patch "sanity.cc"
# from [7b3c21bc6bcc1b0b365d7ba19a1c06377a7b3cbe]
# to [d43cf000a18c156b97527e0724635b050159d16d]
#
# patch "sanity.hh"
# from [f9cefbfdafc2280724a4214c250108851a56d34d]
# to [4b60e04581e65bb1426c17f8807b37ec0e7775d8]
#
# patch "schema.sql"
# from [ac99524347304a61fe2d857bc45d1bcca73adb6e]
# to [513edf45fe7238d23513b7062d965000271e2d67]
#
# patch "std_hooks.lua"
# from [0408707bb6b97eae7f8da61af7b35364dbd5a189]
# to [3aa6ea33c6bbb6e43c63dd4ff8ed353f3b9d4ce3]
#
# patch "tests/t_add_dot.at"
# from [f7f04114039217d33e5b589f8daaf926aed40a03]
# to [70227719dce0b158824f846a8f7a529a7f85dced]
#
# patch "tests/t_add_edge.at"
# from [11b5bb7be4a2dbe66cd94999b1ec9fd1c34f5b30]
# to [d0c5635df674fdc6c33d5d66a0e144398e995b04]
#
# patch "tests/t_add_stomp_file.at"
# from [5bbd2eb4c43a8400477107da7c242e63596650b3]
# to [1e74d89b26c8f9b81662ecda31737f65e9f97223]
#
# patch "tests/t_add_vs_commit.at"
# from [92280abe24d27ced1ce60d8b8e87efc310be4550]
# to [de9cf601f5c2c74d2432eb4fc0531d7a572cd673]
#
# patch "tests/t_annotate_branch_collision.at"
# from [9109836cbf4011c18f3f9645894c2b72acd5690b]
# to [261f44d7235b02fd6e7cdcbae76866f5ab60ff81]
#
# patch "tests/t_attributes.at"
# from [0375bcb4411006f5b6c0e6a72b92b568ace844f5]
# to [f9a21f085de7224b35dd7df5c1ea1ce8ae6746c2]
#
# patch "tests/t_automate_get_file.at"
# from []
# to [57d34789ad2ede0a5233cdc4f06d0674bb2f3816]
#
# patch "tests/t_automate_get_manifest.at"
# from []
# to [58ea47a574d79d2409180521b88dd7a311eb918e]
#
# patch "tests/t_automate_get_revision.at"
# from []
# to [594fa8320e2c194967de5f22386809f5c9f9cc14]
#
# patch "tests/t_cat_file_by_name.at"
# from [45f9704b56b2b74f16c5579539bc1c6f777b1e56]
# to [a8bd5077ca1e36b9ce1082c3b844603afdfea3ea]
#
# patch "tests/t_change_empty_file.at"
# from [207dd154775a8ff419370bbfd7099f118618010f]
# to [692dcb0629167d5f44981d62347bfb14b50ef9a6]
#
# patch "tests/t_commit_message_file.at"
# from [aa49a6a98a40d510813800cd39cf9ae399bef4ed]
# to [447a09a7a56815e3298f30a6c84a89882340c029]
#
# patch "tests/t_cvsimport.at"
# from [a212a3cbc77e3bd78bb0bf4aea478769c93dc6d6]
# to [cdb0a29f99f219dd5c2f4ebb2f3da47003ca10d7]
#
# patch "tests/t_cvsimport_deleted_invar.at"
# from [4ee87dff9e284fdf7abf6ca72616c55b32f39a3d]
# to [f6cef14b364d39403eaf99f2a18ad255047f4ca7]
#
# patch "tests/t_cvsimport_drepper.at"
# from [5b803327cc8752bab50ced9a0efc4ce59a5244ef]
# to [99b2dc609f08a0dfa0649226a11951534ce6c743]
#
# patch "tests/t_cvsimport_drepper2.at"
# from [530e44ff587e4ad3ce3ca95026f1990f505c8e5e]
# to [6cbbd86a7d4476646de2b9db9a6bbaf199296701]
#
# patch "tests/t_cvsimport_manifest_cycle.at"
# from [57d28d7204339cc9645554b6e5d47fd8128c46c7]
# to [690f76368733c0e909bde2a46f8edea144f7569b]
#
# patch "tests/t_cvsimport_samelog.at"
# from [e7c5ee56f45b0da54ace0fb9282c19604104610d]
# to [ccac785c1ac8421e23723f4cdd9e69ce10be7e93]
#
# patch "tests/t_database_check.at"
# from [208a81e56219fc72a6db6330841255baab90824b]
# to [7cd1598d68805979e7b435a58dede713dc38ad25]
#
# patch "tests/t_db_kill_rev_locally.at"
# from [a5043ae56c1d9ab1897594010d21b5e0851e572c]
# to [dba54fa06f40b817e7123cd375b78b96f62a4d43]
#
# patch "tests/t_db_with_dots.at"
# from [0d250a8d8d44ce0a4edd501284c2d1875df03be3]
# to [69973200a20d087bb2701a5c5e8c927ae54e53d2]
#
# patch "tests/t_empty_id_completion.at"
# from [e44949007099f908f22a84276bf5e9d1ae85cf74]
# to [d7e0f49748fa33fcfa33f847b82308a84d1965bd]
#
# patch "tests/t_empty_path.at"
# from [c3c5137146a20ad3dd354795f69b8732822f5753]
# to [69085e1806dff5b9884401f0c64e02477f5a8b14]
#
# patch "tests/t_epoch.at"
# from [532fcc6bba04a62754b4bb1d6f1e3dda9c463c9f]
# to [f49f3179bd8a59fb961258f995af2b460afb4de4]
#
# patch "tests/t_epoch_server.at"
# from [cf758cee3e08a84d727df1b43815cc30737d4190]
# to [13e3ea41bf04d84ccfc2dcf5b6e4d6d6319c6241]
#
# patch "tests/t_epoch_unidirectional.at"
# from [5b50d219fc0b011f307d074ab09336f98c121c65]
# to [8a53bc343a7e48d20843b89a6e77c208de84c38c]
#
# patch "tests/t_erename.at"
# from [3bcc3d449a1759322fc3b24971d462bb57ad4b25]
# to [ef285c34d12c67627b9b6dee00c3957dbe46be12]
#
# patch "tests/t_existsonpath.at"
# from [fc7253fa711c37e25ffdd8e0aa90a631286926f5]
# to [4f555bc7a0c0f3d218a445d3fb78cdcf57147345]
#
# patch "tests/t_i18n_file.at"
# from [d2d853d11983314f03ef8703f42f3a8c95d7cde6]
# to [a788a76de1663a1ec1b9ef8d571763ed618f2b88]
#
# patch "tests/t_import.at"
# from [fdb19cf2022139b6c5beb598d138a5e9798cb23f]
# to [acd29dd84259e7d8d08e79c2567a66b78928c430]
#
# patch "tests/t_inodeprints_hook.at"
# from [eb998935bdbf72c58d8811a635c4609680e450c1]
# to [9ba633b9cd6acf2c4c7630336f4f9755e14a86ef]
#
# patch "tests/t_lua_includedir.at"
# from [06e756a957d1d330d347970c0c32def0936c7702]
# to [cfb180197cc358a2d4bf71385fa0fdc1b53058ed]
#
# patch "tests/t_merge2_add.at"
# from [a36d4d07a745cfbbf45ef17be18bdc0b55b77c42]
# to [5bd5c17172e802ab24a998462fd0dc1738b0716a]
#
# patch "tests/t_merge2_data.at"
# from [4325798fac860cb6563fc1de63d1570d16a2fa1e]
# to [198ef24b2d4ec9dfa4ba2328c403a832c7cfa4c2]
#
# patch "tests/t_merge_add_del.at"
# from [20f850e8ede0f7c4240c1f9cb21855f151f89df2]
# to [14ee39bb126bd3469017d27f471434e4429a33f9]
#
# patch "tests/t_movedel.at"
# from [b0825386b5bb4346194fbb6348d7706a313ee3b8]
# to [a3cf97dca10d5b59aeb7e995f13b2268ef1f4112]
#
# patch "tests/t_movepatch.at"
# from [83acbd4252c65f8826dab7107d478626f32243be]
# to [e7ef086e17d1348933f44acc0147cde8774450ca]
#
# patch "tests/t_mt_ignore.at"
# from []
# to [363081d16393e1244dd4d4347c1c63f19ba54e36]
#
# patch "tests/t_netsync.at"
# from [49202a1a3045c6f30e90cfcb4672b9df4dc7a772]
# to [31e8c678b935b657624d1ca98391efc8dbf921ad]
#
# patch "tests/t_netsync_exclude.at"
# from [5a8302a38e8e62edb41b4332822cf82458177d85]
# to [92742622e126083db8509144108ae006faed4867]
#
# patch "tests/t_netsync_exclude_default.at"
# from [11beeeb0a601ba2f06d47c89b228cdfbd3f660f9]
# to [e60e806f5ae6a160048081dccff8ce46c74b8551]
#
# patch "tests/t_netsync_globs.at"
# from [3dff1121e0e6897d4f16ed9141253806e5b65939]
# to [fdc7701de9af5a193798b8a25c745d8d15b62086]
#
# patch "tests/t_netsync_nocerts.at"
# from [fb066e2badcad62b3b9dfed65f9267ee54411b39]
# to [5b1e9d87f055a58f2c7d3ee0cfaed2e185469955]
#
# patch "tests/t_netsync_permissions.at"
# from [887e4062ab6faa6283d46f0b8dba342f898a23d0]
# to [2b2fdda0e34c5c71bad5451e5acdec7416f54162]
#
# patch "tests/t_netsync_read_permissions.at"
# from [0550bdeac357f6794dd4849b2f0c0ba05a8c6286]
# to [123e1ee25ec04d06cf8b221227e1456e38af732e]
#
# patch "tests/t_netsync_single.at"
# from [b3d48b1881c63ccb549d37726ae2d7144a856820]
# to [07187540f12b7fd8cf6ad91b02225c052745a011]
#
# patch "tests/t_netsync_unrelated.at"
# from [bdd90ebe0b092465055b16fff07ccdfe75b8f7a0]
# to [e267f934990722a892df9ef39c96c3407b327f03]
#
# patch "tests/t_normalized_filenames.at"
# from [204c06103e335f45230d94fc86ebcb686e6f7959]
# to [bf31f5c1d260142de5455950615209dbd4f9c9b7]
#
# patch "tests/t_persistent_server_keys_2.at"
# from [f974ca0aba33b2107a1fd7677ded50faa52b3a05]
# to [63a6ad1e1eebabf989fa1d061cb8194614caf134]
#
# patch "tests/t_persistent_server_revision.at"
# from [8418111484ba4aaf797db3626a697ec88f4d0f88]
# to [04fe8d8a529d07a8bfbb01e999bbbb99eecb254b]
#
# patch "tests/t_rcfile_dir.at"
# from [ef248856acc3362e65a272c54c8ce0131c3aae0f]
# to [f9aa64b4b4df88b80587b24a87f1d77408a7b576]
#
# patch "tests/t_remerge.at"
# from [83424c6866711fddcd090865370ff3f9db1a37b9]
# to [e9cf7d222425e8ed9f7c10a3714af3e5bf5b143e]
#
# patch "tests/t_rename.at"
# from [9294b9b72fc4eb10f0954f07d3a6103e0c123ab0]
# to [4ec762efe273f44b4a63dcc27cb9c40b0af312b4]
#
# patch "tests/t_rename_dir_cross_level.at"
# from [11a1751be8693f71676c8c047c1a81b0d4ed2940]
# to [400f1b82f0f9594a2c6592c420a9728a9b75f250]
#
# patch "tests/t_renamed.at"
# from [40f40d3f72061961a6c39af95641177b3289110e]
# to [94f19a1bcd6feb2de88e5c4ab0133065ccb64c9a]
#
# patch "tests/t_scan.at"
# from [5269c1fe377163e3a6743b0737e95b45e005b902]
# to [b203ac2f2e3960f90effbaba0595c6681c34e386]
#
# patch "tests/t_set_default.at"
# from [95505520a46b66a6120dae44779dbb01f16fdafb]
# to [4869ee5e5dee61a59e25a34facb6f5834696651d]
#
# patch "tests/t_setup_existing_path.at"
# from [65ed903effa04ed5e70989bf0bfd4b1938e6878f]
# to [0f84f1e69ba45ca565d23fdf122d91154af1d286]
#
# patch "tests/t_singlecvs.at"
# from [7d51de64a3015214985b09b0d744f6c22afbf986]
# to [3ab763cc4821f58ecc8cea7ff0d1b8f62004c8ad]
#
# patch "tests/t_sticky_branch.at"
# from [383e882866f67eec58c597b01605cf8233061ff0]
# to [452ed835d2e831480a7fff9ef2c8b5c539bcbf85]
#
# patch "tests/t_unreadable_MT.at"
# from [a3ed09e7bf8c01bdf42c8184a9acd1683c4a6034]
# to [d732c69dc8d90926de48dd11938a48b436265012]
#
# patch "tests/t_unreadable_db.at"
# from []
# to [c69591064c72591c66a6f5d1b34dfbae0ca6c8ef]
#
# patch "tests/t_update_with_pending_add.at"
# from [8394d96a687a14e6dcae400383d3bef0e76d1f78]
# to [357bc4be7680dd9d3a898ae914aa1c6a11a47996]
#
# patch "tests/t_update_with_pending_drop.at"
# from [d52d3736c75a01c308500e12237edaf37e8f345f]
# to [00cdc65ce50b1b3b3c54d0542653c7ec47e27072]
#
# patch "tests/t_update_with_pending_rename.at"
# from [d6e60af87b017d9269e0c3c797c93d0a696648fc]
# to [99e70ea11a371b7b400bd8f4dd1fad467f9645e4]
#
# patch "tests/t_versions.at"
# from [91d6fb7180cd75fde30d7f5b82e29cf5feaf9277]
# to [49105adca6a5a867ec44be87731651eacb8cb437]
#
# patch "testsuite.at"
# from [3069578e5268491a6c837912613346860e6f7ea5]
# to [f37b217c9d261739b96a0f8ccdc61269f1c0ee67]
#
# patch "ui.cc"
# from [403dbf11aebf69618ecbaf53dbb87695a78cb940]
# to [77a48bddc373a115f5ec6cc0077afa17a2a762d0]
#
# patch "ui.hh"
# from [daec74ed24338ff3ee7eda12f14e7deb7aeb6473]
# to [d5866bba3cc59b130fb56ba40e0780801d4314f9]
#
# patch "win32/fs.cc"
# from [38ce311dec5f6b399c799ff10cc3e8c8dae4429c]
# to [dc98eb08c96cda5ca2e73e8a29dea19cb40b00bf]
#
# patch "win32/inodeprint.cc"
# from [b861168f4636365c587b88177629559acfad329e]
# to [958ef1bcb5ee1711a55894151ed1742fa3074ddc]
#
# patch "win32/terminal.cc"
# from [e79234a8f5c29f47deae3d84703a2792678b6e74]
# to [3eb6dc1cb604200139e367919e66a7438a986a6c]
#
========================================================================
--- .mt-attrs 8287c8c8f48067074ca9e114e6aec78129343f60
+++ .mt-attrs f64f76c6bd0167f72362edd8c47724dffbe31907
@@ -22,5 +22,11 @@
file "contrib/mtbrowse.sh"
execute "true"
+ file "contrib/parse-accounting.pl"
+execute "true"
+
+ file "contrib/perf-test.sh"
+execute "true"
+
file "debian/rules"
execute "true"
========================================================================
--- ChangeLog 5387993cd1182600f3f4459588e89af64f7feb59
+++ ChangeLog 50802639ded49c79d2f4bbfa018f0adb56206858
@@ -1,3 +1,352 @@
+2005-09-07 Jim Meyering
+
+ * tests/t_rename_dir_cross_level.at: When invoking mv to rename
+ a directory, do not include a trailing slash on the target -- that
+ is not portable.
+
+ * Makefile.am (TESTS_ENVIRONMENT): Ensure that PATH starts with
+ the current directory, so we test the just-built monotone binary,
+ not some older version.
+
+2005-09-07 Benoît Dejean
+
+ * std_hooks.lua: Don't spawn emacs with '-no-init-file'.
+
+2005-09-09 Matthew Gregan
+
+ * paths.cc (save_initial_path): Default Boost's fs::path to
+ fs::native grammar.
+ * tests/t_unreadable_{db,MT}.at: Disable on Win32 for now.
+ * paths.cc: Consistency--use WIN32 rather than _WIN32.
+ * file_io.cc (walk_tree): Correct test for file existence.
+
+2005-09-08 Matthew Gregan
+
+ * Makefile.am: Add '-f' argument to 'mv'; avoids build waiting on
+ user confirmation in some cases.
+
+2005-09-08 Nathaniel Smith
+
+ * monotone.texi (Certificates): Remove mention of fcerts and
+ mcerts.
+
+2005-09-07 Benoît Dejean
+
+ * ui.{cc,hh}: Added user_inferface::user_locale.
+ * sanity.hh: Made F() and FP() locale aware.
+
+2005-09-06 Benoît Dejean
+
+ * monotone.cc: One more i18n string.
+
+2005-09-06 Benoît Dejean
+
+ * po/fr.po: Updated French translation.
+
+2005-09-06 Benoît Dejean
+
+ * commands.cc: No i18n for cert_revision_changelog.
+
+2005-09-06 Matthew Gregan
+
+ * tests/t_netsync_read_permissions.at: Tweak tests so we aren't
+ trying to serve a bare '*'; works around test hangs due to glob
+ expansion sillyness on MinGW.
+ * tests/t_netsync_globs.at: Ditto.
+ * tests/t_netsync_exclude.at: Ditto.
+ * std_hooks.lua (ignore_file): Add Mac OS X (.DS_Store) and
+ Windows (desktop.ini) per-directory browser configuration files.
+
+
+2005-09-05 Benoît Dejean
+
+ * commands.cc: Fixed some strings (added ' around revisions).
+ Removed some whitespaces.
+ No i18n in diff output.
+
+2005-09-05 Benoît Dejean
+
+ * sanity.{cc,hh}: boost::format vs. F(). Merged boost::format
+ and moved non-template code to sanity.cc.
+
+2005-09-05 Matthew Gregan
+
+ * win32/terminal.cc (have_smart_terminal): We were returning false
+ in almost all circumstances; changed logic so that we at least
+ work when running in a cmd.exe window.
+
+2005-09-05 Matt Johnston
+
+ * commands.cc (dump_diffs): don't use the terminal width to
+ print ===== seperators.
+
+2005-09-05 Matthew Gregan
+
+ * paths.cc (find_and_go_to_working_copy): Create root and bookdir
+ paths as fs::native.
+ * main.cc: Tweak #ifdef to avoid exposing some unused SEH handling
+ on MinGW.
+ * configure.ac: Minor cleanup to Win32 configure test.
+
+2005-09-04 Nathaniel Smith
+
+ * monotone.cc (options): Remove default from the help string for
+ --count, since none of the options listed are actually the
+ default.
+
+2005-09-04 Nathaniel Smith
+
+ * tests/t_unreadable_db.at, testsuite.at: New test.
+
+2005-09-03 Nathaniel Smith
+
+ * po/Makevars (XGETTEXT_OPTIONS): N_ != ngettext.
+ Add c-format flags on F() and FP() calls (only partially
+ successful on latter, because of bug in xgettext).
+
+2005-09-04 Grahame Bowland
+
+ * commands.cc: siplify the monotone cat command
+ to "monotone cat [-r] FIELNAME" (as in bug #12597)
+ * monotone.texi: update documentation of "monotone cat"
+ * tests/t_add_edge.at, tests/t_cat_file_by_name.at,
+ tests/t_change_empty_file.at, tests/t_cvsimport.at,
+ tests/t_cvsimport_deleted_invar.at, tests/t_cvsimport_drepper.at,
+ tests/t_cvsimport_drepper2.at, tests/t_cvsimport_manifest_cycle.at,
+ tests/t_cvsimport_samelog.at, tests/t_database_check.at,
+ tests/t_db_kill_rev_locally.at, tests/t_empty_id_completion.at,
+ tests/t_epoch.at, tests/t_epoch_server.at, tests/t_erename.at,
+ tests/t_i18n_file.at, tests/t_import.at, tests/t_merge_add_del.at,
+ tests/t_movedel.at, tests/t_movepatch.at, tests/t_netsync.at,
+ tests/t_netsync_exclude.at, tests/t_netsync_exclude_default.at,
+ tests/t_netsync_globs.at, tests/t_netsync_nocerts.at,
+ tests/t_netsync_permissions.at, tests/t_netsync_read_permissions.at,
+ tests/t_netsync_single.at, tests/t_normalized_filenames.at,
+ tests/t_persistent_server_revision.at, tests/t_remerge.at,
+ tests/t_rename.at, tests/t_renamed.at, tests/t_scan.at,
+ tests/t_set_default.at, tests/t_singlecvs.at,
+ tests/t_update_with_pending_add.at, tests/t_update_with_pending_drop.at,
+ tests/t_update_with_pending_rename.at, tests/t_versions.at:
+ use automation interface rather than "monotone cat"
+
+2005-09-04 Grahame Bowland
+
+ * ChangeLog: fix up screwed up three-way merge
+
+2005-09-04 Grahame Bowland
+
+ * automate.cc, commands.cc: add "automate get_file",
+ "automate get_revision" and "automate get_manifest" to
+ automation interface.
+ * monotone.texi: document new automation commands
+ * tests/t_automate_get_file.at, tests/t_automate_get_revision_at,
+ tests/t_automate_get_manifest.at: trivial testing of new
+ automation commands for output as specified, make sure they
+ do not complete IDs, make sure invalid IDs are caught.
+ * testsuite.at: add new tests
+
+2005-09-03 Matthew Gregan
+
+ * tests/t_persistent_server_keys_2.at: 'commit' needs a commit
+ message. Un-XFAIL.
+ * tests/t_netsync_unrelated.at: Fix 'setup' syntax.
+ * tests/t_add_vs_commit.at: BASE_REVISION needs to be in the root
+ of a working copy to work. Un-XFAIL.
+ * tests/t_add_stomp_file.at: 'add' does not take a --branch
+ argument. BASE_REVISION needs to be in the root of a working copy
+ to work.
+ * annotate.cc (build_parent_lineage): Don't access uninitialized
+ memory--use resize() rather than reserve().
+
+2005-09-02 Matthew Gregan
+
+ * monotone.cc: Use consistent case in option descriptions.
+
+2005-09-02 Nathaniel Smith
+
+ * paths.{hh,cc}: Add split_path typedef. Use it.
+
+2005-09-02 Matt Johnston
+
+ * lua.cc (monotone_guess_binary_file_contents_for_lua): use a
+ temporary char* buffer rather than &string[], extra copying seems
+ to have negligible performance impact.
+ * tests/perf-test.sh: change path from tests/ to contrib/, make
+ executable.
+ * tests/parse-accounting.pl: make executable.
+
+2005-09-01 Timothy Brownawell
+
+ * lua.cc, std_hooks.lua: use proper regexes for .mt-ignore
+ taken from a patch from Martin Dvorak
+ * contrib/monotone-cvs-ignore.lua: New file, from the same patch.
+ supports .cvsignore files
+ * tests/t_mt_ignore.at: check that a missing .mt-ignore
+ doesn't cause problems
+
+2005-09-01 Timothy Brownawell
+
+ * tests/t_mt_ignore.at: use RAW_MONOTONE instead of ugly --rcfile
+ Also actually do "mtn add" this time.
+
+2005-09-01 Timothy Brownawell
+
+ * tests/t_mt_ignore.at: new test, checks that .mt-ignore works
+ * testsuite.at: add it
+
+2005-09-01 Timothy Brownawell
+
+ * std_hooks.lua: support .mt-ignore
+ * monotone.texi: mention .mt-ignore and MT/wanted-testresults under
+ "Existing control files"
+ * .mt-ignore: ignore testsuite.dir
+
+2005-09-03 Benoît Dejean
+
+ * commands.cc (ls_certs):
+ * netsync.cc (load_data): Merged strings.
+
+2005-09-01 Benoît Dejean
+
+ * commands.cc: Merged one more "no such revision '%s'" string.
+
+2005-09-01 Benoît Dejean
+
+ * commands.cc: Merged all "no such revision '%s'" strings.
+ (string_to_datetime): Merged catch blocks in order to merge error
+ messages.
+
+2005-09-01 Benoît Dejean
+
+ * ChangeLog: Fixed.
+
+2005-09-01 Matthew Gregan
+
+ * ui.cc (user_interface): Avoid calling sync_with_stdio(false) on
+ Win32 for now to work around a bug in MinGW where unsynchronized
+ std::cin returns EOF earlier when reading a stream with DOS
+ newlines. Resolves 'db load' failure reported by Howard Spindel.
+ * database.cc (load): Don't bother executing an empty string.
+ * commands.cc (ALIAS(import, setup)): Remove alias.
+
+2005-09-01 Matt Johnston
+
+ * schema.sql: add BEGIN, COMMIT to make it a single transaction,
+ improves db init performance significantly on OS X (avoids many
+ disk-cache flushes).
+
+2005-09-01 Matthew Gregan
+
+ * testsuite.at: Increase entropy used to generate port numbers
+ where we can and increase range of port numbers generated.
+ * monotone.texi: Fix a couple of minor typos.
+
+2005-09-01 Matthew Gregan
+
+ * monotone.texi: Update 'setup' documentation and tutorial to
+ reflect new usage. Also update much of the monotone output in the
+ tutorials to reflect the output of more modern versions of
+ monotone. Correct some minor errors and typos while here.
+ * commands.cc (CMD(setup)): Require database and branch arguments.
+ (ALIAS(import,setup)): Add setup alias.
+ * testsuite.at, tests/*.at: Update 'setup' usage.
+
+2005-08-31 Richard Levitte
+
+ * lua.cc, std_hooks.lua: Rename
+ monotone_guess_binary_filename_for_lua and guess_binary_filename
+ to monotone_guess_binary_file_contents_for_lua and
+ guess_binary_file_contents.
+
+2005-08-31 Benoît Dejean
+
+ * basic_io.cc (basic_io::input_source::err): Merged strings.
+
+2005-08-31 Nathaniel Smith
+
+ * file_io.cc (set_char_is_binary, guess_binary): static_cast chars
+ to uint8_t before using as array indices. Also replace some ints
+ with size_t's to quiet g++ warnings.
+
+2005-08-30 Benoît Dejean
+
+ In function void set_char_is_binary(char, bool)
+ 133: warning: array subscript has type char
+ In function void init_char_is_binary()
+ 147: warning: comparison between signed and unsigned integer expressions
+ In function bool guess_binary(const std::string&)
+ 160: warning: comparison between signed and unsigned integer expressions
+ 162: warning: array subscript has type char
+
+2005-08-30 Benoît Dejean
+
+ * file_io.cc (walk_tree): Fixed format.
+
+2005-08-31 Marcel van der Boom
+
+ * std_hooks.lua (execute_confirm): New function.
+ (merge2_opendiff_cmd, merge3_opendiff_cmd): Add.
+
+2005-08-31 Matthew Gregan
+
+ * paths.cc (test_bookkeeping_path, test_system_path): Second
+ attempt at compile fixes; this time the unit tests actually pass
+ too.
+
+2005-08-30 Matthew Gregan
+
+ * paths.cc (test_bookkeeping_path, test_system_path): Shift object
+ instantiation around a little to work around what seems to be a
+ bug in the gcc 3.3 parser.
+ * win32/inodeprint.cc (inodeprint_file): Update to use new path
+ handling code.
+ * win32/fs.cc (tilde_expand): Compile fix.
+
+2005-08-30 Petr Baudis
+
+ * std_hooks.lua: Simple support for merging using merge(1) and vim.
+
+2005-08-30 Benoît Dejean
+
+ * po/fr.po: Updated French translation.
+
+2005-08-30 Benoît Dejean
+
+ * commands.cc: Merged some error messages.
+
+2005-08-30 Benoît Dejean
+
+ * commands.cc: Merged complete(..., file_id) and
+ complete(..., manifest_id) into template complete(..., ID).
+
+2005-08-30 Benoît Dejean
+
+ * commands.cc (ls_certs): Reworked for i18n.
+ (CMD(commit)): Merged 2 strings.
+
+2005-08-30 Matthew Gregan
+
+ * revision.cc (ensure_parents_loaded): Don't reuse an iterator
+ after we've invalidated it. Fixes 'diff' crash reported by Howard
+ Spindel.
+
+2005-08-30 Matt Johnston
+
+ * botan/allocate.cpp: avoid string comparison when looking up the
+ default allocator
+ * monotone.cc (cpp_main): set a default allocator
+
+2005-08-28 Nathaniel Smith
+
+ * tests/t_attributes.at: Delete checkout dir in between
+ checkouts.
+
+2005-08-28 Matt Johnston
+
+ * keys.cc (keys_match): new function to compare whether two keys
+ match (ignoring whitespace as the database does, etc).
+ * packet.cc, keys.cc: use it for existing-key-comparison.
+
2005-08-27 Nathaniel Smith
* commands.cc (checkout): Special-case "checkout ."
@@ -664,6 +1013,12 @@
(external_path): Rename to system_path.
Misc. other updates.
+2005-08-21 Eric Anderson
+ * file_io.cc, file_io.hh, lua.cc, std_hooks.lua: determine if a
+ file is binary by looking at it incrementally, rather than reading
+ it in entirely. Prepare for making it possible to control what
+ characters are considered "binary"
+
2005-08-20 Nathaniel Smith
* paths.cc (is_absolute): New function.
@@ -1363,6 +1718,12 @@
requirements, zlib as a runtime requirement.
2005-08-09 Eric Anderson
+
+ * tests/perf-test.sh: A repeatable performance test harness
+ * tests/parse-accounting.pl: A script that parses the accounting
+ output into a nice tabular format
+
+2005-08-09 Eric Anderson
* Changes to significantly improve network pull performance
* string_queue.hh: created to store pending data and allow for
========================================================================
--- Makefile.am 8aefb7ba1e9e19ac619b8828bbcdd8106ee3e7fa
+++ Makefile.am 4fdc45d300225991df7992a71cedf7936a7d76b5
@@ -361,7 +361,7 @@
monotone.dvi: monotone.texi version.texi std_hooks.lua $(EPS_FIGURES)
#%.eps: %.epsi
-# mv $< $@
+# mv -f $< $@
#
#%.epsi: %.ps
# ps2epsi $< $@
@@ -379,6 +379,8 @@
TESTS = unit_tests $(srcdir)/testsuite
+TESTS_ENVIRONMENT=AUTOTEST_PATH="."
+
mostlyclean-local:
rm -rf testsuite.dir testsuite.log package_full_revision_dist.txt
@@ -408,7 +410,7 @@
$(srcdir)/testsuite: $(srcdir)/testsuite.at $(wildcard $(srcdir)/tests/t_*.at) \
$(srcdir)/package.m4
autom4te --language=Autotest -I $(srcdir) $< -o address@hidden
- mv address@hidden $@
+ mv -f address@hidden $@
# we generate some headers to copy data into the executable
@@ -428,12 +430,12 @@
%.h: %.sql txt2c Makefile
./txt2c $< $(*F) >address@hidden
- cmp -s address@hidden $@ || mv address@hidden $@
+ cmp -s address@hidden $@ || mv -f address@hidden $@
rm -f address@hidden
%.h: %.lua txt2c Makefile
./txt2c $< $(*F) >address@hidden
- cmp -s address@hidden $@ || mv address@hidden $@
+ cmp -s address@hidden $@ || mv -f address@hidden $@
rm -f address@hidden
# A fake target so we can use MT/revision as a prerequisite, yet not
@@ -445,7 +447,7 @@
if [ ! -f $@ ]; then echo "unknown" > $@; fi
package_revision.c: package_revision.txt txt2c Makefile
./txt2c --strip-trailing --no-static $< package_revision >address@hidden
- cmp -s address@hidden $@ || mv address@hidden $@
+ cmp -s address@hidden $@ || mv -f address@hidden $@
rm -f address@hidden
.PHONY: package_full_revision.txt apidocs
@@ -462,7 +464,7 @@
echo ' further changes may have been made.') >> $@
package_full_revision.c: package_full_revision.txt txt2c Makefile
./txt2c --no-static $< package_full_revision >address@hidden
- cmp -s address@hidden $@ || mv address@hidden $@
+ cmp -s address@hidden $@ || mv -f address@hidden $@
rm -f address@hidden
# automake doesn't build html docs
========================================================================
--- annotate.cc 583bfb6d988073642e901dfa36d85c7c44c4ca37
+++ annotate.cc 613ae82123687d6e26b088c8f769d4efe9abd3fa
@@ -390,7 +390,7 @@
// do the copied lines thing for our annotate_context
std::vector lcs_src_lines;
- lcs_src_lines.reserve(lcs.size());
+ lcs_src_lines.resize(lcs.size());
size_t i, j;
i = j = 0;
while (i < file_interned.size() && j < lcs.size()) {
========================================================================
--- automate.cc b110377e8696e41dda47f78a8486b649b4743c5a
+++ automate.cc 5b96e0ff436ae87bdb8bd25121cd53a522af80d6
@@ -903,6 +903,154 @@
guard.commit();
}
+// Name: get_revision
+// Arguments:
+// 1: a revision id (optional, determined from working directory if non-existant)
+// Added in: 1.0
+// Purpose: Prints changeset information for the specified revision id.
+//
+// There are several changes that are described; each of these is described by
+// a different basic_io stanza. The first string pair of each stanza indicates the
+// type of change represented.
+//
+// Possible values of this first value are along with an ordered list of
+// basic_io formatted string pairs that will be provided are:
+//
+// 'old_revision' : represents a parent revision.
+// format: ('old_revision', revision id)
+// 'new_manifest' : represents the new manifest associated with the revision.
+// format: ('new_manifest', manifest id)
+// 'old_manifest' : represents a manifest associated with a parent revision.
+// format: ('old_manifest', manifest id)
+// 'patch' : represents a file that was modified.
+// format: ('patch', filename), ('from', file id), ('to', file id)
+// 'add_file' : represents a file that was added.
+// format: ('add_file', filename)
+// 'delete_file' : represents a file that was deleted.
+// format: ('delete_file', filename)
+// 'delete_dir' : represents a directory that was deleted.
+// format: ('delete_dir', filename)
+// 'rename_file' : represents a file that was renamed.
+// format: ('rename_file', old filename), ('to', new filename)
+// 'rename_dir' : represents a directory that was renamed.
+// format: ('rename_dir', old filename), ('to', new filename)
+//
+// Output format: All stanzas are formatted by basic_io. Stanzas are seperated
+// by a blank line. Values will be escaped, '\' -> '\\' and '"' -> '\"'.
+//
+// Error conditions: If the revision specified is unknown or invalid prints an
+// error message to stderr and exits with status 1.
+static void
+automate_get_revision(std::vector args,
+ std::string const & help_name,
+ app_state & app,
+ std::ostream & output)
+{
+ if (args.size() > 1)
+ throw usage(help_name);
+
+ revision_data dat;
+ revision_id ident;
+
+ if (args.size() == 0)
+ {
+ revision_set rev;
+ manifest_map m_old, m_new;
+
+ app.require_working_copy();
+ calculate_unrestricted_revision(app, rev, m_old, m_new);
+ calculate_ident(rev, ident);
+ write_revision_set(rev, dat);
+ }
+ else
+ {
+ ident = revision_id(idx(args, 0)());
+ N(app.db.revision_exists(ident),
+ F("no revision %s found in database") % ident);
+ app.db.get_revision(ident, dat);
+ }
+
+ L(F("dumping revision %s\n") % ident);
+ output.write(dat.inner()().data(), dat.inner()().size());
+}
+
+// Name: get_manifest
+// Arguments:
+// 1: a manifest id (optional, determined from working directory if non-existant)
+// Added in: 1.0
+// Purpose: Prints the contents of the manifest associated with the given manifest ID.
+//
+// Output format: One line for each file in the manifest. Each line begins with a
+// 40 character file ID, followed by two space characters (' ') and then the filename.
+// eg:
+// 22382ac1bdffec21170a88ff2580fe39b508243f vocab.hh
+//
+// Error conditions: If the manifest ID specified is unknown or invalid prints an
+// error message to stderr and exits with status 1.
+static void
+automate_get_manifest(std::vector args,
+ std::string const & help_name,
+ app_state & app,
+ std::ostream & output)
+{
+ if (args.size() > 1)
+ throw usage(help_name);
+
+ manifest_data dat;
+ manifest_id ident;
+
+ if (args.size() == 0)
+ {
+ revision_set rev;
+ manifest_map m_old, m_new;
+
+ app.require_working_copy();
+ calculate_unrestricted_revision(app, rev, m_old, m_new);
+
+ calculate_ident(m_new, ident);
+ write_manifest_map(m_new, dat);
+ }
+ else
+ {
+ ident = manifest_id(idx(args, 0)());
+ N(app.db.manifest_version_exists(ident),
+ F("no manifest version %s found in database") % ident);
+ app.db.get_manifest_version(ident, dat);
+ }
+
+ L(F("dumping manifest %s\n") % ident);
+ output.write(dat.inner()().data(), dat.inner()().size());
+}
+
+// Name: get_file
+// Arguments:
+// 1: a file id
+// Added in: 1.0
+// Purpose: Prints the contents of the specified file.
+//
+// Output format: The file contents are output without modification.
+//
+// Error conditions: If the file id specified is unknown or invalid prints
+// an error message to stderr and exits with status 1.
+static void
+automate_get_file(std::vector args,
+ std::string const & help_name,
+ app_state & app,
+ std::ostream & output)
+{
+ if (args.size() != 1)
+ throw usage(help_name);
+
+ file_id ident(idx(args, 0)());
+ N(app.db.file_version_exists(ident),
+ F("no file version %s found in database") % ident);
+
+ file_data dat;
+ L(F("dumping file %s\n") % ident);
+ app.db.get_file_version(ident, dat);
+ output.write(dat.inner()().data(), dat.inner()().size());
+}
+
void
automate_command(utf8 cmd, std::vector args,
std::string const & root_cmd_name,
@@ -1153,6 +1301,12 @@
automate_stdio(args, root_cmd_name, app, output);
else if (cmd() == "certs")
automate_certs(args, root_cmd_name, app, output);
+ else if (cmd() == "get_revision")
+ automate_get_revision(args, root_cmd_name, app, output);
+ else if (cmd() == "get_manifest")
+ automate_get_manifest(args, root_cmd_name, app, output);
+ else if (cmd() == "get_file")
+ automate_get_file(args, root_cmd_name, app, output);
else
throw usage(root_cmd_name);
}
========================================================================
--- basic_io.cc 59d07d48475fc4a7d1a5301f162fdb7245bbab62
+++ basic_io.cc 3c575f5fd41d00730c3a0a9eafe84105fa51f28a
@@ -24,7 +24,7 @@
void basic_io::input_source::err(std::string const & s)
{
L(F("error in %s:%d:%d:E: %s") % name % line % col % s);
- throw informative_failure((F("%s:%d:%d:E: %s")
+ throw informative_failure((F("error in %s:%d:%d:E: %s")
% name % line % col % s).str());
}
========================================================================
--- botan/allocate.cpp bf95f795b13f03947041d16bae44b936d914f30d
+++ botan/allocate.cpp 8222a5340314265755a2b79469a367158fc2f99b
@@ -21,6 +21,7 @@
{
public:
Allocator* get(const std::string&) const;
+ Allocator* get_default() const;
void add(const std::string&, Allocator*);
std::string set_default_allocator(const std::string&);
@@ -49,6 +50,21 @@
}
/*************************************************
+* Get the default allocator from the factory *
+*************************************************/
+Allocator* AllocatorFactory::get_default() const
+ {
+ Mutex_Holder lock(factory_lock);
+
+ std::map::const_iterator iter;
+ iter = alloc.find(default_allocator);
+
+ if(iter == alloc.end())
+ return 0;
+ return iter->second;
+ }
+
+/*************************************************
* Make a new type available to the factory *
*************************************************/
void AllocatorFactory::add(const std::string& type, Allocator* allocator)
@@ -101,13 +117,13 @@
Allocator* alloc = 0;
- if(type != "")
+ if(!type.empty())
{
alloc = factory->get(type);
if(alloc) return alloc;
}
- alloc = factory->get("default");
+ alloc = factory->get_default();
if(alloc) return alloc;
alloc = factory->get("locking");
========================================================================
--- cert.cc 7375c4ce0944680b0b1347414d653139f6c828c7
+++ cert.cc 43de7f5240b7caa27fc590630afe3ffeea0bfa0b
@@ -369,7 +369,7 @@
{
// We really don't want the database key and the rcfile key
// to differ.
- N(remove_ws(dbkey()) == remove_ws(luakey()),
+ N(keys_match(id, dbkey, id, luakey),
F("mismatch between private key '%s' in database"
" and get_priv_key hook") % id);
}
========================================================================
--- commands.cc 3176e0a5397306096cf3ad3da067252881ddb413
+++ commands.cc 55800638c9bd2da0aa48ab46d06beba1d5845c32
@@ -155,7 +155,7 @@
}
else if (matched.size() > 1)
{
- string err = (F("command '%s' has multiple ambiguous expansions: \n") % cmd).str();
+ string err = (F("command '%s' has multiple ambiguous expansions:\n") % cmd).str();
for (vector::iterator i = matched.begin();
i != matched.end(); ++i)
err += (*i + "\n");
@@ -470,63 +470,34 @@
P(F("expanded to '%s'\n") % completion);
}
-static void
-complete(app_state & app,
- string const & str,
- manifest_id & completion)
-{
- N(str.find_first_not_of(constants::legal_id_bytes) == string::npos,
- F("non-hex digits in id"));
- if (str.size() == constants::idlen)
- {
- completion = manifest_id(str);
- return;
- }
- set completions;
- app.db.complete(str, completions);
- N(completions.size() != 0,
- F("partial id '%s' does not have a unique expansion") % str);
- if (completions.size() > 1)
- {
- string err = (F("partial id '%s' has multiple ambiguous expansions: \n") % str).str();
- for (set::const_iterator i = completions.begin();
- i != completions.end(); ++i)
- err += (i->inner()() + "\n");
- N(completions.size() == 1, boost::format(err));
- }
- completion = *(completions.begin());
- P(F("expanding partial id '%s'\n"
- "expanded to '%s'\n")
- % str % completion);
-}
+template
static void
complete(app_state & app,
string const & str,
- file_id & completion)
+ ID & completion)
{
N(str.find_first_not_of(constants::legal_id_bytes) == string::npos,
F("non-hex digits in id"));
if (str.size() == constants::idlen)
{
- completion = file_id(str);
+ completion = ID(str);
return;
}
- set completions;
+ set completions;
app.db.complete(str, completions);
N(completions.size() != 0,
- F("partial id '%s' does not have a unique expansion") % str);
+ F("partial id '%s' does not have an expansion") % str);
if (completions.size() > 1)
{
- string err = (F("partial id '%s' has multiple ambiguous expansions: \n") % str).str();
- for (set::const_iterator i = completions.begin();
+ string err = (F("partial id '%s' has multiple ambiguous expansions:\n") % str).str();
+ for (typename set::const_iterator i = completions.begin();
i != completions.end(); ++i)
err += (i->inner()() + "\n");
N(completions.size() == 1, boost::format(err));
}
completion = *(completions.begin());
- P(F("expanding partial id '%s'\n"
- "expanded to '%s'\n")
+ P(F("expanded partial id '%s' to '%s'\n")
% str % completion);
}
@@ -553,7 +524,7 @@
{
if (checked.find(idx(certs, i).key) == checked.end() &&
!app.db.public_key_exists(idx(certs, i).key))
- P(F("warning: no public key '%s' found in database\n")
+ P(F("no public key '%s' found in database")
% idx(certs, i).key);
checked.insert(idx(certs, i).key);
}
@@ -563,6 +534,21 @@
// particular.
sort(certs.begin(), certs.end());
+ string str = _("Key : %s\n"
+ "Sig : %s\n"
+ "Name : %s\n"
+ "Value : %s\n");
+ string extra_str = " : %s\n";
+
+ string::size_type colon_pos = str.find(':');
+
+ if (colon_pos != string::npos)
+ {
+ string substr(str, 0, colon_pos);
+ colon_pos = length(substr);
+ extra_str = string(colon_pos, ' ') + ": %s\n";
+ }
+
for (size_t i = 0; i < certs.size(); ++i)
{
cert_status status = check_cert(app, idx(certs, i));
@@ -582,13 +568,13 @@
switch (status)
{
case cert_ok:
- stat = "ok";
+ stat = _("ok");
break;
case cert_bad:
- stat = "bad";
+ stat = _("bad");
break;
case cert_unknown:
- stat = "unknown";
+ stat = _("unknown");
break;
}
@@ -596,14 +582,15 @@
split_into_lines(washed, lines);
I(lines.size() > 0);
- cout << "-----------------------------------------------------------------" << endl
- << "Key : " << idx(certs, i).key() << endl
- << "Sig : " << stat << endl
- << "Name : " << idx(certs, i).name() << endl
- << "Value : " << idx(lines, 0) << endl;
+ cout << std::string(guess_terminal_width(), '-') << '\n'
+ << boost::format(str)
+ % idx(certs, i).key()
+ % stat
+ % idx(certs, i).name()
+ % idx(lines, 0);
for (size_t i = 1; i < lines.size(); ++i)
- cout << " : " << idx(lines, i) << endl;
+ cout << boost::format(extra_str) % idx(lines, i);
}
if (certs.size() > 0)
@@ -676,7 +663,7 @@
revision_id ident;
complete(app, id, ident);
N(app.db.revision_exists(ident),
- F("no revision %s found in database") % ident);
+ F("no such revision '%s'") % ident);
//check that the revision does not have any children
set children;
@@ -1032,7 +1019,7 @@
app.db.get_revision(r, rev);
N(rev.edges.size() == 1,
- F("revision %s has %d changesets, cannot invert\n") % r % rev.edges.size());
+ F("revision '%s' has %d changesets, cannot invert\n") % r % rev.edges.size());
cert_value branchname;
guess_branch(r, app, branchname);
@@ -1059,7 +1046,7 @@
cert_revision_in_branch(inv_id, branchname, app, dbw);
cert_revision_date_now(inv_id, app, dbw);
cert_revision_author_default(inv_id, app, dbw);
- cert_revision_changelog(inv_id, (F("disapproval of revision %s") % r).str(), app, dbw);
+ cert_revision_changelog(inv_id, (boost::format("disapproval of revision '%s'") % r).str(), app, dbw);
guard.commit();
}
}
@@ -1296,114 +1283,46 @@
}
CMD(cat, N_("informative"),
- N_("(file|manifest|revision) [ID]\n"
- "file REVISION FILENAME"),
- N_("write file, manifest, or revision from database to stdout"),
- OPT_NONE)
+ N_("FILENAME"),
+ N_("write file from database to stdout"),
+ OPT_REVISION)
{
- if (args.size() < 1 || args.size() > 3)
+ if (args.size() != 1)
throw usage(name);
- if (args.size() == 3 && idx(args, 0)() != "file")
- throw usage(name);
+ if (app.revision_selectors.size() == 0)
+ app.require_working_copy();
+
transaction_guard guard(app.db);
- if (idx(args, 0)() == "file")
- {
- file_id ident;
- if (args.size() == 1)
- throw usage(name);
- else if (args.size() == 2)
- {
- complete(app, idx(args, 1)(), ident);
-
- N(app.db.file_version_exists(ident),
- F("no file version %s found in database") % ident);
- }
- else if (args.size() == 3)
- {
- revision_id rid;
- complete(app, idx(args, 1)(), rid);
- // paths are interpreted as standard external ones when we're in a
- // working copy, but as project-rooted external ones otherwise
- file_path fp;
- if (app.found_working_copy)
- fp = file_path_external(idx(args, 2));
- else
- fp = file_path_internal_from_user(idx(args, 2));
- manifest_id mid;
- app.db.get_revision_manifest(rid, mid);
- manifest_map m;
- app.db.get_manifest(mid, m);
- manifest_map::const_iterator i = m.find(fp);
- N(i != m.end(), F("no file '%s' found in revision '%s'\n") % fp % rid);
- ident = manifest_entry_id(i);
- }
- else
- throw usage(name);
-
- file_data dat;
- L(F("dumping file %s\n") % ident);
- app.db.get_file_version(ident, dat);
- cout.write(dat.inner()().data(), dat.inner()().size());
- }
- else if (idx(args, 0)() == "manifest")
- {
- manifest_data dat;
- manifest_id ident;
+ file_id ident;
+ revision_id rid;
+ if (app.revision_selectors.size() == 0)
+ get_revision_id(rid);
+ else
+ complete(app, idx(app.revision_selectors, 0)(), rid);
+ N(app.db.revision_exists(rid), F("no such revision '%s'") % rid);
- if (args.size() == 1)
- {
- revision_set rev;
- manifest_map m_old, m_new;
+ // paths are interpreted as standard external ones when we're in a
+ // working copy, but as project-rooted external ones otherwise
+ file_path fp;
+ if (app.found_working_copy)
+ fp = file_path_external(idx(args, 0));
+ else
+ fp = file_path_internal_from_user(idx(args, 0));
+ manifest_id mid;
+ app.db.get_revision_manifest(rid, mid);
+ manifest_map m;
+ app.db.get_manifest(mid, m);
+ manifest_map::const_iterator i = m.find(fp);
+ N(i != m.end(), F("no file '%s' found in revision '%s'\n") % fp % rid);
+ ident = manifest_entry_id(i);
+
+ file_data dat;
+ L(F("dumping file '%s'\n") % ident);
+ app.db.get_file_version(ident, dat);
+ cout.write(dat.inner()().data(), dat.inner()().size());
- app.require_working_copy();
- calculate_unrestricted_revision(app, rev, m_old, m_new);
-
- calculate_ident(m_new, ident);
- write_manifest_map(m_new, dat);
- }
- else
- {
- complete(app, idx(args, 1)(), ident);
- N(app.db.manifest_version_exists(ident),
- F("no manifest version %s found in database") % ident);
- app.db.get_manifest_version(ident, dat);
- }
-
- L(F("dumping manifest %s\n") % ident);
- cout.write(dat.inner()().data(), dat.inner()().size());
- }
-
- else if (idx(args, 0)() == "revision")
- {
- revision_data dat;
- revision_id ident;
-
- if (args.size() == 1)
- {
- revision_set rev;
- manifest_map m_old, m_new;
-
- app.require_working_copy();
- calculate_unrestricted_revision(app, rev, m_old, m_new);
- calculate_ident(rev, ident);
- write_revision_set(rev, dat);
- }
- else
- {
- complete(app, idx(args, 1)(), ident);
- N(app.db.revision_exists(ident),
- F("no revision %s found in database") % ident);
- app.db.get_revision(ident, dat);
- }
-
- L(F("dumping revision %s\n") % ident);
- cout.write(dat.inner()().data(), dat.inner()().size());
- }
- else
- throw usage(name);
-
guard.commit();
}
@@ -1452,7 +1371,7 @@
// use specified revision
complete(app, idx(app.revision_selectors, 0)(), ident);
N(app.db.revision_exists(ident),
- F("no revision %s found in database") % ident);
+ F("no such revision '%s'") % ident);
cert_value b;
guess_branch(ident, app, b);
@@ -1772,9 +1691,9 @@
complete(app, idx(args, 0)(), m_old_id);
complete(app, idx(args, 1)(), m_new_id);
- N(app.db.manifest_version_exists(m_old_id), F("no such manifest %s") % m_old_id);
+ N(app.db.manifest_version_exists(m_old_id), F("no such manifest '%s'") % m_old_id);
app.db.get_manifest(m_old_id, m_old);
- N(app.db.manifest_version_exists(m_new_id), F("no such manifest %s") % m_new_id);
+ N(app.db.manifest_version_exists(m_new_id), F("no such manifest '%s'") % m_new_id);
app.db.get_manifest(m_new_id, m_new);
delta del;
@@ -1798,9 +1717,9 @@
complete(app, idx(args, 0)(), f_old_id);
complete(app, idx(args, 1)(), f_new_id);
- N(app.db.file_version_exists(f_old_id), F("no such file %s") % f_old_id);
+ N(app.db.file_version_exists(f_old_id), F("no such file '%s'") % f_old_id);
app.db.get_file_version(f_old_id, f_old_data);
- N(app.db.file_version_exists(f_new_id), F("no such file %s") % f_new_id);
+ N(app.db.file_version_exists(f_new_id), F("no such file '%s'") % f_new_id);
app.db.get_file_version(f_new_id, f_new_data);
delta del;
diff(f_old_data.inner(), f_new_data.inner(), del);
@@ -1820,7 +1739,7 @@
complete(app, idx(args, 0)(), r_id);
- N(app.db.revision_exists(r_id), F("no such revision %s") % r_id);
+ N(app.db.revision_exists(r_id), F("no such revision '%s'") % r_id);
app.db.get_revision(r_id, r_data);
pw.consume_revision_data(r_id, r_data);
}
@@ -1838,7 +1757,7 @@
complete(app, idx(args, 0)(), m_id);
- N(app.db.manifest_version_exists(m_id), F("no such manifest %s") % m_id);
+ N(app.db.manifest_version_exists(m_id), F("no such manifest '%s'") % m_id);
app.db.get_manifest_version(m_id, m_data);
pw.consume_manifest_data(m_id, m_data);
}
@@ -1857,7 +1776,7 @@
complete(app, idx(args, 0)(), f_id);
- N(app.db.file_version_exists(f_id), F("no such file %s") % f_id);
+ N(app.db.file_version_exists(f_id), F("no such file '%s'") % f_id);
app.db.get_file_version(f_id, f_data);
pw.consume_file_data(f_id, f_data);
}
@@ -2191,7 +2110,7 @@
}
file_path path = file_path_external(idx(args,1));
- N(file_exists(path), F("no such file %s") % path);
+ N(file_exists(path), F("no such file '%s'") % path);
bool attrs_modified = false;
@@ -2286,14 +2205,10 @@
tmp.erase(pos, 1);
return boost::posix_time::from_iso_string(tmp);
}
- catch (std::out_of_range &e)
+ catch (std::exception &e)
{
N(false, F("failed to parse date string '%s': %s") % s % e.what());
}
- catch (std::exception &)
- {
- N(false, F("failed to parse date string '%s'") % s);
- }
I(false);
}
@@ -2328,8 +2243,10 @@
guess_branch(edge_old_revision(rs.edges.begin()), app, branchname);
P(F("beginning commit on branch '%s'\n") % branchname);
- L(F("new manifest %s\n") % rs.new_manifest);
- L(F("new revision %s\n") % rid);
+ L(F("new manifest '%s'\n"
+ "new revision '%s'\n")
+ % rs.new_manifest
+ % rid);
// can't have both a --message and a --message-file ...
N(app.message().length() == 0 || app.message_file().length() == 0,
@@ -2559,7 +2476,8 @@
bool new_is_archived,
diff_type type)
{
- std::string patch_sep = std::string(guess_terminal_width(), '=');
+ // 60 is somewhat arbitrary, but less than 80
+ std::string patch_sep = std::string(60, '=');
for (change_set::delta_map::const_iterator i = deltas.begin();
i != deltas.end(); ++i)
{
@@ -2685,7 +2603,7 @@
manifest_map m_old;
complete(app, idx(app.revision_selectors, 0)(), r_old_id);
N(app.db.revision_exists(r_old_id),
- F("revision %s does not exist") % r_old_id);
+ F("no such revision '%s'") % r_old_id);
app.db.get_revision(r_old_id, r_old);
calculate_unrestricted_revision(app, r_new, m_old, m_new);
I(r_new.edges.size() == 1 || r_new.edges.size() == 0);
@@ -2700,10 +2618,10 @@
complete(app, idx(app.revision_selectors, 0)(), r_old_id);
complete(app, idx(app.revision_selectors, 1)(), r_new_id);
N(app.db.revision_exists(r_old_id),
- F("revision %s does not exist") % r_old_id);
+ F("no such revision '%s'") % r_old_id);
app.db.get_revision(r_old_id, r_old);
N(app.db.revision_exists(r_new_id),
- F("revision %s does not exist") % r_new_id);
+ F("no such revision '%s'") % r_new_id);
app.db.get_revision(r_new_id, r_new);
app.db.get_revision_manifest(r_new_id, m_new_id);
app.db.get_manifest(m_new_id, m_new);
@@ -2761,7 +2679,7 @@
}
else
{
- cout << F("# no changes") << endl;
+ cout << "# no changes" << endl;
}
cout << "# " << endl;
@@ -2901,7 +2819,7 @@
{
complete(app, app.revision_selectors[0](), r_chosen_id);
N(app.db.revision_exists(r_chosen_id),
- F("no revision %s found in database") % r_chosen_id);
+ F("no such revision '%s'") % r_chosen_id);
}
notify_if_multiple_heads(app);
@@ -3065,8 +2983,8 @@
}
else if (find_common_ancestor_for_merge(left_id, right_id, anc_id, app))
{
- P(F("common ancestor %s found\n") % describe_revision(app, anc_id));
- P(F("trying 3-way merge\n"));
+ P(F("common ancestor %s found\n"
+ "trying 3-way merge\n") % describe_revision(app, anc_id));
app.db.get_revision(anc_id, anc_rev);
app.db.get_manifest(anc_rev.new_manifest, anc_man);
@@ -3164,8 +3082,8 @@
packet_db_writer dbw(app);
cert_revision_in_branch(merged, app.branch_name(), app, dbw);
- string log = (F("merge of %s\n"
- " and %s\n") % left % right).str();
+ string log = (boost::format("merge of %s\n"
+ " and %s\n") % left % right).str();
cert_revision_changelog(merged, log, app, dbw);
guard.commit();
@@ -3248,8 +3166,8 @@
cert_revision_in_branch(merged, idx(args, 1)(), app, dbw);
- string log = (F("propagate from branch '%s' (head %s)\n"
- " to branch '%s' (head %s)\n")
+ string log = (boost::format("propagate from branch '%s' (head %s)\n"
+ " to branch '%s' (head %s)\n")
% idx(args, 0) % (*src_i)
% idx(args, 1) % (*dst_i)).str();
@@ -3314,10 +3232,10 @@
cert_revision_in_branch(merged, branch, app, dbw);
- string log = (F("explicit_merge of %s\n"
- " and %s\n"
- " using ancestor %s\n"
- " to branch '%s'\n")
+ string log = (boost::format("explicit_merge of '%s'\n"
+ " and '%s'\n"
+ " using ancestor '%s'\n"
+ " to branch '%s'\n")
% left % right % ancestor % branch).str();
cert_revision_changelog(merged, log, app, dbw);
@@ -3445,7 +3363,8 @@
CMD(rcs_import, N_("debug"), N_("RCSFILE..."),
N_("parse versions in RCS files\n"
- "this command doesn't reconstruct or import revisions. you probably want cvs_import"),
+ "this command doesn't reconstruct or import revisions."
+ "you probably want cvs_import"),
OPT_BRANCH_NAME)
{
if (args.size() < 1)
@@ -3552,7 +3471,7 @@
app.db.get_manifest(rev.new_manifest, mm);
manifest_map::const_iterator i = mm.find(file);
N(i != mm.end(),
- F("No such file '%s' in revision %s\n") % file % rid);
+ F("no such file '%s' in revision '%s'\n") % file % rid);
file_id fid = manifest_entry_id(*i);
L(F("annotate for file_id %s\n") % manifest_entry_id(*i));
@@ -3560,7 +3479,7 @@
}
CMD(log, N_("informative"), N_("[FILE]"),
- N_("print history in reverse order (filtering by 'FILE'). If one or more\n"
+ N_("print history in reverse order (filtering by 'FILE'). If one or more\n"
"revisions are given, use them as a starting point."),
OPT_LAST % OPT_REVISION % OPT_BRIEF % OPT_DIFFS % OPT_NO_MERGES)
{
@@ -3727,16 +3646,16 @@
}
}
-
CMD(setup, N_("tree"), N_("DIRECTORY"), N_("setup a new working copy directory"),
OPT_BRANCH_NAME)
{
- string dir;
-
if (args.size() != 1)
throw usage(name);
- dir = idx(args,0)();
+ N(!app.branch_name().empty(), F("need --branch argument for setup"));
+ app.db.ensure_open();
+
+ string dir = idx(args,0)();
app.create_working_copy(dir);
revision_id null;
put_revision_id(null);
@@ -3758,7 +3677,10 @@
"inventory\n"
"stdio\n"
"certs REV\n"
- "select SELECTOR\n"),
+ "select SELECTOR\n"
+ "get_file ID\n"
+ "get_manifest [ID]\n"
+ "get_revision [ID]\n"),
N_("automation interface"),
OPT_NONE)
{
========================================================================
--- configure.ac 84632e90c32942348f38e80ec5d0e47baed43ad4
+++ configure.ac 289e0cb6ea26e1a8e515e7f81626a49e77381d69
@@ -254,12 +254,15 @@
__wont_compile_
#endif
],
- AM_CONDITIONAL(WIN32_PLATFORM, true),
- AM_CONDITIONAL(WIN32_PLATFORM, false),
+ ac_win32=yes,
+ ac_win32=no,
+ ac_win32=no)])
+if test "$ac_win32" = "yes"; then
+ AM_CONDITIONAL(WIN32_PLATFORM, true)
+else
AM_CONDITIONAL(WIN32_PLATFORM, false)
-)])
+fi
-
# Check for IPv6. Let the user enable or disable it manually using a
# three-state (yes|no|auto) --enable argument.
AC_ARG_ENABLE(ipv6,
========================================================================
--- contrib/monotone-cvs-ignore.lua
+++ contrib/monotone-cvs-ignore.lua 9d8fe793ab5c6f3a5c21f534ceedea2796ee58eb
@@ -0,0 +1,27 @@
+function glob_to_pattern(glob)
+ local pattern
+
+ -- escape all special characters:
+ pattern = string.gsub(glob, "([%^%$%(%)%%%.%[%]%*%+%-%?])", "%%%1")
+
+ -- convert the glob's ones to pattern's:
+ pattern = string.gsub(pattern, "%%%*", "[^/]*")
+ pattern = string.gsub(pattern, "%%%?", ".")
+
+ return pattern
+end
+
+function ignore_file(name)
+ local dir, pat1, pat2
+
+ dir = string.gsub(name, "/[^/]+$", "/")
+ if (dir == name) then dir = "" end
+ pat1 = "^" .. glob_to_pattern(dir)
+
+ for line in io.lines(dir .. ".cvsignore") do
+ pat2 = glob_to_pattern(line) .. "$"
+ if (string.find(name, pat1 .. pat2)) then return true end
+ end
+
+ return false
+end
========================================================================
--- contrib/parse-accounting.pl
+++ contrib/parse-accounting.pl 4b8d042f81fbd18ab8efeedaf705fb5854e31e18
@@ -0,0 +1,101 @@
+#!/usr/bin/perl -w
+use strict;
+use FileHandle;
+
+# possible values that can be extracted from the file...
+my ($cpus, $max_size, $max_resident, $copied, $malloc);
+
+die "Usage: " unless @ARGV == 3;
+
+my ($test,$what,$file) = @ARGV;
+
+parse_file($file);
+
+if (defined $copied && defined $malloc && defined $max_resident && defined $max_size) {
+ if ($test eq 'header') {
+ print <<'END_OF_HEADER';
+ Maximum (MiB) Copied Malloc
+ *Test* Operation CPU(s) Size Resident (MiB) (MiB)
+---------------- --------- ------ ------- ------- -------- --------
+END_OF_HEADER
+ }
+ eval '
+ format STDOUT =
+@<<<<<<<<<<<<<<< @<<<<<<<< @###.# @###.## @###.## @####### @#######
+$test, $what, $cpus, $max_size, $max_resident, $copied, $malloc
+.
+ '; die $@ if $@
+} elsif (defined $max_resident && defined $max_size) {
+ if ($test eq 'header') {
+ print <<'END_OF_HEADER';
+ Maximum (MiB)
+ *Test* Operation CPU(s) Size Resident
+---------------- --------- ------ ------- -------
+END_OF_HEADER
+ }
+ eval '
+ format STDOUT =
+@<<<<<<<<<<<<<<< @<<<<<<<< @###.# @###.## @###.##
+$test, $what, $cpus, $max_size, $max_resident,
+.
+ '; die $@ if $@
+} else {
+ if ($test eq 'header') {
+ print <<'END_OF_HEADER';
+ *Test* Operation CPU(s)
+---------------- --------- ------
+END_OF_HEADER
+ }
+ eval '
+ format STDOUT =
+@<<<<<<<<<<<<<<< @<<<<<<<< @###.#
+$test, $what, $cpus
+.
+ '; die $@ if $@
+}
+
+exit(0) if $test eq 'header';
+
+$max_size ||= -1;
+$max_resident ||= -1;
+$copied ||= -1;
+$malloc ||= -1;
+
+write;
+
+sub parse_file {
+ my($file) = @_;
+
+ my $fh = new FileHandle($file) or die "Can't open $file for read: $!";
+ my ($usertime,$systime);
+ while(<$fh>) {
+ # parse builtin accounting...
+ $cpus = $1 + $2
+ if /^STATS: User time: (\d+\.\d+)s, System time: (\d+\.\d+)s$/o;
+ ($max_size,$max_resident) = ($1,$2)
+ if /^STATS: Max Size MiB: (\d+\.\d+), Max Resident MiB: (\d+\.\d+)$/o;
+ $copied = $1
+ if /^STATS: MiB copied: (\d+\.\d+), Total/o;
+ $malloc = $1
+ if /^STATS: MiB malloced: (\d+\.\d+), Malloc/o;
+
+ # parse external accounting by /usr/bin/time on debian...
+ $usertime = $1 * 60 + $2
+ if /^user\s+(\d+)m(\d+\.\d+)s$/o;
+ $systime = $1 * 60 + $2
+ if /^sys\s+(\d+)m(\d+\.\d+)s$/o;
+ # parse external accounting by time in zsh...
+ ($usertime,$systime) = ($1,$2)
+ if /^(\d+\.\d+)user (\d+\.\d+)system .*CPU/o;
+ }
+
+ if (defined $usertime || defined $systime) {
+ die "both internal and external statistics?? log in $file"
+ if defined $cpus;
+ die "missing user or system time?? log in $file"
+ unless defined $usertime && defined $systime;
+ $cpus = $usertime + $systime;
+ }
+ die "internal, didn't get cpu seconds from $file?!" unless defined $cpus;
+}
+
========================================================================
--- contrib/perf-test.sh
+++ contrib/perf-test.sh 37672e98ef9148f8aef18ac7a520139d8de860d9
@@ -0,0 +1,316 @@
+#!/bin/sh
+set -e
+if [ "$1" = "" ]; then
+ MONOTONE=`pwd`/monotone
+elif [ -x "$1" ]; then
+ MONOTONE="$1"
+else
+ echo "Usage: $0 [monotone-binary-to-test [test-to-run ...]]"
+ exit 1
+fi
+
+if [ ! -x $MONOTONE ]; then
+ echo "$MONOTONE doesn't exist?!"
+ exit 1
+fi
+
+PARSE_ACCOUNT=`pwd`/contrib/parse-accounting.pl
+if [ -x $PARSE_ACCOUNT ]; then
+ :
+elif [ -x `dirname $MONOTONE`/contrib/parse-accounting.pl ]; then
+ PARSE_ACCOUNT=`dirname $MONOTONE`/contrib/parse-accounting.pl
+else
+ echo "can't find parse-accounting.pl. Looked in `pwd`/contrib, and `dirname $MONOTONE`/contrib"
+ exit 1
+fi
+
+MONOTONE_DB=`cat MT/options | grep database | awk '{print $2}' | sed 's/^.//' | sed 's/.$//'`
+if [ -z "$MONOTONE_DB" -o ! -f "$MONOTONE_DB" ]; then
+ echo "Couldn't auto-determine monotone db?!"
+ exit 1
+fi
+[ -d /tmp/mt-perf-test ] || mkdir /tmp/mt-perf-test
+cd /tmp/mt-perf-test
+
+# figure out if binary has timing built in...
+ENABLE_MONOTONE_STATISTICS=1 $MONOTONE --help >timing-check.out 2>&1
+if [ `grep '^STATS: ' timing-check.out | wc -l` -gt 1 ]; then
+ MEASURE=
+ PIDFILE_ARG=
+ KILLBY=child
+ echo "Using builtin statistics..."
+else
+ MEASURE=time
+ PIDFILE_ARG=--pid-file=/tmp/mt-perf-test/pid-file
+ KILLBY=file
+ echo "Using external statistics..."
+fi
+
+[ -d staging ] || mkdir staging
+cd staging
+
+# Rebuild all of the various files for testing ...
+
+if [ ! -f random.large ]; then
+ echo "rebuilding random.large (this takes a long time)..."
+ dd if=/dev/urandom of=random.large-new bs=1024k count=100 >/dev/null 2>&1
+ mv random.large-new random.large
+fi
+
+for i in 0 1 2; do
+ for j in 0 1 2 3 4 5 6 7 8 9; do
+ if [ ! -f random.medium.$i$j ]; then
+ echo "rebuilding random.medium.$i$j..."
+ dd if=/dev/urandom of=random.medium-new bs=1024k count=10 >/dev/null 2>&1
+ mv random.medium-new random.medium.$i$j
+ fi
+ done
+done
+
+if [ ! -f halfzero.large ]; then
+ echo "rebuilding halfzero.large..."
+ dd if=/dev/zero of=halfzero.large-new bs=1024k count=50 >/dev/null 2>&1
+ dd if=/dev/urandom of=halfzero.large-new bs=1024k seek=50 count=50 >/dev/null 2>&1
+ mv halfzero.large-new halfzero.large
+fi
+
+if [ ! -d monotone ]; then
+ [ ! -d monotone-new ] || rm -rf monotone-new
+ mkdir monotone-new
+ # revisions 0.10 .. 0.22
+ for i in 713ed1966baced883ed865a931f97259522f90da fdc32bcc09e2714350fb514990bd26acb607264b 3cd6b8cc947ddab015fd945d3c305fc748bb6d0a 95a1a16c0941cc1ae51e9eb5d64d075ef35c5b19 fdf1335b4dfd8c1529fef8db58e5b819b03f7c8a 20b36b747dcce1230a6e7a0b1554bd7874f0fbe7 35da5df64546301d332303bbf63b6799d70932c8 e8c9e4eb0534a4c6e538935576330de34ec42052 168adf9537ff136c9b7fe7faad5991f92859390d 44ed8807bead656889fb5022f974e13a7169098c e65bc11b6670a0b2ed8e72214cb81d94e6a9a2d1 28058ae3e850229a5d8fae65415cbbf82b435377; do
+ echo "checking out monotone rev $i..."
+ $MONOTONE --db $MONOTONE_DB checkout --revision $i monotone-new/mt-$i
+ done
+ # Version 0.17, had to specify the branch explicitly to get checkout to work.
+ i=337d62e5cbd50c36e2f2c2bda489a98de3a8aeb7
+ echo "checking out monotone rev $i..."
+ $MONOTONE --db $MONOTONE_DB checkout --branch net.venge.monotone --revision $i monotone-new/mt-$i
+ mv monotone-new/mt-168adf9537ff136c9b7fe7faad5991f92859390d monotone-new/mt-0.19
+ rm -rf monotone-new/*/MT
+ mv monotone-new monotone
+fi
+
+cd /tmp/mt-perf-test
+if [ ! -d dbdir ]; then
+ [ ! -d dbdir-new ] || rm -rf dbdir-new
+ mkdir dbdir-new
+ cd dbdir-new
+ cat >monotonerc <keys </dev/null 2>&1
+}
+
+load_zero_large() {
+ dd if=/dev/zero of=zero.large bs=1024k count=100 >/dev/null 2>&1
+}
+
+load_random_medium() {
+ cp -rp ../staging/random.medium.00 .
+}
+
+load_random_medium_20() {
+ cp -rp ../staging/random.medium.[01]? .
+}
+
+load_halfzero_large() {
+ cp -rp ../staging/halfzero.large .
+}
+
+load_random_large() {
+ cp -rp ../staging/random.large .
+}
+
+load_monotone() {
+ cp -rp ../staging/monotone/mt-0.19 .
+}
+
+load_mt_multiple() {
+ cp -rp ../staging/monotone .
+}
+
+load_mt_bigfiles() {
+ for i in ../staging/monotone/mt-*; do
+ j=`basename $i`
+ find $i -type f -exec cat '{}' \; >$j.txt
+ done
+}
+
+load_mixed() {
+ if [ "$1" = "" ]; then
+ echo "Usage load_mixed #"
+ exit 1
+ fi
+ RANDOM_LIST=(`ls ../staging/random.medium.??`)
+ MONOTONE_LIST=(`ls -d ../staging/monotone/mt-*`)
+ dd if=/dev/zero of=zero.med bs=1024k count=10 >/dev/null 2>&1
+ i=0;
+ j=0;
+ while [ $i -lt $1 ]; do
+ MT_PATH=${MONOTONE_LIST[$i]}
+ MT_NAME=`basename $MT_PATH`
+ [ -d $MT_NAME ] || cp -rp $MT_PATH .
+ cp ${RANDOM_LIST[$j]} $MT_NAME
+ cat zero.med >>$MT_NAME/`basename ${RANDOM_LIST[$j]}`
+ j=`expr $j + 1`
+ cp ${RANDOM_LIST[$j]} $MT_NAME
+ cat zero.med >>$MT_NAME/`basename ${RANDOM_LIST[$j]}`
+ j=`expr $j + 1`
+ i=`expr $i + 1`
+ done
+}
+
+load_mixed_1() {
+ load_mixed 1
+}
+
+load_mixed_4() {
+ load_mixed 4
+}
+
+load_mixed_12() {
+ load_mixed 12
+}
+
+load_everything() {
+ # print something out here even though it means removing
+ # from the output because it takes so long.
+ echo -n "load everything...";
+ load_zero_small
+ echo -n "."
+ load_zero_large
+ echo -n "."
+ load_random_medium_20
+ echo -n "."
+ load_halfzero_large
+ echo -n "."
+ load_random_large
+ echo -n "."
+ load_mt_multiple
+ echo -n "."
+ load_mt_bigfiles
+ echo -n "."
+ load_mixed_12
+ echo "."
+}
+
+prep_test() {
+ cd /tmp/mt-perf-test/dbdir
+ [ ! -f checkin.db ] || rm checkin.db
+ [ ! -f netsync.db ] || rm netsync.db
+ [ ! -f checkin.db-journal ] || rm checkin.db-journal
+ [ ! -f netsync.db-journal ] || rm netsync.db-journal
+
+ $MONOTONE --db checkin.db db init >/tmp/mt-perf-test/log 2>&1
+ $MONOTONE --db netsync.db db init >>/tmp/mt-perf-test/log 2>&1
+ cat keys | $MONOTONE --db checkin.db read >>/tmp/mt-perf-test/log 2>&1
+ cat keys | $MONOTONE --db netsync.db read >>/tmp/mt-perf-test/log 2>&1
+
+ cd /tmp/mt-perf-test
+ [ ! -d testdir ] || rm -rf testdir
+ $MONOTONE --db dbdir/checkin.db setup --branch test testdir >>/tmp/mt-perf-test/log 2>&1
+ cd testdir
+}
+
+dotest() {
+ prep_test
+ load_$1
+ export ENABLE_MONOTONE_STATISTICS=1
+ $MEASURE $MONOTONE add . >/tmp/mt-perf-test/add.log 2>&1
+ $PARSE_ACCOUNT "$1" "add files" /tmp/mt-perf-test/add.log
+
+ cp ../dbdir/monotonerc MT/monotonerc
+ $MEASURE $MONOTONE commit -m foo >/tmp/mt-perf-test/commit.log 2>&1
+ $PARSE_ACCOUNT "$1" "commit" /tmp/mt-perf-test/commit.log
+
+ cd ..
+ rm -rf testdir
+ $MEASURE $MONOTONE --db dbdir/checkin.db checkout --branch test testdir >/tmp/mt-perf-test/checkout.log 2>&1
+ $PARSE_ACCOUNT "$1" "checkout" /tmp/mt-perf-test/checkout.log
+
+ cd testdir
+ cp ../dbdir/monotonerc MT/monotonerc
+ [ -f /tmp/mt-perf-test/pid-file ] && rm /tmp/mt-perf-test/pid-file
+ $MEASURE $MONOTONE --db ../dbdir/checkin.db $PIDFILE_ARG serve localhost:7318 test >/tmp/mt-perf-test/serve.log 2>&1 &
+ SERVER=$!
+ sleep 1
+ $MEASURE $MONOTONE --db ../dbdir/netsync.db pull localhost:7318 test >/tmp/mt-perf-test/pull.log 2>&1
+ # SEGV here is intentional, it causes the server to exit through an
+ # assertion which prints out the accounting information
+ case $KILLBY in
+ child) kill -SEGV $SERVER ;;
+ file) kill -SEGV `cat /tmp/mt-perf-test/pid-file` ;;
+ *) echo "internal error, unknown killby '$KILLBY'" ;;
+ esac
+ wait $SERVER || true
+ $PARSE_ACCOUNT "$1" "serve" /tmp/mt-perf-test/serve.log
+ $PARSE_ACCOUNT "$1" "pull" /tmp/mt-perf-test/pull.log
+ echo
+ unset ENABLE_MONOTONE_STATISTICS
+}
+
+echo -n "Test CPU: "
+grep 'model name' /proc/cpuinfo | sed 's/model name.: //' | head -1
+$MONOTONE --version 2>&1 | grep 'base revision'
+ENABLE_MONOTONE_STATISTICS=1 $MEASURE $MONOTONE --help >/tmp/mt-perf-test/help.log 2>&1
+$PARSE_ACCOUNT header header /tmp/mt-perf-test/help.log
+if [ "$2" != "" ]; then
+ shift
+ while [ "$1" != "" ]; do
+ dotest "$1"
+ shift
+ done
+ exit 0
+fi
+dotest zero_small
+dotest zero_large
+dotest random_medium
+dotest random_medium_20
+dotest halfzero_large
+dotest random_large
+dotest monotone
+dotest mt_multiple
+dotest mt_bigfiles
+dotest mixed_1
+dotest mixed_4
+dotest mixed_12
+dotest everything
+
========================================================================
--- database.cc 99621dc8dd3b871fc41204945906db116111519d
+++ database.cc 04b7bf7f3d9722bb194a0623a339babc83d95c74
@@ -363,7 +363,8 @@
tmp.erase(0, len);
}
- sqlite3_exec(__sql, tmp.c_str(), NULL, NULL, NULL);
+ if (!tmp.empty())
+ sqlite3_exec(__sql, tmp.c_str(), NULL, NULL, NULL);
assert_sqlite3_ok(__sql);
}
========================================================================
--- file_io.cc a887c87104212bab175b54ec1ceb1fa5153024e5
+++ file_io.cc e39a1c13030c5378ea4cb3aa9621148ce0c8fb7d
@@ -1,3 +1,4 @@
+// -*- mode: C++; c-file-style: "gnu"; indent-tabs-mode: nil -*-
// copyright (C) 2002, 2003 graydon hoare
// all rights reserved.
// licensed to the public under the terms of the GNU GPL (>= 2)
@@ -123,15 +124,44 @@
return true;
}
-bool guess_binary(string const & s)
+static bool did_char_is_binary_init;
+static bool char_is_binary[256];
+
+void
+set_char_is_binary(char c, bool is_binary)
{
+ char_is_binary[static_cast(c)] = is_binary;
+}
+
+static void
+init_char_is_binary()
+{
// these do not occur in ASCII text files
// FIXME: this heuristic is (a) crap and (b) hardcoded. fix both these.
- if (s.find_first_of('\x00') != string::npos ||
- s.find_first_of("\x01\x02\x03\x04\x05\x06\x0e\x0f"
- "\x10\x11\x12\x13\x14\x15\x16\x17\x18"
- "\x19\x1a\x1c\x1d\x1e\x1f") != string::npos)
- return true;
+ // Should be calling a lua hook here that can use set_char_is_binary()
+ // That will at least fix (b)
+ string nontext_chars("\x01\x02\x03\x04\x05\x06\x0e\x0f"
+ "\x10\x11\x12\x13\x14\x15\x16\x17\x18"
+ "\x19\x1a\x1c\x1d\x1e\x1f");
+ set_char_is_binary('\0',true);
+ for(size_t i = 0; i < nontext_chars.size(); ++i)
+ {
+ set_char_is_binary(nontext_chars[i], true);
+ }
+}
+
+bool guess_binary(string const & s)
+{
+ if (did_char_is_binary_init == false)
+ {
+ init_char_is_binary();
+ }
+
+ for (size_t i = 0; i < s.size(); ++i)
+ {
+ if (char_is_binary[ static_cast(s[i]) ])
+ return true;
+ }
return false;
}
@@ -448,7 +478,7 @@
switch (get_path_status(path))
{
case path::nonexistent:
- N(require_existing_path, F("no such file or directory") % path);
+ N(!require_existing_path, F("no such file or directory: '%s'") % path);
walker.visit_file(path);
break;
case path::file:
========================================================================
--- file_io.hh f104a889390ecd8eb031a56a81862cfef3aec01a
+++ file_io.hh 16f383f0e4eb6fa8454fce1071880f066fc69bdb
@@ -46,6 +46,7 @@
// returns true if the string content is binary according to monotone heuristic
bool guess_binary(std::string const & s);
+void set_char_is_binary(char c, bool is_binary);
void mkdir_p(any_path const & path);
void make_dir_for(any_path const & p);
========================================================================
--- keys.cc 444db9ef45da738d82da852b28e12e3c378b6d7e
+++ keys.cc cf21506cfc9735f800dccf4d1c3b575fa97bab90
@@ -474,6 +474,32 @@
calculate_ident(tdat, out);
}
+// helper to compare if two keys have the same hash
+// (ie are the same key)
+bool
+keys_match(rsa_keypair_id const & id1,
+ base64 const & key1,
+ rsa_keypair_id const & id2,
+ base64 const & key2)
+{
+ hexenc hash1, hash2;
+ key_hash_code(id1, key1, hash1);
+ key_hash_code(id2, key2, hash2);
+ return hash1 == hash2;
+}
+
+bool
+keys_match(rsa_keypair_id const & id1,
+ base64< arc4 > const & key1,
+ rsa_keypair_id const & id2,
+ base64< arc4 > const & key2)
+{
+ hexenc hash1, hash2;
+ key_hash_code(id1, key1, hash1);
+ key_hash_code(id2, key2, hash2);
+ return hash1 == hash2;
+}
+
void
require_password(rsa_keypair_id const & key,
app_state & app)
========================================================================
--- keys.hh 3618c073f57fdabfaf53fbf596c4d7d324aa2be5
+++ keys.hh 16c620ec000b13c0ef656a92a59c18660d4c1aaf
@@ -72,6 +72,15 @@
base64< arc4 > const & priv,
hexenc & out);
+bool keys_match(rsa_keypair_id const & id1,
+ base64 const & key1,
+ rsa_keypair_id const & id2,
+ base64 const & key2);
+bool keys_match(rsa_keypair_id const & id1,
+ base64< arc4 > const & key1,
+ rsa_keypair_id const & id2,
+ base64< arc4 > const & key2);
+
#endif // __KEYS_HH__
========================================================================
--- lua.cc 60a450c0fcb35a460fdfe3a6fe4d74b5dd9612e0
+++ lua.cc f8a4f1818ea770532218416cb55752238c1f3ce3
@@ -1,3 +1,4 @@
+// -*- mode: C++; c-file-style: "gnu"; indent-tabs-mode: nil -*-
// copyright (C) 2002, 2003 graydon hoare
// all rights reserved.
// licensed to the public under the terms of the GNU GPL (>= 2)
@@ -19,9 +20,11 @@
#include
#include
#include
+#include
#include
#include