#
# add_file "sqlite/callback.c"
#
# add_file "sqlite/prepare.c"
#
# add_file "tests/t_cvsimport_drepper2.at"
#
# add_file "tests/t_db_kill_branch_locally.at"
#
# add_file "tests/t_existsonpath.at"
#
# patch "AUTHORS"
# from [ff466bec33fb81e11e8f7dc8cc425e89ee70f745]
# to [7a3afb6e49bc3428635204b2eed5f39c7375c950]
#
# patch "ChangeLog"
# from [25e008239fd5cad9a208851b8bcd0d7f3be03de5]
# to [acc813649d4cffb7939260314cc6d26ae1f7f789]
#
# patch "INSTALL"
# from [400eaf8e798d44fce8b0622c88bc324fd31830c2]
# to [347e0770a3316aa30c3e9d1519db0ca66988781e]
#
# patch "Makefile.am"
# from [cbd9fbc3d73a88f56a538bc5050a2ce3a2ffee31]
# to [ca602dd61d7c6f3c4a1b290c56ae7ac1a67f0451]
#
# patch "NEWS"
# from [542138ab98bf754cb1b2f2d86652f9abf2b438e3]
# to [412bb443772db09ff7dd1ce53414fc98bd90bb5c]
#
# patch "app_state.cc"
# from [1e2cfd4af8c4ccc2b721c758469659dc3d7f4131]
# to [d4bde5580532bd066167f9ece19ac0410398fdde]
#
# patch "automate.cc"
# from [646411d161574bb13a8cb76ff8f8abd28de310ba]
# to [7492b76019ac6578ecc8e1fec67025cff1ffbc39]
#
# patch "basic_io.hh"
# from [b61d8da0f80ba7017e11e68e91809c95f4415b43]
# to [ddf2b4dbcf7bedb37aa96ef1634c41d2d58a249e]
#
# patch "cert.cc"
# from [07be077e4c0d53abd9cac0bbdf201e808cf221a5]
# to [0c6926cd5d66887e8449302640c57f94d95eaa00]
#
# patch "change_set.cc"
# from [803ba53c5e9aafcbc72169471fec66bcee20e14d]
# to [140b7e4eaf348923275c40452cf25c0264966dfb]
#
# patch "commands.cc"
# from [c9dd7afdabd028f1a9ec18da9aa1a9de1670765d]
# to [d155ea587e6ee57f7057e497579cf08a4882fb8c]
#
# patch "contrib/monotone-import.pl"
# from [936971f03dcd0f03c175973cddb9387c2bf1cb59]
# to [d51a87380e1d820c4311a361a155bd56f50afa24]
#
# patch "contrib/mtbrowse.sh"
# from [9ad2130061d1372f803e9b59e3f45bf38609c31a]
# to [a97e1412853098d6472fc5747bb659dca3bfdbe3]
#
# patch "cryptopp/config.h"
# from [e6a83896c58c998e79adebed9dd975cae332523d]
# to [cffb39ab0c2b4b02984adc4f024b5192a2851a8e]
#
# patch "cryptopp/integer.cpp"
# from [103774f8fdc7bba70d9c8c36c12278fdfbdddff1]
# to [f21803a0c45376b1be12f49c04cbd13cdefc4951]
#
# patch "database.cc"
# from [1ce26993177acbeb3e3d18aba17f43700372fa3c]
# to [31bf34b9a9899ae714bd8cb34c880d49f851ca69]
#
# patch "database.hh"
# from [402c6310d759c4934fc19ba823f2536ca3251d46]
# to [8eff7740768dec012533217d6771853b705a3254]
#
# patch "main.cc"
# from [24910dffe664f34ffa8bb09e201ed03631dec629]
# to [0f905ade02dd9188922f3c04700501c6f7d4b57d]
#
# patch "merkle_tree.cc"
# from [b0a8cacb8d29ab4a8500c0f2cb34509783dca4c8]
# to [2088ec84695cc4d4290728085f3e5d7900e9a9ba]
#
# patch "merkle_tree.hh"
# from [79d95a4f0dc25d93faae1a64544dca80adce5d76]
# to [aa4d5bed0d7dee09fd72c2068c626061c30a6937]
#
# patch "monotone.cc"
# from [8469a8de748e5eb3958f74fc204703a041b1a86c]
# to [21b832dddae51e882d8df1c744b159f1a7642c22]
#
# patch "monotone.texi"
# from [18fdc4eac00664cacf2ca7e151a07c8ece75a479]
# to [aea7f0c2241348081d1c31ab77cdab0cbe18d6fe]
#
# patch "netcmd.cc"
# from [672a3694248e09ec47f64929e99411c1a35ae745]
# to [844f0f7559a6415ef30a28d99fa6ea76a1c71a0c]
#
# patch "netsync.cc"
# from [f1056e86785d18c2a7da04c76086fd3c5106ab9c]
# to [e9786aaaad7990675f952101b544f35fd168df4c]
#
# patch "netxx/osutil.h"
# from [410b3050e6da00aca1cbe528773bc33cb1465060]
# to [d852d45641d2b6a72f9627b9ef3b3517247e1693]
#
# patch "packet.cc"
# from [bd0eb9d56a0d3845911aa49ed31353a9e40f9fe5]
# to [e51ed2792c8751cf45a0344503d3860c0d38d3f1]
#
# patch "rcs_file.cc"
# from [888ba309a3a161cddb6f63f510e1e9bfb7b7da63]
# to [8f2bc1920dfa4a94fd265b03e081da13b3a171a8]
#
# patch "rcs_import.cc"
# from [12affac881ab416406a9b81ec4700242bb5a0829]
# to [b90ec8325f19892896d9692fc01893c9d8816594]
#
# patch "rcs_import.hh"
# from [6b3bc7d569e1f4fb65238ad258c11793c9dbca82]
# to [eba99da6a1751f001de5a9937f8f71852836553b]
#
# patch "revision.cc"
# from [dab8f8c33fc1b34f01958d267e98164a96e52738]
# to [f9c7fd64e999ea82f190e9f67fd27caabce6e5b4]
#
# patch "sqlite/alter.c"
# from [9570af388bc99471ea6e1258817fbf06e3120030]
# to [03041f2464e22532601254f87cb49997fa21dcdf]
#
# patch "sqlite/btree.c"
# from [25770f8cf1fe778757b69cbe0b84c02615c6e1f5]
# to [d2e09ebf755bfd665727133361b22c6a915b12d7]
#
# patch "sqlite/build.c"
# from [8afb06c791adcde7787f157bbc55aeef27fb27c1]
# to [593d8fda0576a72e6f1fbf8f1a61db110dde9264]
#
# patch "sqlite/callback.c"
# from []
# to [0910b611e0c158f107ee3ff86f8a371654971e2b]
#
# patch "sqlite/delete.c"
# from [d70d54a84695de92efc05b9db7d3684cd21d9094]
# to [4b68127f55971c7fb459146e0b6cf3bd70cfffe9]
#
# patch "sqlite/expr.c"
# from [bf7253cd2d828ec8bf321321c2598e4b8918d79b]
# to [6d7058944c5f4b7e4304be3fe63ada91dac221a1]
#
# patch "sqlite/func.c"
# from [ff0673a25ec6216934e664bf9f480ae8b2c66936]
# to [f208d71f741d47b63277530939f552815af8ce35]
#
# patch "sqlite/insert.c"
# from [34c25c33f51a43644a42cc091ac967b070c6b6d5]
# to [8c0868a975fe37366ed92e1b976853be96284607]
#
# patch "sqlite/keywordhash.h"
# from [e8949ba18076ed0333bfcec91ca2f75372a318c8]
# to [9f753ca12591e9ac7d627850e28217bf1fb96c26]
#
# patch "sqlite/main.c"
# from [531fab947f72d3b6e86476ed4594838a2fa277f5]
# to [16ab37b7b3aa57bcfb6b687474b2553c67b1a7fe]
#
# patch "sqlite/opcodes.c"
# from [92970dd49bab22c37e0aa4306379015aa8493d93]
# to [09ba45fa2716974a205f0514fda43e0d52c50ecc]
#
# patch "sqlite/opcodes.h"
# from [90bdbb426dc13fbec8ac93f59de8f23d5f271db7]
# to [c350694b63ef80daafa7d04f71a6d921aa4935e2]
#
# patch "sqlite/os.h"
# from [0c805df3df02b98eb78a7a86756c3cbd4e190939]
# to [c4b34bd4d6fea51a420f337468b907f4edecb161]
#
# patch "sqlite/os_unix.c"
# from [fba0167576f09e242afd4c4978e1d2944b1da8b5]
# to [45540d7ee5095566da6685d584598edee5be857c]
#
# patch "sqlite/os_unix.h"
# from [40b2fd1d02cfa45d6c3dea25316fd019cf9fcb0c]
# to [39a393252e69e72b06715c9958df05ddbc4aa971]
#
# patch "sqlite/os_win.c"
# from [2bbbe6fbb010763c3fa79d5e951afca9b138c6b5]
# to [fe7b99cfcfb61d9bf54493ddf5857885a657fb89]
#
# patch "sqlite/pager.c"
# from [95e24c9134a00613ca87b963a84ad62d85d5b979]
# to [841a2cdddd4275de36cda26ed9dc54ae942660ce]
#
# patch "sqlite/pager.h"
# from [9a417a1e04737c227ebbba3bdf8597d6dd51513a]
# to [0d9153d6269d60d04af3dd84a0cc0a96253cf4a4]
#
# patch "sqlite/parse.c"
# from [bf752a2b845b64014c51c32f478edda7fbe0b63f]
# to [6671523c392fcf8287c08e5896cc2513987fc5cb]
#
# patch "sqlite/parse.h"
# from [c22a7a5d0ddf7da1a1a36cbc677489e69d4e5f3f]
# to [55c238b9c97ae9a71722f2fabf3e0d23660e4e63]
#
# patch "sqlite/pragma.c"
# from [845c8ab0ab7d09ed2115d3dfc859ba2364b365a7]
# to [5ea2ba0e43f6a83968a936b071b77bd4516d11f0]
#
# patch "sqlite/prepare.c"
# from []
# to [d53602d2f8e097225ae7c76ec764ae68f759ba47]
#
# patch "sqlite/random.c"
# from [eff68e3f257e05e81eae6c4d50a51eb88beb4ff3]
# to [90adff4e73a3b249eb4f1fc2a6ff9cf78c7233a4]
#
# patch "sqlite/select.c"
# from [a324af36afe5f050a1e070806ad3ededf1d58f50]
# to [28b752e58955c7920711fbdbfdcd369a2bd09448]
#
# patch "sqlite/sqlite3.h"
# from [cc5e1e2dfeb2a834e420412da25a92b742d76711]
# to [97fec5750fa71f8b162c9571a7e08413de9886ed]
#
# patch "sqlite/sqliteInt.h"
# from [474c20597ee66bb3a666bed0abd76e7be579184a]
# to [0722b47bae7acb182bf43be3585537027c63f741]
#
# patch "sqlite/tokenize.c"
# from [103cbaa932c790f540f8eceb63cd3010e117bdff]
# to [4b45f8c000202c877bcc567688c2ec21a01984b3]
#
# patch "sqlite/trigger.c"
# from [1a6d0c7c51b70bdc58d5068be72034071eff23ad]
# to [f51dec15921629591cb98bf2e350018e268b109a]
#
# patch "sqlite/update.c"
# from [42823d00865c9fe4f01b3c62647858726345a28e]
# to [e96c7b342cd8903c672162f4cf84d2c737943347]
#
# patch "sqlite/util.c"
# from [02bc2750336b021b3f10e61538f665c4b0033b5d]
# to [96008b52604d08b9cc57ed37350149d6ac8a1bf3]
#
# patch "sqlite/vacuum.c"
# from [5cf598003191bd91c17a64742bad8e46241698a8]
# to [829d9e1a6d7c094b80e0899686670932eafd768c]
#
# patch "sqlite/vdbe.c"
# from [cb701319876cb1332a7372feaaa1310cd463c9f6]
# to [c2511f392598928254504e3b2c5ec47f4fef2b53]
#
# patch "sqlite/vdbe.h"
# from [7f586cb6d6b57764e5aac1f87107d6a95ddce24c]
# to [75e466d84d362b0c4498978a9d6b1e6bd32ecf3b]
#
# patch "sqlite/vdbeInt.h"
# from [97b62807bd001efd82006460ad8a8d72d1c8d36d]
# to [4312faf41630a6c215924b6c7c2f39ebb1af8ffb]
#
# patch "sqlite/vdbeapi.c"
# from [467caa6e6fb9247528b1c7ab9132ae1b4748e8ac]
# to [3f858d2236df0d127249a6a166e0e25b5de650ed]
#
# patch "sqlite/vdbeaux.c"
# from [278ac982f1f64ee14c49aac127d9ddc6ee30cac6]
# to [c99e32abeba4b7522e3922afff2c32ff4bd17eb5]
#
# patch "sqlite/vdbemem.c"
# from [4e853ce3151eaf7906150da85a1b3ce1fe5e8da8]
# to [48a64ae95a9edc6e8d940300dad15d70d1670398]
#
# patch "sqlite/where.c"
# from [c4b227458e8993decb515ed9a2fe2d4f5f8e3125]
# to [3a9a2258ab3364655e9ea215ad5ae7bf41813f54]
#
# patch "std_hooks.lua"
# from [9b1a27e30129929aa366223e51f1c11ec918fc93]
# to [072c95bc58425ade43dc08e8361c7aca49275dd4]
#
# patch "tests/t_automate_stdio.at"
# from [82905ef9235da9d20dc5c56e9e0b3e0a55a919d4]
# to [e86f5d0e9f49172d5948e6131a8de64b5ff20bb1]
#
# patch "tests/t_cvsimport_drepper.at"
# from [fa1e2cb90749522674c28871a9a9971c7984c34c]
# to [5b803327cc8752bab50ced9a0efc4ce59a5244ef]
#
# patch "tests/t_cvsimport_drepper2.at"
# from []
# to [c0d315c7c6fd5077592b8d81ecbc8a801acc3e41]
#
# patch "tests/t_db_kill_branch_locally.at"
# from []
# to [dc67769b12aea0c26b6d4e3b2347c56ee99cde4b]
#
# patch "tests/t_db_kill_rev_locally.at"
# from [7833b3652bf45b72b9fb6490b86fe2b66d7105ee]
# to [a5043ae56c1d9ab1897594010d21b5e0851e572c]
#
# patch "tests/t_existsonpath.at"
# from []
# to [3bbd717c0872f45e088cd95b692a1fc0c649583f]
#
# patch "tests/t_selector_later_earlier.at"
# from [8e3a1438e23b7c4b562d254c55c2f2d4b0a75bd5]
# to [b3e5d9771d979375e79b8506d7b08b4aaa6fc18d]
#
# patch "testsuite.at"
# from [3d2b4ab8782f8c58fb72a8a12793ba102105e2c7]
# to [4cbb082cf10749231aaffa05b12dfdd51e8e2096]
#
# patch "unix/process.cc"
# from [c30edf9e74742079e4229bc8cfb0d44054e8c5c3]
# to [ac04438936f36fcf7a9eaeaffb60abd9f4dfe5d5]
#
--- AUTHORS
+++ AUTHORS
@@ -59,6 +59,7 @@
Timothy Brownawell
Matthew Gregan
Riccardo Ghetta
+ Brian Campbell
Ethan Blanton
Eric Anderson
--- ChangeLog
+++ ChangeLog
@@ -1,5 +1,147 @@
2005-07-05 Nathaniel Smith
+ * NEWS: First cut at 0.20 release notes.
+
+2005-07-03 Matthew Gregan
+
+ * sqlite/*, Makefile.am: Import SQLite 3.2.2 from upstream.
+ * sqlite/main.c: Compile fix.
+ * sqlite/{callback.c,prepare.c}: Add new files.
+
+2005-07-03 Matthew Gregan
+
+ * sqlite/{sqlite3.h,tokenize.c} (sqlite3_complete_last): New
+ function to find the last valid SQL statement in a string; based
+ on sqlite3_complete. This change should be offered upstream, but
+ probably not before sqlite3_complete_last16 is implemented.
+ * database.cc (database::load): Load and execute dump in chunks,
+ fixes bug 13570.
+
+2005-07-01 Matthew Gregan
+
+ * tests/t_cvsimport_drepper2.at: Canonicalise monotone output so
+ that the test passes on Win32.
+
+2005-06-30 Eric Kidd
+
+ * contrib/monotone-import.pl: Changed $branch to
+ $user_branch. This script may need more work, but at least Perl
+ compiles it now.
+
+2005-06-30 Patrick Mauritz
+
+ * automate.cc, basic_io.hh, cert.cc, change_set.cc,
+ cryptopp/config.h, cryptopp/integer.cpp, main.cc, merkle_tree.cc,
+ merkle_tree.hh, monotone.cc, netcmd.cc, netsync.cc,
+ netxx/osutil.h, packet.cc: Namespace and include file cleanup.
+
+2005-06-29 graydon hoare
+
+ * tests/t_cvsimport_drepper2.at: New test.
+ * testsuite.at: Call it.
+
+2005-06-23 graydon hoare
+
+ * rcs_import.cc (import_cvs_repo): Put branch imports inside
+ transaction blocks, add a couple tickers.
+
+2005-06-22 graydon hoare
+
+ * rcs_file.cc: Track file:line numbers, accept files which violate
+ some lies in rcs file format.
+ * rcs_import.cc (cvs_tree_walker):
+ Warn rather than crash on parse errors.
+ (cvs_history)
+ (cvs_commit)
+ (cvs_cluster)
+ (prepared_revision)
+ (import_branch)
+ (import_cvs_repo): Support non-branch tags.
+
+2005-06-21 graydon hoare
+
+ * rcs_import.{cc,hh} (import_rcs_file): Rename to test_parse_rcs_file.
+ * commands.cc (rcs_import): rename call.
+
+2005-06-19 graydon hoare
+
+ * rcs_import.cc: Rewrite change set inference logic.
+
+2005-06-28 Roland Illig
+
+ * app_state.cc: #include , needed on NetBSD.
+
+2005-06-28 Nathaniel Smith
+
+ * std_hooks.lua (ignore_file): Ignore vim swap files and emacs
+ temp files.
+
+2005-06-27 Nathaniel Smith
+
+ * INSTALL: Bump required version of Boost to 1.32.
+
+2005-06-26 Matthew Gregan
+
+ * app_state.cc (app_state::app_state()): Initialise no_merges to
+ false so that 'log' will show merges by default (the recently
+ added --no-merges option provides a means to disable the merge
+ entries).
+
+2005-06-26 Matthew Gregan
+
+ * commands.cc (CMD(db)): Added db kill_branch_locally command.
+ * database.cc, database.hh (delete_branch_named): New function to
+ delete all branch certs with a given branch name.
+ * monotone.texi (Database): Added documentation for db
+ kill_branch_locally.
+ * tests/t_db_kill_branch_locally.at: New test for db
+ kill_branch_locally.
+ * testsuite.at: Add the test.
+ * AUTHORS: Add myself.
+ * ChangeLog: Change my email address on an old contribution to
+ match my pubkey.
+
+2005-06-24 Nathaniel Smith
+
+ * tests/t_db_kill_rev_locally.at: Clean up style.
+
+2005-06-24 Nathaniel Smith
+
+ * unix/process.cc (process_spawn): Format log output correctly.
+
+2005-06-24 Nathaniel Smith
+
+ * unix/process.cc (existsonpath): Reindent. Add logging, and use
+ 'command -v' instead of 'which' (as per Matt Johnston's discovery
+ that it is more portable).
+ (process_spawn): Handle exec failure more properly.
+ * tests/t_existsonpath.at: New test.
+ * testsuite.at: Add it.
+
+2005-06-25 Matthew Gregan
+
+ * monotone.cc: Log correct locale set for LC_MESSAGES.
+
+2005-06-24 Nathaniel Smith
+
+ * unix/process.cc: Remove tabs.
+
+2005-06-24 Nathaniel Smith
+
+ * std_hooks.lua (get_preferred_merge2_command)
+ (get_preferred_merge3_command): Move meld to the bottom of the
+ default merge tool search order. Also, use xemacs if it appears
+ in $EDITOR, otherwise use emacs.
+ * revision.cc (check_sane_history): Remove stale comment.
+
+2005-07-05 Nathaniel Smith
+
* globish.cc (combine_and_check_globish): Don't add unnecessary
{}'s.
* tests/t_netsync_globs.at, testsuite.at: New test.
@@ -1219,7 +1361,7 @@
* work.cc: Use attr_file_name rather than hardcoded strings.
-2005-05-04 Brian Campbell
+2005-05-04 Brian Campbell
* contrib/monotone.el (monotone-vc-register): Fix arguments to
monotone-cmd-buf, to make work.
--- INSTALL
+++ INSTALL
@@ -13,7 +13,7 @@
* software prerequisites:
- a supported C++ compiler: g++ 3.2 or later.
- - an installed copy of boost 1.31.0 or later.
+ - an installed copy of boost 1.32.0 or later.
on debian:
@@ -49,9 +49,9 @@
assembled this abbreviated bourne shell sequence for advanced users
who do not need all the preamble:
- wget http://aleron.dl.sourceforge.net/sourceforge/boost/boost_1_31_0.tar.gz
- tar -xzf boost_1_31_0.tar.gz
- cd boost_1_31_0
+ wget http://aleron.dl.sourceforge.net/sourceforge/boost/boost_1_32_0.tar.gz
+ tar -xzf boost_1_32_0.tar.gz
+ cd boost_1_32_0
(cd tools/build/jam_src && ./build.sh)
BJAM=`find tools/build/jam_src/ -name bjam -a -type f`
$BJAM "-sBUILD=release single speed static"
@@ -63,13 +63,13 @@
ranlib libs/*.a
if this completes successfully, you will have a selection of boost
- libraries in boost_1_31_0/libs and boost headers in
- boost_1_31_0/boost. you can then either copy the .a files to your
- standard library path and the directory "boost_1_31_0/boost" to your
+ libraries in boost_1_32_0/libs and boost headers in
+ boost_1_32_0/boost. you can then either copy the .a files to your
+ standard library path and the directory "boost_1_32_0/boost" to your
standard include path, or you can pass additional configuration
options to your monotone configure build, such as:
- ./configure CPPFLAGS="-Iboost_1_31_0" LDFLAGS="-Lboost_1_31_0/libs"
+ ./configure CPPFLAGS="-Iboost_1_32_0" LDFLAGS="-Lboost_1_32_0/libs"
monotone does not use all of boost -- for instance, people often
have trouble building boost.python, which we do not use. you don't
--- Makefile.am
+++ Makefile.am
@@ -111,6 +111,7 @@
sqlite/util.c sqlite/vacuum.c \
sqlite/vdbe.c sqlite/vdbeapi.c sqlite/vdbeaux.c \
sqlite/vdbemem.c sqlite/where.c \
+ sqlite/prepare.c sqlite/callback.c \
\
sqlite/btree.h sqlite/config.h sqlite/hash.h sqlite/opcodes.h sqlite/os.h \
sqlite/os_common.h sqlite/os_unix.h sqlite/os_win.h \
--- NEWS
+++ NEWS
@@ -1,3 +1,92 @@
+????????????????????????????
+
+ 0.20 release. features, ui improvements, performance
+ improvements, and bug fixes.
+
+ - major changes in netsync UI: serve/sync/push/pull now take a
+ list of globs; clients can request arbitrary sets of
+ branches, not just predefined "collections". write
+ permissions are now granted on a per-db level (they were
+ before anyway).
+ - where you used to say, e.g., "monotone pull
+ net.venge.monotone", you should instead say
+ "monotone pull net.venge.monotone*". This may
+ require shell-quoting.
+ - 'get_netsync_write_permitted' hooks must be changed
+ to take only one argument, the 'identity'.
+ 'get_netsync_{read,anonymous_read}_permitted' hooks
+ now take a branch argument instead of a collection,
+ and will be called for each branch that a client
+ requests.
+ - 0.19 clients cannot talk to 0.20 servers, and vice-versa.
+ - special thanks to Timothy Brownawell
+ , Richard Levitte
+ .
+ - other major changes:
+ - cvs_import re-written; many bugs fixed. now
+ supports tags.
+ - many minor netsync changes:
+ - netsync traffic is now cryptographically authenticated
+ against corruption and man-in-the-middle attacks.
+ special thanks to Ethan Blanton ,
+ Matt Johnston .
+ - new hooks that are called when server receives data:
+ note_netsync_*_received. special thanks to Timothy
+ Brownawell .
+ - ancestry graphs that pass outside the given branch
+ are now synchronized correctly. special thanks to
+ Timothy Brownawell .
+ - UI improvements:
+ - 'log' options changed: --depth has become --last;
+ new options --no-merges, --diffs, --brief.
+ - 'status' has new option --brief. special thanks to
+ Derek Scherger .
+ - 'serve' has new option --pid-file. special thanks
+ to Matthew Gregan .
+ - all commands taking restrictions now take option
+ --depth, to limit recursion through subdirectories.
+ special thanks to Joel Reed .
+ - merge command all take --author, --date now.
+ - 'checkout', 'update' take --revision, instead of
+ using positional arguments. special thanks to Derek
+ Scherger , Richard Levitte
+ .
+ - 'commit' takes new --message-file option.
+ - new features:
+ - new commands: "db kill_branch_locally", "db
+ kill_revision_locally", useful for correcting some
+ mistakes. special thanks to Brian Campbell
+ , Sebastian Spaeth
+ .
+ - new file attribute 'manual_merge', to prevent invocation of
+ merger on binary files. hook added to guess correct
+ value at 'add' time. special thanks to Riccardo
+ Ghetta .
+ - new 'earlier than', 'later than' selectors. special
+ thanks to Riccardo Ghetta .
+ - new automate commands:
+ - 'stdio', for efficient use by
+ front-ends. special thanks to Timothy Brownawell
+ .
+ - 'select', for requesting the set of revisions
+ matching a selector. special thanks to Richard
+ Levitte .
+ - 'certs', for fetching certs on a revision in a
+ parseable (basic io-based) format. special thanks
+ to Grahame Bowland .
+ - 'inventory' output changed incompatibly; should be
+ much more usable now, and stable. special thanks to
+ Derek Scherger .
+ - better memory/performance when handling large files.
+ special thanks to Eric Anderson
+ , Timothy Brownawell
+ , Matt Johnston ,
+ Matthew Gregan .
+ - new text mode browser in contrib/mtbrowse.sh, by Henry
+ Nestler .
+ - improved zsh completion in contrib/monotone.zsh_completion,
+ by Joel Reed .
+
Tue May 3 00:31:37 PDT 2005
0.19 release. performance improvements, features, ui
--- app_state.cc
+++ app_state.cc
@@ -1,8 +1,10 @@
#include
#include
#include
#ifdef WIN32
#include /* for chdir() */
+#else
+#include /* for chdir() on POSIX */
#endif
#include // for strtoul()
@@ -31,7 +33,7 @@
app_state::app_state()
: branch_name(""), db(""), stdhooks(true), rcfiles(true), diffs(false),
- verbose(false), search_root("/"), depth(-1), last(-1)
+ no_merges(false), verbose(false), search_root("/"), depth(-1), last(-1)
{
db.set_app(this);
}
--- automate.cc
+++ automate.cc
@@ -856,7 +856,7 @@
// Make the output deterministic; this is useful for the test suite, in
// particular.
- sort(certs.begin(), certs.end());
+ std::sort(certs.begin(), certs.end());
basic_io::printer pr(output);
--- basic_io.hh
+++ basic_io.hh
@@ -24,7 +24,7 @@
TOK_SYMBOL,
TOK_STRING,
TOK_HEX,
- TOK_NONE,
+ TOK_NONE
} token_type;
struct
--- cert.cc
+++ cert.cc
@@ -27,7 +27,10 @@
#include
using namespace std;
-using namespace boost;
+using boost::shared_ptr;
+using boost::get;
+using boost::tuple;
+using boost::lexical_cast;
// FIXME: the bogus-cert family of functions is ridiculous
// and needs to be replaced, or at least factored.
@@ -86,7 +89,7 @@
vector< manifest > tmp_certs;
// sorry, this is a crazy data structure
- typedef tuple< hexenc, cert_name, base64 > trust_key;
+ typedef boost::tuple< hexenc, cert_name, base64 > trust_key;
typedef map< trust_key, pair< shared_ptr< set >, it > > trust_map;
trust_map trust;
--- change_set.cc
+++ change_set.cc
@@ -13,7 +13,6 @@
#include
#include
#include
-#include
#include
#include
--- commands.cc
+++ commands.cc
@@ -2106,7 +2106,8 @@
"load\n"
"migrate\n"
"execute\n"
- "kill_rev_locally \n"
+ "kill_rev_locally ID\n"
+ "kill_branch_locally BRANCH\n"
"check\n"
"changesetify\n"
"rebuild\n"
@@ -2145,6 +2146,8 @@
kill_rev_locally(app,idx(args, 1)());
else if (idx(args, 0)() == "clear_epoch")
app.db.clear_epoch(cert_value(idx(args, 1)()));
+ else if (idx(args, 0)() == "kill_branch_locally")
+ app.db.delete_branch_named(cert_value(idx(args, 1)()));
else
throw usage(name);
}
@@ -3448,20 +3451,18 @@
CMD(rcs_import, "debug", "RCSFILE...",
- "import all versions in RCS files\n"
- "this command doesn't reconstruct revisions. you probably want cvs_import",
+ "parse versions in RCS files\n"
+ "this command doesn't reconstruct or import revisions. you probably want cvs_import",
OPT_BRANCH_NAME)
{
if (args.size() < 1)
throw usage(name);
- transaction_guard guard(app.db);
for (vector::const_iterator i = args.begin();
i != args.end(); ++i)
{
- import_rcs_file(mkpath((*i)()), app.db);
+ test_parse_rcs_file(mkpath((*i)()), app.db);
}
- guard.commit();
}
--- contrib/monotone-import.pl
+++ contrib/monotone-import.pl
@@ -198,7 +198,7 @@
print "If you want the changes that come with the import to appear in\n";
print "another branch (like your development branch), do the following\n";
print "\n";
-print "monotone$database propagate $branch {your-chosen-branch}\n";
+print "monotone$database propagate $user_branch {your-chosen-branch}\n";
print "**************************************\n";
######################################################################
--- contrib/mtbrowse.sh
+++ contrib/mtbrowse.sh
@@ -18,9 +18,8 @@
# - Change your configuration
# Delete the "VISUAL", to use the "PAGER", deleto both for internal viewer.
# Save configuration.
-# Please "Reload DB", to see the new configuration
# - Begin with menu "S Select revision"
-# - Browse in branches, revisions, diff files, view logs ....
+# - Browse in branches, revisions, diff files, view logs ...
#
# Needed tools:
# monotone 0.19 or compatible
@@ -35,7 +34,7 @@
# 2005/5/9 Version 0.1.2 address@hidden
# Update for MT 0.19
# Diff from parent.
-# Topsort or Date/Time sort, config via TOPSORT
+# Toposort or Date/Time sort, config via TOPOSORT
#
# 2005/5/13 Version 0.1.3 address@hidden
# Diff from 'parent' mistaken HEAD/REVISION usage.
@@ -72,17 +71,46 @@
# Selectable format for Date, Branch, Author, ChangeLog. Coloring author.
# Current marker is asterix before date/time.
#
+# 2005/6/23 Version 0.1.9 address@hidden
+# Cancel is "EXIT" in main menu.
+# Meter alongwith --gauge for reading certs :-)
+# Config with menu and def.item, instand radiolist and the test on/off thingy.
+# Don't remove some old files at exit.
+# Branch and head not in Main background title.
+#
+# 2005/6/24 Version 0.1.10 address@hidden
+# Remove TAB's from ChangeLog.
+# Some cat as stdin pipe.
+# Typofix topsort/toposort.
+#
+# 2005-06-26 Version 0.1.11 address@hidden
+# No double Date/Branch/Author with CR in selection list.
+# Short Author and no branch as default.
+# Set default revision for first selection to head.
+# "automate ancestors" without cut (have only one field).
+# Internal function for "automate ancestors" with depth limit. Speedup.
+# real user sys
+# 19.925s 6.780s 13.030s automate ancestors (net.venge.monotone)
+# 6.067s 2.920s 3.120s automate parents as loop, depth 30
+# 4.226s 2.280s 1.910s automate parents as loop, depth 20
+# 1.384s 0.680s 0.700s automate parents as loop, depth 10
+#
+# 2005-06-29 Version 0.1.12 address@hidden
+# Automatic author color.
+# Date have inverse color for last selection.
+# Expand revision after input, if not 40 chars. (parents don't allow short rev)
+
# Known Bugs / ToDo-List:
# * For Monotone Version >0.19 s/--depth/--last/, remove the fallback
# * better make "sed -n -e '1p'" for merge two different branches.
-VERSION="0.1.8"
+VERSION="0.1.12"
# Save users settings
# Default values, can overwrite on .mtbrowserc
CONFIGFILE="$HOME/.mtbrowserc"
-# Store lists for menue here
+# Store lists for menu here
TEMPDIR="$HOME/.mtbrowse"
TEMPFILE="$TEMPDIR/.tmp"
@@ -97,8 +125,8 @@
# 1=Certs Cached, 0=Clean at end (slow and save mode)
CACHE="1"
-# T=Topsort revisions, D=Date sort (reverse topsort)
-TOPSORT="T"
+# T=Toposort revisions, D=Date sort (reverse toposort)
+TOPOSORT="T"
# count of certs to get from DB, "0" for all
CERTS_MAX="20"
@@ -106,14 +134,14 @@
# Trim hash code
HASH_TRIM="10"
-# Format Date/Time
+# Format for Date/Time
FORMAT_DATE="L"
# Format Branch Full,Short,None
-FORMAT_BRANCH="F"
+FORMAT_BRANCH="N"
# Format author (strip domain from mail address)
-FORMAT_AUTHOR="F"
+FORMAT_AUTHOR="S"
# Changelog format
FORMAT_LOG="F"
@@ -127,6 +155,9 @@
# TODO: Remove in future
DEPTH_LAST="--last"
+# automate ancestors (I)nteral function, (M)onotone
+ANCESTORS="I"
+
# read saved settings
if [ -f $CONFIGFILE ]
then
@@ -141,9 +172,9 @@
#database "/home/hn/mtbrowse.db"
# key ""
- eval `cat MT/options | sed -n -r \
+ eval `sed -n -r \
-e 's/^[ ]*(branch) \"([^\"]+)\"$/\1=\2/p' \
- -e 's/^[ ]*(database) \"([^\"]+)\"$/\1=\2/p'`
+ -e 's/^[ ]*(database) \"([^\"]+)\"$/\1=\2/p' < MT/options`
if [ -n "$database" ]
then
@@ -174,8 +205,9 @@
if [ -f MT/options ]
then
- if ! dialog --cr-wrap --title " *********** WARNING! ********** " \
- --defaultno --colors --yesno "
+ if ! dialog --cr-wrap \
+ --title " *********** WARNING! ********** " \
+ --defaultno --colors --yesno "
Your \Zb\Z1MT/options\Zn will be overwrite, if
continue with different DB file or branch
in exist working directory!
@@ -194,7 +226,7 @@
# Clear cached files
do_clear_cache()
{
- rm -f $TEMPFILE.agraph $TEMPFILE.certs.$BRANCH \
+ rm -f $TEMPFILE.certs.$BRANCH \
$TEMPFILE.changelog.$BRANCH
}
@@ -202,8 +234,9 @@
# clear temp files
do_clear_on_exit()
{
- rm -f $TEMPFILE.dlg-branches $TEMPFILE.agraph \
- $TEMPFILE.action-select $TEMPFILE.menu $TEMPFILE.input
+ rm -f $TEMPFILE.branches $TEMPFILE.ancestors $TEMPFILE.toposort \
+ $TEMPFILE.action-select $TEMPFILE.menu $TEMPFILE.input \
+ $TEMPFILE.ncolor $TEMPFILE.c
if [ "$CACHE" != "1" ]
then
@@ -228,106 +261,159 @@
}
-# Add the date and user-key to the list of revisions
+# Add the date, author and changlog to the list of revisions
+
+# Scanning for:
+# Key : address@hidden
+# Sig : ok
+# Name : date
+# Value : 2005-05-31T22:29:50 <<---
+# --------------------------------------
+# Key : address@hidden
+# Sig : ok
+# Name : changelog
+# Value : Handle merged parents <<---
+
+# Output
+# 123456 "2005-05-31 22:29 address@hidden Handle merged parents"
+
fill_date_key()
{
local in_file=$1
local out_file=$2
- local short_hash dat bra aut log
+ local short_hash dat bra aut log lineno color count
+ line_count=`wc -l < $in_file`
+ if [ "$line_count" -eq 0 ]
+ then
+ unset line_count
+ fi
+
+ lineno=0
rm -f $out_file
# Read Key and Date value from certs
cat $in_file | \
- while read hash ; do
- echo -n "."
+ while read hash
+ do
+ if [ -n "$line_count" ]
+ then
+ let lineno++
+ echo "$(( 100*$lineno/line_count ))"
+ else
+ echo -n "." 1>&2
+ fi
- # Scanning for
- # Key : address@hidden
- # Sig : ok
- # Name : date
- # Value : 2005-05-31T22:29:50 <<---
-
- # Output
- # 123456 "2005-05-31 22:29 address@hidden"
-
short_hash=`echo $hash | cut -c 1-$HASH_TRIM`
- # get all certs of revision
- monotone --db=$DB list certs $hash > $TEMPFILE.c.tmp
+ # get all certs of revision, check cached first
+ tfc=$TEMPFILE.c
+ monotone --db=$DB list certs $hash > $tfc
# Date format
case $FORMAT_DATE in
F) # 2005-12-31T23:59:59
- dat=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : date/,+1s/Value : (.+)$/ \1/p'`
+ dat=`sed -n -r -e \
+ '/^Name : date/,+1s/Value : (.+)$/\1 /p' \
+ < $tfc | sed -n -e '1p'`
;;
L) # 2005-12-31 23:59
- dat=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : date/,+1s/Value : (.{10})T(.{5}).+$/ \1 \2/p'`
+ dat=`sed -n -r -e \
+ '/^Name : date/,+1s/Value : (.{10})T(.{5}).+$/\1 \2 /p' \
+ < $tfc | sed -n -e '1p'`
;;
D) # 2005-12-31
- dat=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : date/,+1s/Value : (.+)T.+$/ \1/p'`
+ dat=`sed -n -r -e \
+ '/^Name : date/,+1s/Value : (.+)T.+$/\1 /p' \
+ < $tfc | sed -n -e '1p'`
;;
S) # 12-31 23:59
- dat=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : date/,+1s/Value : .{4}-(.+)T(.{5}).+$/ \1 \2/p'`
+ dat=`sed -n -r -e \
+ '/^Name : date/,+1s/Value : .{4}-(.+)T(.{5}).+$/\1 \2 /p' \
+ < $tfc | sed -n -e '1p'`
;;
T) # 23:59:59
- dat=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : date/,+1s/Value : .{10}T(.+{8})$/ \1/p'`
+ dat=`sed -n -r -e \
+ '/^Name : date/,+1s/Value : .{10}T(.+{8})$/\1 /p' \
+ < $tfc | sed -n -e '1p'`
;;
esac
# Branch format
case $FORMAT_BRANCH in
F) # full
- bra=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : branch/,+1s/Value : (.+)$/ \1/p' | \
- sed -n -e '1p'`
+ bra=`sed -n -r -e \
+ '/^Name : branch/,+1s/Value :(.+)$/\1 /p' \
+ < $tfc | sed -n -e '1p'`
;;
S) # short
- bra=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : branch/,+1s/Value : .*\.([^\.]+)$/ \1/p' | \
- sed -n -e '1p'`
+ bra=`sed -n -r -e \
+ '/^Name : branch/,+1s/Value :.*\.([^\.]+)$/\1 /p' \
+ < $tfc | sed -n -e '1p'`
;;
esac
# Author format
case $FORMAT_AUTHOR in
F) # full
- aut=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : author/,+1s/Value : (.+)$/\1/p'`
+ aut=`sed -n -r -e \
+ '/^Name : author/,+1s/Value : (.+)$/\1/p' \
+ < $tfc | sed -n -e '1p'`
;;
S) # short
- aut=`cat $TEMPFILE.c.tmp | sed -n -r -e \
- '/^Name : author/,+1s/Value : (.{1,10})address@hidden/\1/p'`
+ aut=`sed -n -r -e \
+ '/^Name : author/,+1s/Value : (.{1,10})address@hidden/\1/p' \
+ < $tfc | sed -n -e '1p'`
;;
esac
# Changelog format
case $FORMAT_LOG in
- F) # full
- log=`cat $TEMPFILE.c.tmp | sed -n -r -e "y/\"/'/" -e \
- '/^Name : changelog/,+1s/Value : (.+)$/ \1/p'`
+ F) # full TAB here ----v
+ log=`sed -n -r -e "y/\" /' /" -e \
+ '/^Name : changelog/,+1s/Value : (.+)$/ \1/p' \
+ < $tfc`
;;
S) # short
- log=`cat $TEMPFILE.c.tmp | sed -n -r -e "y/\"/'/" -e \
- '/^Name : changelog/,+1s/Value : (.{1,20}).*$/ \1/p'`
+ log=`sed -n -r -e "y/\" /' /" -e \
+ '/^Name : changelog/,+1s/Value : (.{1,20}).*$/ \1/p' \
+ < $tfc`
;;
esac
- # Coloring?
+ # Author coloring?
if [ -n "$FORMAT_COLOR" -a "$FORMAT_AUTHOR" != "N" ]
then
# Bug in dialog: Don't allow empty string after \\Zn
test -z "$log" && log=" "
- echo "$short_hash \"$dat$bra $FORMAT_COLOR$aut\\Zn$log\"" \
+ if [ "$last_aut" != "$aut" ]
+ then
+ # Automatic color by author?
+ if [ "$FORMAT_COLOR" = "A" ]
+ then
+ color=`grep -n "$aut" $TEMPFILE.ncolor | cut -d ':' -f 1`
+ if [ -z "$color" ]
+ then
+ color=$(( `wc -l < $TEMPFILE.ncolor` % 16 + 1 ))
+ echo "$aut" >> $TEMPFILE.ncolor
+ fi
+
+ if [ $color -le 8 ]
+ then
+ color="\\Zb\\Z$color"
+ else
+ color="\\Z$color"
+ fi
+ else
+ color="$FORMAT_COLOR"
+ fi
+ last_aut="$aut"
+ fi
+ echo "$short_hash \"$dat$bra\\ZR$color$aut\\Zn$log\"" \
>> $out_file
else
- echo "$short_hash \"$dat$bra $aut$log\"" >> $out_file
+ echo "$short_hash \"$dat$bra\\ZR$aut$log\"" >> $out_file
fi
- done
+ done | dialog --gauge "$line_count certs reading" 6 60
rm $TEMPFILE.c.tmp
}
@@ -368,15 +454,15 @@
OLD_BRANCH=$BRANCH
# Get branches from DB
- if [ ! -f $TEMPFILE.dlg-branches -o $DB -nt $TEMPFILE.dlg-branches \
+ if [ ! -f $TEMPFILE.branches -o $DB -nt $TEMPFILE.branches \
-o "$CACHE" != "1" ]
then
monotone --db=$DB list branches \
- | sed -n -r -e 's/^(.+)$/\1\t-/p' > $TEMPFILE.dlg-branches \
+ | sed -n -r -e 's/^(.+)$/\1\t-/p' > $TEMPFILE.branches \
|| exit 200
fi
- if [ ! -s $TEMPFILE.dlg-branches ]
+ if [ ! -s $TEMPFILE.branches ]
then
echo "Error: No branches found."
exit 1
@@ -385,7 +471,7 @@
dialog --begin 1 2 \
--default-item "$OLD_BRANCH" \
--menu "Select branch" 0 0 0 \
- `cat $TEMPFILE.dlg-branches` \
+ `cat $TEMPFILE.branches` \
2> $TEMPFILE.input
BRANCH=`cat $TEMPFILE.input`
@@ -415,7 +501,7 @@
# Only one head ?
if [ `wc -l < $TEMPFILE.heads` -eq 1 -a -n "$1" ]
then
- HEAD=`cat $TEMPFILE.heads | head -n 1`
+ HEAD=`head -n 1 < $TEMPFILE.heads`
else
# List heads with author and date. Select by user.
monotone --db=$DB heads --branch=$BRANCH \
@@ -486,6 +572,7 @@
--menu "Select parent for $REVISION" 0 0 0 \
2> $TEMPFILE.input \
&& PARENT=`cat $TEMPFILE.input`
+ rm $TEMPFILE.certs3tmp
else
# Single parent only
PARENT=`cat $TEMPFILE.parents`
@@ -529,7 +616,7 @@
# DIFF2: from other revision (not working dir)
# Select second revision
if cat $TEMPFILE.certs.$BRANCH | \
- xargs dialog --default-item "$REV2" --menu \
+ xargs dialog --default-item "$REV2" --colors --menu \
"Select _older_ revision for branch:$BRANCH\nrev:$REVISION" \
0 0 0 2> $TEMPFILE.revision-select
then
@@ -563,7 +650,43 @@
done
}
+# Get parents recursive.
+# Same as automate ancestors, but limit the depth
+# Function called recursive!
+do_automate_ancestors_depth()
+{
+ locale depth head rev
+ depth=$1
+ head=$2
+
+ # Empty parm?
+ if [ -z "$depth" -o -z "$depth" ]
+ then
+ return 0
+ fi
+
+ # Limit by depth?
+ if [ "$depth" -gt $CERTS_MAX -o "$depth" -gt 200 ]
+ then
+ return 0
+ fi
+
+ let depth++
+ monotone --db=$DB automate parents $head |\
+ while read rev
+ do
+ if ! grep -q -l -e "$rev" $TEMPFILE.ancestors
+ then
+ echo "$rev" >> $TEMPFILE.ancestors
+ do_automate_ancestors_depth $depth $rev || return $?
+ fi
+ done
+ let depth--
+
+ return 0
+}
+
# Select a revision
do_revision_sel()
{
@@ -578,33 +701,42 @@
# Building revisions list
if [ ! -f $TEMPFILE.certs.$BRANCH -o $DB -nt $TEMPFILE.certs.$BRANCH ]
then
+ # Name color new
+ rm -f $TEMPFILE.ncolor
+ touch $TEMPFILE.ncolor
+
echo "Reading ancestors ($HEAD)"
echo "$HEAD" > $TEMPFILE.ancestors
- monotone --db=$DB automate ancestors $HEAD | cut -c 1-40 \
- >> $TEMPFILE.ancestors || exit 200
- if [ "$TOPSORT" = "T" -o "$CERTS_MAX" -gt 0 ]
+ if [ "$ANCESTORS" = "I" -a "$CERTS_MAX" -gt 0 ]
then
- echo "Topsort..."
+ do_automate_ancestors_depth 1 $HEAD || exit 200
+ else
+ monotone --db=$DB automate ancestors $HEAD \
+ >> $TEMPFILE.ancestors || exit 200
+ fi
+
+ if [ "$TOPOSORT" = "T" -o "$CERTS_MAX" -gt 0 ]
+ then
+ echo "Toposort..."
monotone --db=$DB automate toposort `cat $TEMPFILE.ancestors` \
- > $TEMPFILE.topsort || exit 200
+ > $TEMPFILE.toposort || exit 200
if [ "$CERTS_MAX" -gt 0 ]
then
# Only last certs. Remember: Last line is newest!
- tail -n "$CERTS_MAX" < $TEMPFILE.topsort \
- > $TEMPFILE.topsort2
- mv $TEMPFILE.topsort2 $TEMPFILE.topsort
+ tail -n "$CERTS_MAX" < $TEMPFILE.toposort \
+ > $TEMPFILE.toposort2
+ mv $TEMPFILE.toposort2 $TEMPFILE.toposort
fi
else
- mv $TEMPFILE.ancestors $TEMPFILE.topsort
+ mv $TEMPFILE.ancestors $TEMPFILE.toposort
fi
# Reading revisions and fill with date
- echo -n "Reading certs"
- fill_date_key $TEMPFILE.topsort $TEMPFILE.certs3tmp
+ fill_date_key $TEMPFILE.toposort $TEMPFILE.certs3tmp
- if [ "$TOPSORT" != "T" ]
+ if [ "$TOPOSORT" != "T" ]
then
# Sort by date+time
sort -k 2 -r < $TEMPFILE.certs3tmp > $TEMPFILE.certs.$BRANCH
@@ -614,7 +746,13 @@
fi
fi
- SHORT_REV=`echo $REVISION | cut -c 1-$HASH_TRIM`
+ # if first rev is empty, use head instand
+ if [ -z "$REVISION" ]
+ then
+ SHORT_REV=`echo $HEAD | cut -c 1-$HASH_TRIM`
+ else
+ SHORT_REV=`echo $REVISION | cut -c 1-$HASH_TRIM`
+ fi
# Select revision
while cat $TEMPFILE.certs.$BRANCH | \
@@ -626,17 +764,24 @@
--menu "Select revision for branch:$BRANCH" \
0 0 0 2> $TEMPFILE.revision-select
do
-
SHORT_REV=`cat $TEMPFILE.revision-select`
# Remove old marker, set new marker
- cat $TEMPFILE.certs.$BRANCH | sed -r \
- -e "s/^(.+\")\*(.+)\$/\1 \2/" \
- -e "s/^($SHORT_REV.* \") (.+)\$/\1\*\2/" \
- > $TEMPFILE.certs.$BRANCH.base
- mv $TEMPFILE.certs.$BRANCH.base $TEMPFILE.certs.$BRANCH
+ if [ "$FORMAT_DATE" = "N" -a "$FORMAT_BRANCH" = "N" ]
+ then
+ sed -r \
+ -e "s/^(.+\")\*(.+)\$/\1\2/" \
+ -e "s/^($SHORT_REV.* \")(.+)\$/\1\*\2/" \
+ < $TEMPFILE.certs.$BRANCH > $TEMPFILE.marker
+ else
+ sed -r \
+ -e "s/^(.+\")\\\\Zr(.+)\$/\1\2/" \
+ -e "s/^($SHORT_REV.* \")(.+)\$/\1\\\\Zr\2/" \
+ < $TEMPFILE.certs.$BRANCH > $TEMPFILE.marker
+ fi
+ mv $TEMPFILE.marker $TEMPFILE.certs.$BRANCH
- # Error, on "monotone automate parent XXXXXX", if short revision. :-(
+ # Error, on "monotone automate parents XXXXXX", if short revision. :-(
# Expand revision here, if short revision (is alway short now)
REVISION=`monotone --db=$DB complete revision $SHORT_REV`
@@ -650,30 +795,37 @@
# Menu for configuration
do_config()
{
- while dialog --menu "Configuration" 0 0 0 \
+ local item
+
+ while dialog --default-item "$item" \
+ --menu "Configuration" 0 0 0 \
"V" "VISUAL [$VISUAL]" \
"Vd" "Set VISUAL default to vim -R" \
"P" "PAGER [$PAGER]" \
"Pd" "set PAGER default to less" \
- "S" "Sort by Topsort or Date [$TOPSORT]" \
+ "S" "Sort by Toposort or Date [$TOPOSORT]" \
"T" "Time and date format [$FORMAT_DATE]" \
"B" "Branch format [$FORMAT_BRANCH]" \
"A" "Author format [$FORMAT_AUTHOR]" \
"Ac" "Author Color format [$FORMAT_COLOR]" \
"L" "changeLog format [$FORMAT_LOG]" \
+ "D" "Depth limit for ancestors [$ANCESTORS]" \
"C" "Certs limit in Select-List [$CERTS_MAX]" \
"-" "-" \
"W" "Write configuration file" \
"R" "Return to main menu" \
2> $TEMPFILE.menu
do
- case `cat $TEMPFILE.menu` in
+ item=`cat $TEMPFILE.menu`
+ case $item in
V)
# Setup for VISUAL
- dialog --inputbox \
- "Config for file viewer\nused in sample \"vim -R changes.diff\"" \
- 8 70 "$VISUAL" 2> $TEMPFILE.input \
- && VISUAL=`cat $TEMPFILE.input`
+ if dialog --inputbox \
+ "Config for file viewer\nuse in sample: \"vim -R changes.diff\"" \
+ 8 70 "$VISUAL" 2> $TEMPFILE.input
+ then
+ VISUAL=`cat $TEMPFILE.input`
+ fi
;;
Vd)
# set Visual default
@@ -681,81 +833,82 @@
;;
P)
# Setup for PAGER
- dialog --inputbox \
- "Config for pipe pager\nused in sample \"monotone log | less\"" \
- 8 70 "$PAGER" 2> $TEMPFILE.input \
- && PAGER=`cat $TEMPFILE.input`
+ if dialog --inputbox \
+ "Config for pipe pager\nuse in sample: \"monotone log | less\"" \
+ 8 70 "$PAGER" 2> $TEMPFILE.input
+ then
+ PAGER=`cat $TEMPFILE.input`
+ fi
;;
Pd)
# set Pager default
PAGER="less"
;;
S)
- # change T=Topsort revisions, D=Date sort (reverse topsort)
- dialog --radiolist "Sort revisions by" 0 0 0 \
- "T" "Topsort, oldest top (from Monotone)" \
- `test "$TOPSORT" = "T" && echo "on" || echo "off"` \
- "D" "Date/Time (reverse topsort)" \
- `test "$TOPSORT" = "D" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && TOPSORT=`cat $TEMPFILE.input`
+ # change T=Toposort revisions, D=Date sort (reverse toposort)
+ if dialog --default-item "$TOPOSORT" \
+ --menu "Sort revisions by" 0 0 0 \
+ "T" "Toposort, oldest top (from Monotone)" \
+ "D" "Date/Time (reverse toposort)" \
+ 2> $TEMPFILE.input
+ then
+ TOPOSORT=`cat $TEMPFILE.input`
+ fi
;;
T)
# change date/time format
- dialog --radiolist "Format for date" 0 0 0 \
- "F" "2005-12-31T23:59:59 -- Full date and time" \
- `test "$FORMAT_DATE" = "F" && echo "on" || echo "off"` \
- "L" "2005-12-31 23:59 -- Long date and time" \
- `test "$FORMAT_DATE" = "L" && echo "on" || echo "off"` \
- "D" "2005-21-31 -- Date only" \
- `test "$FORMAT_DATE" = "D" && echo "on" || echo "off"` \
- "S" "12-31 23:59:59 -- Short date and time" \
- `test "$FORMAT_DATE" = "S" && echo "on" || echo "off"` \
- "T" "23:59:59 -- Time only" \
- `test "$FORMAT_DATE" = "T" && echo "on" || echo "off"` \
- "N" "no date and no time" \
- `test "$FORMAT_DATE" = "N" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && FORMAT_DATE=`cat $TEMPFILE.input`
+ if dialog --default-item "$FORMAT_DATE" \
+ --menu "Format for date and time" 0 0 0 \
+ "F" "2005-12-31T23:59:59 -- Full date and time" \
+ "L" "2005-12-31 23:59 -- Long date and time" \
+ "D" "2005-21-31 -- Date only" \
+ "S" "12-31 23:59:59 -- Short date and time" \
+ "T" "23:59:59 -- Time only" \
+ "N" "no date and no time" \
+ 2> $TEMPFILE.input
+ then
+ FORMAT_DATE=`cat $TEMPFILE.input`
+ fi
;;
B)
# change branch format
- dialog --radiolist "Format for branch" 0 0 0 \
- "F" "Full author" \
- `test "$FORMAT_BRANCH" = "F" && echo "on" || echo "off"` \
- "S" "Short author, strip domain from email address" \
- `test "$FORMAT_BRANCH" = "S" && echo "on" || echo "off"` \
- "N" "no author" \
- `test "$FORMAT_BRANCH" = "N" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && FORMAT_BRANCH=`cat $TEMPFILE.input`
+ if dialog --default-item "$FORMAT_BRANCH" \
+ --menu "Format for branch" 0 0 0 \
+ "F" "Full branch" \
+ "S" "Short branch, right side only" \
+ "N" "no branch" \
+ 2> $TEMPFILE.input
+ then
+ FORMAT_BRANCH=`cat $TEMPFILE.input`
+ fi
;;
A)
# change author's format
- dialog --radiolist "Format for author" 0 0 0 \
- "F" "Full author" \
- `test "$FORMAT_AUTHOR" = "F" && echo "on" || echo "off"` \
- "S" "Short author, strip domain from email address" \
- `test "$FORMAT_AUTHOR" = "S" && echo "on" || echo "off"` \
- "N" "no author" \
- `test "$FORMAT_AUTHOR" = "N" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && FORMAT_AUTHOR=`cat $TEMPFILE.input`
+ if dialog --default-item "$FORMAT_AUTHOR" \
+ --menu "Format for author" 0 0 0 \
+ "F" "Full author" \
+ "S" "Short author, strip domain from email address" \
+ "N" "no author" \
+ 2> $TEMPFILE.input
+ then
+ FORMAT_AUTHOR=`cat $TEMPFILE.input`
+ fi
;;
Ac)
# Author coloring
- dialog --radiolist "Color author in selecetion" 0 0 0 \
- "yes" "author is color" \
- `test -n "$FORMAT_COLOR" && echo "on" || echo "off"` \
- "no" "author has no special color" \
- `test -z "$FORMAT_COLOR" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && {
+ if dialog --default-item \
+ "`test -n \"$FORMAT_COLOR\" && echo \"yes\" || echo \"no\"`" \
+ --menu "Color author in selecetion" 0 0 0 \
+ "yes" "author is color" \
+ "no" "author has no special color" \
+ 2> $TEMPFILE.input
+ then
if [ "`cat $TEMPFILE.input`" = "yes" ]
then
dialog --colors \
--default-item "$FORMAT_COLOR" \
--menu "Selecet color for author" 0 0 0 \
+ "A" "Automatic color" \
"\\Z0" "\Z0Color\Zn 0" \
"\\Z1" "\Z1Color\Zn 1" \
"\\Z2" "\Z2Color\Zn 2" \
@@ -779,24 +932,34 @@
else
FORMAT_COLOR=""
fi
- }
+ fi
;;
L)
# Changelog format
- dialog --radiolist "Format for ChangeLog in selcetion" 0 0 0 \
- "F" "Full changelog line" \
- `test "$FORMAT_LOG" = "F" && echo "on" || echo "off"` \
- "S" "Short changelog" \
- `test "$FORMAT_LOG" = "S" && echo "on" || echo "off"` \
- "N" "no changelog in selection" \
- `test "$FORMAT_LOG" = "N" && echo "on" || echo "off"` \
- 2> $TEMPFILE.input \
- && FORMAT_LOG=`cat $TEMPFILE.input`
+ dialog \
+ --default-item "$FORMAT_LOG" \
+ --menu "Format for ChangeLog in selection" 0 0 0 \
+ "F" "Full changelog line" \
+ "S" "Short changelog" \
+ "N" "no changelog in selection" \
+ 2> $TEMPFILE.input \
+ && FORMAT_LOG=`cat $TEMPFILE.input`
;;
+ D)
+ # automate ancestors (I)nteral function, (M)onotone
+ if dialog --default-item "$ANCESTORS" \
+ --menu "Get ancestors by using" 0 0 0 \
+ "M" "Monotone \"automate ancestor\" (save mode)" \
+ "I" "Internal function with depth limit (faster)" \
+ 2> $TEMPFILE.input
+ then
+ ANCESTORS=`cat $TEMPFILE.input`
+ fi
+ ;;
C)
# Change CERTS_MAX
dialog --inputbox \
- "Set maximum lines for revision selction menu\n(default: 0, disabled)" \
+ "Set maximum lines for revision selction menu\n(0=disabled)" \
9 70 "$CERTS_MAX" 2> $TEMPFILE.input \
&& CERTS_MAX=`cat $TEMPFILE.input`
;;
@@ -811,7 +974,7 @@
PAGER="$PAGER"
TEMPDIR="$TEMPDIR"
TEMPFILE="$TEMPFILE"
-TOPSORT="$TOPSORT"
+TOPOSORT="$TOPOSORT"
CACHE="$CACHE"
CERTS_MAX="$CERTS_MAX"
DEPTH_LAST="$DEPTH_LAST"
@@ -820,6 +983,7 @@
FORMAT_AUTHOR="$FORMAT_AUTHOR"
FORMAT_LOG="$FORMAT_LOG"
FORMAT_COLOR="$FORMAT_COLOR"
+ANCESTORS="$ANCESTORS"
EOF
dialog --title " Info " --sleep 2 --infobox \
"Configration wrote to\n$CONFIGFILE" 0 0
@@ -848,7 +1012,8 @@
mkdir -p $TEMPDIR
while dialog \
- --backtitle "h:$HEAD b:$BRANCH f:$DB" \
+ --cancel-label "Exit" \
+ --backtitle "$DB" \
--menu "Main - mtbrowse v$VERSION" 0 0 0 \
"S" "Select revision" \
"I" "Input revision" \
@@ -880,6 +1045,13 @@
then
REVISION=`cat $TEMPFILE.input`
+ if [ `echo "$REVISION" | wc -L` -lt 40 ]
+ then
+ # Error, on "monotone automate parents XXXXXX", if short revision. :-(
+ # Expand revision here, if short revision
+ REVISION=`monotone --db=$DB complete revision $REVISION`
+ fi
+
do_action_sel
do_revision_sel
fi
@@ -891,7 +1063,7 @@
;;
B)
# Branch config
- rm -f $TEMPFILE.dlg-branches
+ rm -f $TEMPFILE.branches
do_branch_sel
;;
H)
--- cryptopp/config.h
+++ cryptopp/config.h
@@ -103,7 +103,7 @@
typedef uint16_t word16;
typedef uint32_t word32;
-#if defined(__GNUC__) || defined(__MWERKS__)
+#if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_CC)
#define WORD64_AVAILABLE
typedef uint64_t word64;
#define W64LIT(x) x##LL
@@ -203,7 +203,7 @@
#define CRYPTOPP_WIN32_AVAILABLE
#endif
-#if defined(__unix__) || defined(__MACH__) || defined(__NetBSD__)
+#if defined(__unix__) || defined(__MACH__) || defined(__sun) || defined(__NetBSD__)
#define CRYPTOPP_UNIX_AVAILABLE
#endif
@@ -255,7 +255,7 @@
# define CRYPTOPP_MALLOC_ALIGNMENT_IS_16
#endif
-#if defined(__linux__) || defined(__sun__) || defined(__CYGWIN__)
+#if defined(__linux__) || defined(__sun) || defined(__CYGWIN__)
# define CRYPTOPP_MEMALIGN_AVAILABLE
#endif
--- cryptopp/integer.cpp
+++ cryptopp/integer.cpp
@@ -3956,7 +3956,7 @@
return r;
}
-word Integer::InverseMod(const word mod) const
+word Integer::InverseMod(word mod) const
{
word g0 = mod, g1 = *this % mod;
word v0 = 0, v1 = 1;
--- database.cc
+++ database.cc
@@ -345,11 +345,19 @@
if (error)
throw oops(string("could not open database: ") + filename.string() +
(string(sqlite3_errmsg(__sql))));
-
+
while(in)
{
in.read(buf, constants::bufsz);
tmp.append(buf, in.gcount());
+
+ const char* last_statement = 0;
+ sqlite3_complete_last(tmp.c_str(), &last_statement);
+ if (last_statement == 0)
+ continue;
+ string::size_type len = last_statement + 1 - tmp.c_str();
+ execute(tmp.substr(0, len).c_str());
+ tmp.erase(0, len);
}
execute(tmp.c_str());
@@ -1505,6 +1513,19 @@
execute("DELETE from revisions WHERE id = '%s'",rid.inner()().c_str());
}
+/// Deletes all certs referring to a particular branch.
+void
+database::delete_branch_named(cert_value const & branch)
+{
+ base64 encoded;
+ encode_base64(branch, encoded);
+ L(F("Deleting all references to branch %s\n") % branch);
+ execute("DELETE FROM revision_certs WHERE name='branch' AND value ='%s'",
+ encoded().c_str());
+ execute("DELETE FROM branch_epochs WHERE branch='%s'",
+ encoded().c_str());
+}
+
// crypto key management
void
--- database.hh
+++ database.hh
@@ -289,6 +289,8 @@
void delete_existing_revs_and_certs();
void delete_existing_rev_and_certs(revision_id const & rid);
+
+ void delete_branch_named(cert_value const & branch);
// crypto key / cert operations
--- main.cc
+++ main.cc
@@ -22,6 +22,8 @@
#include
#include
#include
+#include
+#include
// Microsoft + other compatible compilers such as Intel
#if defined(_MSC_VER) || (defined(__MWERKS__) && __MWERKS__ >= 0x3000)
--- merkle_tree.cc
+++ merkle_tree.cc
@@ -19,7 +19,7 @@
#include "sanity.hh"
#include "transforms.hh"
-using namespace boost;
+using boost::dynamic_bitset;
using namespace std;
using namespace CryptoPP;
--- merkle_tree.hh
+++ merkle_tree.hh
@@ -38,7 +38,7 @@
key_item = 3,
revision_item = 4,
cert_item = 5,
- epoch_item = 6,
+ epoch_item = 6
}
netcmd_item_type;
--- monotone.cc
+++ monotone.cc
@@ -8,6 +8,7 @@
#include "popt/popt.h"
#include
+#include
#include
#include
#include
@@ -247,7 +248,7 @@
L(F("set locale: LC_CTYPE=%s, LC_MESSAGES=%s\n")
% (setlocale(LC_CTYPE, NULL) == NULL ? "n/a" : setlocale(LC_CTYPE, NULL))
- % (setlocale(LC_MESSAGES, NULL) == NULL ? "n/a" : setlocale(LC_CTYPE, NULL)));
+ % (setlocale(LC_MESSAGES, NULL) == NULL ? "n/a" : setlocale(LC_MESSAGES, NULL)));
// decode all argv values into a UTF-8 array
--- monotone.texi
+++ monotone.texi
@@ -4409,6 +4409,21 @@
work you can extract @var{id}'s data.
@end itemize
address@hidden monotone db kill_branch_locally @var{branch}
+
+This command ``kills'' a branch by deleting all branch certs with that
+branch name. You should consider carefully whether you want to use it,
+because it can irrevocably delete important information. It does not
+modify or delete any revisions or any of the other certificates on
+revisions in the branch; it simply removes the branch certificates
+matching the given branch name. Because of this, it can leave
+revisions without any branch certificate at all. As with @command{db
+kill_rev_locally}, it only deletes the information from your local
+database; if there are other databases that you sync with which have
+revisions in this branch, the branch certificates will reappear when
+you sync, unless the owners of those databases also delete those
+certificates locally.
+
@item monotone db execute @var{sql-statement}
This is a debugging command which executes @var{sql-statement} against
--- netcmd.cc
+++ netcmd.cc
@@ -17,7 +17,6 @@
#include "hmac.hh"
using namespace std;
-using namespace boost;
static netcmd_item_type
read_netcmd_item_type(string const & in,
--- netsync.cc
+++ netsync.cc
@@ -212,8 +212,9 @@
// material that you wouldn't have a hope of typing in manually anyways)
//
-using namespace boost;
using namespace std;
+using boost::shared_ptr;
+using boost::lexical_cast;
static inline void
require(bool check, string const & context)
--- netxx/osutil.h
+++ netxx/osutil.h
@@ -74,6 +74,10 @@
# include
# include
# include
+
+# include
+# include
+
#endif
#include "config.h"
--- packet.cc
+++ packet.cc
@@ -18,8 +18,12 @@
#include "sanity.hh"
#include "transforms.hh"
-using namespace boost;
using namespace std;
+using boost::shared_ptr;
+using boost::lexical_cast;
+using boost::match_default;
+using boost::match_results;
+using boost::regex;
// --- packet db writer --
//
--- rcs_file.cc
+++ rcs_file.cc
@@ -196,9 +196,23 @@
}
token_type;
+static inline void
+adv(char i, size_t & line, size_t & col)
+{
+ if (i == '\n')
+ {
+ col = 0;
+ ++line;
+ }
+ else
+ ++col;
+}
+
static token_type
get_token(file_source & ist,
- std::string & str)
+ std::string & str,
+ size_t & line,
+ size_t & col)
{
bool saw_idchar = false;
int i = ist.peek();
@@ -210,6 +224,7 @@
{
if (i == EOF)
return TOK_NONE;
+ adv(i, line, col);
if (!isspace(i))
break;
ist.get(c);
@@ -220,27 +235,33 @@
{
case ';':
ist.get(c);
+ ++col;
return TOK_SEMI;
break;
case ':':
ist.get(c);
+ ++col;
return TOK_COLON;
break;
case '@':
ist.get(c);
+ ++col;
while (ist.get(c))
{
if (c == '@')
{
if (ist.peek() == '@')
- { ist.get(c); str += c; }
+ { ist.get(c); str += c; ++col; }
else
break;
}
else
- str += c;
+ {
+ adv(i, line, col);
+ str += c;
+ }
}
return TOK_STRING;
break;
@@ -252,6 +273,7 @@
&& !isspace(i))
{
ist.get(c);
+ ++col;
if (! isdigit(c) && c != '.')
saw_idchar = true;
str += c;
@@ -275,9 +297,11 @@
std::string token;
token_type ttype;
+ size_t line, col;
+
parser(file_source & s,
rcs_file & r)
- : ist(s), r(r)
+ : ist(s), r(r), line(1), col(1)
{}
std::string tt2str(token_type tt)
@@ -302,7 +326,7 @@
void advance()
{
- ttype = get_token(ist, token);
+ ttype = get_token(ist, token, line, col);
// std::cerr << tt2str(ttype) << ": " << token << std::endl;
}
@@ -316,12 +340,8 @@
void eat(token_type want)
{
if (ttype != want)
- throw oops("parse failure: expecting "
- + tt2str(want)
- + " got "
- + tt2str(ttype)
- + " with value: "
- + token);
+ throw oops((F("parse failure %d:%d: expecting %s, got %s with value '%s'\n")
+ % line % col % tt2str(want) % tt2str(ttype) % token).str());
advance();
}
@@ -339,10 +359,8 @@
{
std::string tmp;
if (!symp(expected))
- throw oops(std::string("parse failure: ")
- + "expecting word '"
- + expected
- + "'");
+ throw oops((F("parse failure %d:%d: expecting word '%s'\n")
+ % line % col % expected).str());
advance();
}
@@ -356,7 +374,8 @@
void word()
{
if (!wordp())
- throw oops("expecting word");
+ throw oops((F("parse failure %d:%d: expecting word\n")
+ % line % col).str());
advance();
}
@@ -376,10 +395,23 @@
if (symp("branch")) { sym(r.admin.branch); if (nump()) num(); semi(); }
expect("access"); while(symp()) { sym(); } semi();
expect("symbols");
- while(symp())
+
+ // "man rcsfile" lies: there are real files in the wild which use
+ // num tokens as the key value in a symbols entry. for example
+ // "3.1:1.1.0.2" is a real sym:num specification, despite "3.1"
+ // being a num itself, not a sym.
+
+ while(symp() || nump())
{
std::string stmp, ntmp;
- sym(stmp); colon(); num(ntmp);
+ if (symp())
+ {
+ sym(stmp); colon(); num(ntmp);
+ }
+ else
+ {
+ num(stmp); colon(); num(ntmp);
+ }
r.admin.symbols.insert(make_pair(ntmp, stmp));
}
semi();
--- rcs_import.cc
+++ rcs_import.cc
@@ -7,6 +7,7 @@
#include
#include
#include
+#include
#include