# # # add_file "tests/t_netsync_no_include.at" # content [1bc5c658777c56145fc8f81e0194ffbb2d518eb8] # # patch "ChangeLog" # from [26f17be23e4c617836a891feb2a75508c958a6bf] # to [4272e35d9bab06a033714e00ff9db33a20c87827] # # patch "commands.cc" # from [b3e97b7c676afc7c505d28e922f028fa52d7aa38] # to [3726144b9fc8b5e9642b67bbb53700d22d4b5588] # # patch "testsuite.at" # from [cb9b6519a63379f5e71ac1799cff134e13a4bba7] # to [050da6d98d9f856078d7d0853e0cd9f6d5bc0600] # ============================================================ --- tests/t_netsync_no_include.at 1bc5c658777c56145fc8f81e0194ffbb2d518eb8 +++ tests/t_netsync_no_include.at 1bc5c658777c56145fc8f81e0194ffbb2d518eb8 @@ -0,0 +1,6 @@ +AT_SETUP(["sync server --exclude foo"]) +MTN_SETUP + +AT_CHECK(MTN sync example.net --exclude foo, [1], [ignore], [ignore]) + +AT_CLEANUP ============================================================ --- ChangeLog 26f17be23e4c617836a891feb2a75508c958a6bf +++ ChangeLog 4272e35d9bab06a033714e00ff9db33a20c87827 @@ -1,3 +1,11 @@ +2006-04-08 Timothy Brownawell + + * commands.cc (process_netsync_args): fix crash when calling netsync + with an --exclude but no include argument. + * tests/t_netsync_no_include.at: netsync with --exclude but no + include should E(), not I(). + * testsuite.at: call it + 2006-04-08 Nathaniel Smith * netxx/resolve_gethostbyname.cxx (resolve_hostname): #ifdef out ============================================================ --- commands.cc b3e97b7c676afc7c505d28e922f028fa52d7aa38 +++ commands.cc 3726144b9fc8b5e9642b67bbb53700d22d4b5588 @@ -2030,6 +2030,7 @@ // handle include/exclude args if (serve_mode || (args.size() >= 2 || !app.exclude_patterns.empty())) { + E(serve_mode || args.size() >= 2, F("no branch pattern given")); int pattern_offset = (serve_mode ? 0 : 1); std::set patterns(args.begin() + pattern_offset, args.end()); combine_and_check_globish(patterns, include_pattern); ============================================================ --- testsuite.at cb9b6519a63379f5e71ac1799cff134e13a4bba7 +++ testsuite.at 050da6d98d9f856078d7d0853e0cd9f6d5bc0600 @@ -871,3 +871,4 @@ m4_include(tests/t_revert_file_blocked_by_dir.at) m4_include(tests/t_pidfile.at) m4_include(tests/t_rosterify_empty_manifest.at) +m4_include(tests/t_netsync_no_include.at)