Re: [Monotone-devel] Patch to speed up add operation
[EMAIL PROTECTED] writes: BenoƮt Dejean wrote: [ string[0] not guarenteed to be contigous, although most implement that way; c_str() is safe only for read ] Is .data() assumed to be contigous as well? There are a lot of casts of string.data() to (const char *) or equivalent in the monotone code. Try fgrep '.data()' *.cc to find a bunch. Scott Meyers has stated, that the only container forseen to be used with C libraries is std::vector, where the trick above shall work. This is why I wrote: Since guess_binary() took a string, I used the slightly questionable: string[0] trick to get a writeable pointer to the string in file.read(buf[0],bufsize) in monotone_guess_binary_filename_for_lua. Does anyone know of a way to just read up to some number of bytes into a string? If not, should guess_binaries signature be changed to guess_binary(unsigned char *data, int datalen) and a char[bufsize] array be used instead of a string? I didn't change the signature because I still don't have a feel for what changes are acceptable vs. not in the monotone code. Does someone have an opinion on changing the signature? The vector change would also be a signature change, and I'd prefer the unsigned char *, datalen version, as it simplifies the calling code, continues to interact properly with something that wants to call it on a string (those calls have to be foo.{c_str,data}(),foo.size()). -Eric ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Patch to speed up add operation
* Eric Anderson: Is .data() assumed to be contigous as well? Yes. The difference to .c_str() is that the character array to which a pointer is returned is not guaranteed to be NUL-terminated. ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Explicit_merge fails with invariant 'I(cs_left == cs_right)' on monotone itself
On Wed, 2005-08-24 at 09:38 +0200, Christof Petig wrote: Any idea on how to merge the changes in mainline (propagated to nvm.cvssync.win32) into net.venge.monotone.cvssync? When doing an explicit merge: mt explicit_merge 7b88f7c9b843cae0b068b5232edf812c9b2b367d 0772ad08e5a0c6593219fb22e077929e36afc044 76a3c8d6e258681afd550ca3fed3cf776fe7a795 net.venge.monotone.cvssync and resolving the first two conflicting files by hand (select third wherever necessary) I get this error. ...It looks like several files in contrib/ and tests/ are deleted+added on one side, but not the other. Tim 4a5,12 delete_file contrib/color-logs.conf delete_file contrib/color-logs.sh delete_file contrib/colorize delete_file contrib/get_stdio.pl 227c235,255 delete_file tests/t_automate_inventory.at --- delete_file tests/t_automate_stdio.at delete_file tests/t_cvsimport_drepper.at delete_file tests/t_lua_includedir.at delete_file tests/t_merge_manual.at delete_file tests/t_rcfile_dir.at delete_file tests/t_restricted_commit_with_inodeprints.at delete_file tests/t_revert_restrict.at delete_file tests/t_status.at delete_file tests/t_update_with_pending_add.at delete_file tests/t_update_with_pending_drop.at delete_file tests/t_update_with_pending_rename.at 764a793,800 add_file contrib/color-logs.conf add_file contrib/color-logs.sh add_file contrib/colorize add_file contrib/get_stdio.pl 844a881,882 add_file tests/t_automate_stdio.at 848a887,888 add_file tests/t_cvsimport_drepper.at 874a915,916 add_file tests/t_lua_includedir.at 880a923,924 add_file tests/t_merge_manual.at 891c935,937 add_file tests/t_refresh_inodeprints.at --- add_file tests/t_rcfile_dir.at add_file tests/t_restricted_commit_with_inodeprints.at 894a941,942 add_file tests/t_revert_restrict.at 898a947,948 add_file tests/t_status.at 900a951,956 add_file tests/t_update_with_pending_add.at add_file tests/t_update_with_pending_drop.at add_file tests/t_update_with_pending_rename.at 2044a2101,2108 patch contrib/color-logs.conf from [] to [87e8ceac1e0a8d173e2a0da01e659d048824e9ed] patch contrib/color-logs.sh from [] to [4e04daeee4ee8ce8bf6ce45f074ba16faf50ccf9] 2046c2110 from [6d186a777205d4a1bae5b7fc7b6bf52fc6d83df5] --- from [] 2048a2113,2116 patch contrib/get_stdio.pl from [] to [6bf6efac0e90644da8338ee03e289a6d0f184278] 2802c2870 from [82905ef9235da9d20dc5c56e9e0b3e0a55a919d4] --- from [] 2846c2914 from [fa1e2cb90749522674c28871a9a9971c7984c34c] --- from [] 2954c3022 from [5b4ce1e6a2781a7a841039a1e02a96cc0221f3ff] --- from [] 2976a3045,3048 patch tests/t_merge_manual.at from [] to [30eeeb2ea878e180248e8969dda05c07cd9df743] 3062c3134 from [06128ab21f137c3a69e4fce2db25b0ea3fa424de] --- from [] 3069,3072d3140 patch tests/t_refresh_inodeprints.at from [] to [8fc43d007b60a998430f6fd0dc56962c019511f4] 3076a3145,3148 patch tests/t_restricted_commit_with_inodeprints.at from [] to [0761808634d3e002cf9bd48b83e8a9a4ef088d9a] 3084a3157,3160 patch tests/t_revert_restrict.at from [] to [ca9b1e167516b4b92a5d285da56b7ca076dbd587] 3100a3177,3180 patch tests/t_status.at from [] to [0b361ba1ed3579bcd794fb3edd21a881f4a46e23] 3116a3197,3208 patch tests/t_update_with_pending_add.at from [] to [8394d96a687a14e6dcae400383d3bef0e76d1f78] patch tests/t_update_with_pending_drop.at from [] to [d52d3736c75a01c308500e12237edaf37e8f345f] patch tests/t_update_with_pending_rename.at from [] to [d6e60af87b017d9269e0c3c797c93d0a696648fc] ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
[Monotone-devel] Fw: [Monotone-commits-diffs] Revision eb95ff8c336ab71cfbfa582dca501b4e41d1bc3d
Uhmmm, I'm all for spreading the language (I'm half french, 'k? :-)), but I'm not sure about this one... Some scripts might, just might depend of a merge having a very specific changelog. How does monotone-viz deal with merges and propagates, for example? Cheers, Richard - Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte [EMAIL PROTECTED] http://richard.levitte.org/ When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up. -- C.S. Lewis ---BeginMessage--- - Revision: eb95ff8c336ab71cfbfa582dca501b4e41d1bc3d Ancestor: 5696a58488259eabbf55759f08f956a3accd36a4 Ancestor: e8c6fa123a8129373b4bd682c24e30b4334ee7a6 Author: [EMAIL PROTECTED] Date: 2005-08-25T16:14:11 Branch: net.venge.monotone Modified files: ChangeLog change_set.cc commands.cc database.cc database.hh keys.cc po/fr.po sanity.cc sanity.hh tests/t_genkey.at transforms.cc ChangeLog: fusion de 5696a58488259eabbf55759f08f956a3accd36a4 et e8c6fa123a8129373b4bd682c24e30b4334ee7a6 monotone --db={your.database} diff --revision=5696a58488259eabbf55759f08f956a3accd36a4 --revision=eb95ff8c336ab71cfbfa582dca501b4e41d1bc3d monotone --db={your.database} diff --revision=e8c6fa123a8129373b4bd682c24e30b4334ee7a6 --revision=eb95ff8c336ab71cfbfa582dca501b4e41d1bc3d -- ___ Monotone-commits-diffs mailing list Monotone-commits-diffs@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-commits-diffs ---End Message--- ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Interesting bug in monotone-viz
Richard Levitte - VMS Whacker [Wednesday 10 August 2005] : If you check out the current monotone repository with monotone-viz, you will see that it looks like it has two heads, or at least split in some way that monotone-viz can't detect properly. Hi Richard, OK I modified the way this is done, could you try again and see if it's better now ? -- Olivier ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Interesting bug in monotone-viz
In message [EMAIL PROTECTED] on Thu, 25 Aug 2005 22:06:04 +0200, Olivier Andrieu [EMAIL PROTECTED] said: oandrieu OK I modified the way this is done, could you try again and oandrieu see if it's better now ? Sure... as soon as you push :-) Cheers, Richard - Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte [EMAIL PROTECTED] http://richard.levitte.org/ When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up. -- C.S. Lewis ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
Re: [Monotone-devel] Interesting bug in monotone-viz
In message [EMAIL PROTECTED] on Thu, 25 Aug 2005 22:14:53 +0200 (CEST), Richard Levitte - VMS Whacker [EMAIL PROTECTED] said: richard In message [EMAIL PROTECTED] on Thu, 25 Aug 2005 22:06:04 +0200, Olivier Andrieu [EMAIL PROTECTED] said: richard richard oandrieu OK I modified the way this is done, could you try again and richard oandrieu see if it's better now ? richard richard Sure... as soon as you push :-) Misunderstood. Tested, and it works as expected (not split). Good job! Cheers, Richard - Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte [EMAIL PROTECTED] http://richard.levitte.org/ When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up. -- C.S. Lewis ___ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel
[Monotone-devel] t_migrate_schema.at failing?
Did the schema change in net.venge.monotone lately? When running the tests (make check), t_migrate_schema.at is failing (testsuite.log), so I'm getting suspitious... Cheers, Richard - Please consider sponsoring my work on free software. See http://www.free.lp.se/sponsoring.html for details. -- Richard Levitte [EMAIL PROTECTED] http://richard.levitte.org/ When I became a man I put away childish things, including the fear of childishness and the desire to be very grown up. -- C.S. Lewis 73. t_migrate_schema.at:1: testing ... t_migrate_schema.at:2: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR setup . stderr: stdout: t_migrate_schema.at:2: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR db init stderr: stdout: t_migrate_schema.at:2: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR read test_keys stderr: monotone: read 2 packets stdout: t_migrate_schema.at:2: rm test_keys t_migrate_schema.at:3: echo $UNB64_COMMAND stderr: stdout: mimencode -u t_migrate_schema.at:3: echo $UNGZ_COMMAND stderr: stdout: gunzip -c t_migrate_schema.at:33: rm -f test.db t_migrate_schema.at:34: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR db init t_migrate_schema.at:62: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR read migrate_keys stderr: monotone: read 3 packets stdout: t_migrate_schema.at:65: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR add testfile1 stderr: monotone: adding testfile1 to working copy add set stdout: t_migrate_schema.at:67: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR add testfile2 stderr: monotone: adding testfile2 to working copy add set stdout: t_migrate_schema.at:68: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR --branch=testbranch1 commit --message blah-blah stderr: monotone: beginning commit on branch 'testbranch1' monotone: committed revision 696ab0232841aece22eb2ac30160c0c0ce879a46 stdout: t_migrate_schema.at:71: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR cert $REV somekey somevalue stderr: stdout: t_migrate_schema.at:76: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR add testfile3 stderr: monotone: adding testfile3 to working copy add set stdout: t_migrate_schema.at:77: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR --branch=testbranch2 commit --message blah-blah stderr: monotone: beginning commit on branch 'testbranch2' monotone: committed revision c606ed519e48f526bb130fd64fef712f795f0625 stdout: t_migrate_schema.at:79: rm -rf MT.old t_migrate_schema.at:79: mv MT MT.old t_migrate_schema.at:79: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR checkout --revision=$REV . stdout: t_migrate_schema.at:79: test $PROBE_R_SHA = $REV t_migrate_schema.at:84: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR add testfile4 stderr: monotone: adding testfile4 to working copy add set stdout: t_migrate_schema.at:85: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR --branch=testbranch1 commit --message blah-blah stderr: monotone: beginning commit on branch 'testbranch1' monotone: committed revision 04fe9ed6642b2e258162f948934726a3085e473f stdout: t_migrate_schema.at:87: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua --nostd --norc --db=$_ROOT_DIR/test.db [EMAIL PROTECTED] --root=$_ROOT_DIR propagate testbranch2 testbranch1 stderr: monotone: propagating testbranch2 - testbranch1 monotone: [source] c606ed519e48f526bb130fd64fef712f795f0625 monotone: [target] 04fe9ed6642b2e258162f948934726a3085e473f monotone: common ancestor 696ab0232841aece22eb2ac30160c0c0ce879a46 [EMAIL PROTECTED] 2005-08-26T04:23:17 found monotone: trying 3-way merge monotone: [merged] 758967c8b6c66c95bcf8fad9f3f76278194c01be stdout: t_migrate_schema.at:88: $PREEXECUTE $_MT_EXEC --rcfile=$_ROOT_DIR/test_hooks.lua