├── debian ├── compat ├── monotone-doc.docs ├── monotone.examples ├── monotone.manpages ├── monotone.dirs ├── monotone-doc.info ├── monotone-doc.dirs ├── po │ ├── POTFILES.in │ └── fr.po ├── monotone.docs ├── watch ├── monotone-server.dirs ├── shlibs.local ├── monotone-server.TODO.Debian ├── monotone.TODO.Debian ├── monotone-doc.postinst └── monotone-server.monotone.default ├── po ├── LINGUAS ├── POTFILES.skip └── remove-potcdate.sin ├── visualc ├── unknown_package.txt ├── mt-stdint.h ├── unistd.h └── stdint.h ├── examples ├── write-permissions ├── push.rc ├── read-permissions ├── 000README.txt └── mirror.rc ├── tests ├── automate_get_corresponding_path │ ├── expected2 │ └── expected ├── test_a_merge_9 │ ├── left │ ├── parent │ └── right ├── workspace_migration │ ├── basic-2 │ │ ├── _MTN │ │ │ ├── format │ │ │ ├── log │ │ │ ├── monotonerc │ │ │ ├── options │ │ │ └── revision │ │ ├── testfile1 │ │ ├── renamed-testfile2 │ │ └── newdir │ │ │ └── file3 │ ├── basic-1 │ │ ├── testfile1 │ │ ├── renamed-testfile2 │ │ ├── _MTN │ │ │ ├── log │ │ │ ├── revision │ │ │ ├── monotonerc │ │ │ ├── options │ │ │ └── work │ │ └── newdir │ │ │ └── file3 │ ├── inodeprints-1 │ │ ├── _MTN │ │ │ ├── inodeprints │ │ │ ├── log │ │ │ ├── revision │ │ │ ├── monotonerc │ │ │ ├── options │ │ │ └── work │ │ ├── testfile1 │ │ ├── renamed-testfile2 │ │ └── newdir │ │ │ └── file3 │ ├── inodeprints-2 │ │ ├── _MTN │ │ │ ├── format │ │ │ ├── inodeprints │ │ │ ├── log │ │ │ ├── monotonerc │ │ │ ├── options │ │ │ └── revision │ │ ├── testfile1 │ │ ├── renamed-testfile2 │ │ └── newdir │ │ │ └── file3 │ └── twoparent-2 │ │ ├── _MTN │ │ ├── format │ │ ├── log │ │ ├── monotonerc │ │ ├── options │ │ └── revision │ │ ├── testfile │ │ └── attrfile ├── i18n_commit_messages │ ├── utf8.txt │ ├── euc-jp.txt │ └── extra_hooks.lua ├── netsync_permissions │ ├── open │ │ ├── write-permissions │ │ └── read-permissions │ └── closed │ │ ├── write-permissions │ │ └── read-permissions ├── first_extent_normalization_pass │ ├── left │ ├── right │ └── __driver__.lua ├── test_a_merge_6 │ ├── parent │ ├── correct │ ├── left │ └── right ├── log_hides_deleted_renamed_files │ ├── first │ └── second ├── netsync_permissions_wildcards │ ├── write-permissions │ └── read-permissions ├── add_workspace_commit_in_another │ ├── foo.alice │ └── foo.bob ├── merge_into_workspace │ ├── otherfile │ ├── left │ ├── testfile │ ├── right │ ├── merged │ ├── dont_merge │ ├── otherfile_mod │ └── expected-manifest ├── netsync_key_hook │ ├── read-permissions │ └── client-hooks.lua ├── resolve_conflicts_read_all │ ├── content-attached_left │ ├── content-attached_right │ ├── duplicate-adds_left │ ├── duplicate-adds_right │ ├── duplicate-renames_left │ ├── duplicate-add-rename_left │ ├── duplicate-add-rename_right │ ├── duplicate-renames_right │ ├── unrelated-projects_left │ ├── unrelated-projects_right │ ├── directory-loop_left │ ├── directory-loop_right │ ├── invalid-rename_left │ ├── invalid-rename_right │ ├── multiple-names_left │ ├── multiple-names_right │ ├── invalid-add_left │ ├── invalid-add_right │ ├── multiple-name-plus-orphan_left │ ├── multiple-name-plus-duplicate-name_left │ ├── multiple-name-plus-duplicate-name_right │ ├── multiple-name-plus-orphan_right │ ├── orphaned-add_left │ ├── orphaned-add_right │ ├── content-detached_left │ ├── content-detached_right │ ├── multiple-name-plus-directory-loop_left │ ├── multiple-name-plus-directory-loop_right │ ├── orphaned-rename_left │ ├── orphaned-rename_right │ ├── missing-root_left │ ├── missing-root_right │ ├── duplicate-name-multiple-name-missing-root_left │ ├── duplicate-name-multiple-name-missing-root_right │ ├── attribute-attached_left │ └── attribute-attached_right ├── schema_migration_bad_schema │ ├── empty.dump │ └── bogus.dump ├── diff_on_missing_trailing_newline_at_end_of_file │ ├── file2 │ ├── file1 │ ├── file4 │ ├── file3 │ ├── file13.diff │ ├── file14.diff │ ├── file23.diff │ └── file24.diff ├── explicit_merge │ ├── left │ ├── testfile │ ├── right │ ├── merged │ └── dont_merge ├── use_inodeprints_hook │ ├── off.lua │ └── on.lua ├── automate_get_content_changed │ ├── expected │ └── __driver__.lua ├── merge_into_workspace_attr_corpse │ └── testfile ├── merge_into_workspace_files_added │ ├── testfile │ ├── left │ ├── right │ └── expected-revision ├── merge_into_workspace_no_changes │ ├── testfile │ ├── left │ ├── right │ └── unrelated ├── rosterify_on_a_db_with_an_empty_manifest │ ├── manifest_good │ └── revision_good ├── two_parent_workspace_annotate │ ├── left │ ├── testfile │ ├── right │ ├── merged │ └── expected-annotation ├── _--rcfile=- │ ├── foo.rc │ └── __driver__.lua ├── alias_command │ └── extra_rc ├── resolve_conflicts_errors │ ├── conflicts-attr-store-2 │ ├── conflicts-attr-show-2 │ ├── conflicts-attr-store-1 │ ├── conflicts-attr-show-1 │ └── merge-old-conflicts-file ├── _--rcfile=directory │ ├── aaa.rc │ ├── aba.rc │ └── bbb.rc ├── diff_a_binary_file │ ├── binary │ └── __driver__.lua ├── merge_manual_file │ ├── left.bmp │ ├── right.bmp │ ├── parent.bmp │ ├── binary.lua │ └── text.lua ├── disapproving_of_a_revision │ ├── rootfile │ ├── goodfile │ ├── updatefile │ ├── badfile │ └── finalfile ├── get_netsync_read_permitted │ └── read-permissions ├── updating_to_a_given_revision │ ├── root │ ├── modified-root │ ├── middle │ ├── right-leaf │ ├── left-leaf │ └── modified-left-leaf ├── calculation_of_unidiffs_start_of_file │ ├── firstfile │ └── secondfile ├── commit_using__MTN_log │ ├── commit_log.lua │ └── commit_log_modified_return.lua ├── creating_a_fork_and_merging │ ├── origfile │ ├── firstinsert │ ├── secondinsert │ └── bothinsert ├── creating_a_fork_and_updating │ ├── origfile │ ├── firstinsert │ ├── secondinsert │ └── bothinsert ├── creating_a_good_and_bad_test_result │ ├── root │ ├── good │ ├── work │ ├── bad │ └── final ├── merging_data_in_unrelated_files │ ├── left │ └── right ├── merging_data_in_unrelated_revisions │ ├── left │ ├── right │ └── __driver__.lua ├── commit_with_--message-file │ └── commit_log.lua ├── persistence_of_passphrase │ ├── persist.lua │ └── __driver__.lua ├── setup_creates__MTN_log │ └── __driver__.lua ├── inventory_hooks.lua ├── unnormalized_paths_in_database │ └── bad.db ├── warn_on_bad_restriction │ └── __driver__.lua ├── commit_using__MTN_log_and_--message │ ├── commit_log.lua │ └── __driver__.lua ├── commit_writes_message_back_to__MTN_log │ └── my_hook.lua ├── min_hooks.lua ├── mkdir │ └── ignore_hook.lua ├── commit_validation_lua_hook │ ├── errmsg │ ├── commit_validate.lua │ └── __driver__.lua ├── disallowing_persistence_of_passphrase │ └── persist.lua ├── resolve_conflicts_none │ ├── conflicts-1 │ ├── merge-1 │ └── update-1 ├── _MTN_files_handled_correctly_in_aborted_commit │ └── bad_edit_comment.lua ├── annotate_file_on_multirooted_branch │ └── merge2.lua ├── include()_includedir()_and_includedirpattern()_lua_functions │ ├── aaa.rc │ ├── aba.rc │ └── bbb.zz ├── annotate_file_added_on_different_forks │ └── merge2.lua ├── automate_get_manifest_of │ ├── expected │ └── expected2 ├── manifest_restrictions │ └── ignored.lua ├── merge_conflict_with_no_lca │ └── rcfile ├── resolve_conflicts_all_resolutions │ ├── show_remaining-thermostat │ ├── show_first-user │ ├── show_first-interactive │ ├── show_remaining-checkout_left │ ├── merge3_hook.lua │ ├── show_first-thermostat │ ├── show_first-checkout_left │ └── show_first-checkout_right ├── revert_ignored_files │ └── ignore.lua ├── test_a_merge_8 │ ├── parent │ ├── left │ ├── right │ └── correct ├── annotate_where_line_splits │ └── merge.lua ├── serve_pull_with_--exclude │ └── read-permissions ├── db_info_of_new_database │ └── __driver__.lua ├── scanning_trees │ ├── manifest1 │ ├── manifest │ └── __driver__.lua ├── annotate_with_no_revs │ └── __driver__.lua ├── list_branches │ └── ignore_branch.lua ├── netsync_badhost_gives_nice_error │ └── __driver__.lua ├── automate_branches │ └── ignore_branch.lua ├── do_not_log_the_result_of_hook_get_passphrase │ ├── hook.lua │ └── __driver__.lua ├── update_no-ops_when_no_parent_revision │ └── __driver__.lua ├── _--no-workspace │ └── __driver__.lua ├── annotate_where_lineage_depends_on_traversal │ └── merge.lua ├── empty_id_completion │ └── __driver__.lua ├── rosterify_--drop-attr │ └── manifest_good ├── diff_output_formats │ ├── hello.src │ ├── hello.dst │ ├── hello.ud │ ├── hello.udp │ ├── hello.cd │ └── hello.cdp ├── rename_in_new_workspace │ └── __driver__.lua ├── sync_server_--exclude_foo │ └── __driver__.lua ├── automate_tags │ └── ignore_branch.lua ├── merge_update_part_of_file │ ├── twochanges │ ├── onechange │ ├── original │ └── after.diff ├── automate_lua │ └── test.lua ├── test_some_hook_helper_functions │ └── __driver__.lua ├── restricted_commands_are_consistent │ └── ignore.lua ├── update_to_non-existent_rev │ └── __driver__.lua ├── diff_in_a_never-committed_project │ └── __driver__.lua ├── _--confdir_option_and_get_confdir_lua_function_work │ ├── myhooks │ └── __driver__.lua ├── schema_migration_with_rosterify │ └── old_revs_propagate_log ├── replace_file_with_dir │ └── __driver__.lua ├── _--rcfile_requires_extant_file │ └── __driver__.lua ├── automate_get_revision │ └── expected ├── can_execute_things │ ├── nix-cphook.lua │ └── win-cphook.lua ├── spawn_pipe │ └── __driver__.lua ├── lua_function_existsonpath │ ├── __driver__.lua │ └── test.lua ├── multiple_message_commit │ └── __driver__.lua ├── automate_inventory_ignore_dirs │ ├── expected.stderr │ ├── expected_2.stderr │ ├── local_hooks.lua │ └── expected.stdout ├── files_with_spaces_at_the_end │ └── __driver__.lua ├── importing_cvs_tricky_repo_with_tags │ ├── test.tags │ ├── test.manifest │ └── __driver__.lua ├── refresh_inodeprints │ └── __driver__.lua ├── revert_works_with_restrictions │ └── ignore_hook.lua ├── rosterify_on_a_db_with_1_rev │ └── manifest_good ├── automate_inventory_options │ └── test_hooks.lua ├── drop_a_public_key │ ├── pubkey.txt │ └── __driver__.lua ├── replace_dir_with_file │ └── __driver__.lua ├── duplicate_key_id │ ├── bad_test_key │ └── __driver__.lua ├── resolve_conflicts_propagate │ ├── propagate-2 │ └── propagate-1 ├── attr_init_functions │ ├── hook.lua │ └── __driver__.lua ├── automate_get_workspace_root │ └── __driver__.lua ├── diffing_a_revision_with_an_added_file │ └── __driver__.lua ├── clone_creates__MTN_log │ └── commit_log.lua ├── db_rosterify_preserves_renames │ └── expout ├── checkout_creates__MTN_log │ ├── commit_log.lua │ └── __driver__.lua ├── user_commands │ └── __driver__.lua ├── verification_of_command_line_options │ └── __driver__.lua ├── CRLF_line_normalization │ └── __driver__.lua ├── check_--log │ └── __driver__.lua ├── db_missing │ └── __driver__.lua ├── importing_a_file │ └── __driver__.lua ├── netsync_over_pipes │ └── __driver__.lua ├── setup_in_subdirectory │ └── __driver__.lua ├── automate_show_conflicts │ ├── expected-unrelated-projects.stdout │ ├── expected-invalid-add.stdout │ ├── expected-directory-loop.stdout │ ├── expected-orphaned-add.stdout │ ├── expected-multiple-name-plus-directory-loop.stdout │ ├── expected-duplicate-adds.stdout │ ├── expected-invalid-rename.stdout │ ├── expected-orphaned-rename.stdout │ ├── expected-missing-root.stdout │ └── expected-duplicate-add-rename.stdout ├── select_partial_id │ └── __driver__.lua ├── revert_moving_a_file_to_a_renamed_directory │ └── __driver__.lua ├── rosterify_migrates_file_dir_attrs │ ├── first_manifest_good │ └── second_manifest_good ├── diff_against_empty_file │ ├── __driver__.lua │ └── expected.diff ├── ls_unknown_of_unknown_subdir │ └── __driver__.lua ├── missing_empty_dir │ └── __driver__.lua ├── ls_duplicates_without_duplicates │ └── __driver__.lua ├── add_ignored │ └── __driver__.lua ├── add_unknown_ignored │ └── __driver__.lua ├── fail_cleanly_on_unreadable__MTN_options │ └── __driver__.lua ├── test_the_approve_command │ └── __driver__.lua ├── commit_w_o__MTN_log_being_present │ └── __driver__.lua ├── merge_into_workspace_same_rev │ └── __driver__.lua ├── resolve_conflicts_content │ ├── update-1 │ └── merge-1 ├── setup_on_existing_path │ └── __driver__.lua ├── importing_cvs_file_with_one_version │ ├── cvs-repository │ │ └── test │ │ │ └── foo,v │ ├── __driver__.lua │ └── makerepo.sh ├── importing_cvs_small_real_repo │ ├── test.manifest │ └── __driver__.lua ├── magic__MTN_in_restrictions │ └── __driver__.lua ├── default_command_options │ ├── __driver__.lua │ └── default_options.lua ├── add_and_then_drop_file_does_nothing │ └── __driver__.lua ├── automate_interface_version │ └── __driver__.lua ├── db_rosterify_twice_gives_an_error_second_time │ └── __driver__.lua ├── drop_root │ └── __driver__.lua ├── rename_with_actual_file_rename │ └── __driver__.lua ├── ssh_agent │ ├── id_rsa.pub │ ├── id_rsa2.pub │ └── id_dsa.pub ├── invalid__MTN_options │ └── __driver__.lua ├── checkout_in_windows_root │ └── __driver__.lua ├── common │ └── selectors.lua ├── automate_commands_are_not_completed │ └── __driver__.lua ├── p_selector │ └── __driver__.lua ├── diff_restriction_renamed_parent │ └── __driver__.lua ├── disapproving_with_message │ └── __driver__.lua ├── log_--diffs │ └── expect_restrict ├── log_--last=N_FILENAME │ └── __driver__.lua ├── ls_tags_with_ambiguous_tags │ └── __driver__.lua ├── delete_work_file_on_checkout │ └── __driver__.lua ├── creating_a_bad_criss-cross_merge │ ├── bob.lua │ └── alice.lua ├── fail_cleanly_when__MTN_format_corrupt │ └── __driver__.lua ├── update_updates_inodeprints │ └── __driver__.lua ├── syntax_errors_in_.mtn-ignore │ └── mtn-ignore ├── attr_set_attr_get │ └── __driver__.lua ├── drop_removes_attributes │ └── __driver__.lua ├── pull_a_netsync_branch_which_has_a_parent_from_another_branch │ └── __driver__.lua ├── _MTN_revision_is_required │ └── __driver__.lua ├── importing_cvs_file_dead_on_head_and_branch │ └── __driver__.lua ├── restrictions_when_pwd_is_mixed_case │ └── __driver__.lua ├── branch-based_checkout │ └── __driver__.lua ├── failed_checkout_is_a_no-op │ └── __driver__.lua ├── mtn_up │ └── __driver__.lua ├── (minor)_update_cleans_emptied_directories │ └── __driver__.lua ├── keydir_defaults_to_under_confdir │ └── __driver__.lua ├── merge_with_conflicting_name_and_renamed_dir │ └── expected.stdout ├── annotate_with_human_output │ └── __driver__.lua ├── netsync_with_suspended_branch │ └── __driver__.lua ├── add_ignores__MTN │ └── __driver__.lua ├── importing_cvs_problematic_repo │ └── __driver__.lua ├── checkout_fails_with_multiple_heads │ └── __driver__.lua ├── importing_cvs_file_added_on_a_branch │ └── __driver__.lua ├── automate_read_packets │ └── __driver__.lua ├── exchanging_work_via_netsync,_with_notes │ └── testnotes2.test ├── netsync_largish_file │ └── __driver__.lua ├── merge((rename_a_b),_(rename_a_c)) │ └── __driver__.lua ├── check_same_db_contents_macro │ └── __driver__.lua ├── exchanging_work_via_netsync_sent_notes │ └── testnotes2.test ├── ls_unknown_in_subdir │ └── __driver__.lua ├── diffing_with_explicit_rev_same_as_wc_rev │ └── __driver__.lua ├── add_inside__MTN_ │ └── __driver__.lua ├── calculation_of_other_unidiffs │ └── __driver__.lua ├── mtn_read_FILE │ └── __driver__.lua ├── renaming_a_directory_and_then_adding_a_new_with_the_old_name │ └── __driver__.lua ├── add_unknown_recursive │ └── __driver__.lua ├── b_and_h_selectors │ └── __driver__.lua ├── automate_certs │ └── expected ├── drop_a_public_and_private_key │ └── __driver__.lua ├── reallyquiet_turns_off_tickers_and_warnings │ └── __driver__.lua ├── _--author,_--date │ └── __driver__.lua ├── locked_workspace │ └── __driver__.lua ├── update_-b_switches_branches_even_when_noop │ └── __driver__.lua ├── _--db_with_parent_dir │ └── __driver__.lua ├── invalid_--root_settings │ └── __driver__.lua ├── normalized_filenames │ └── __driver__.lua ├── server_initiated_sync │ ├── server1.rc │ └── __driver__.lua ├── updating_from_a_merge_which_adds_a_file │ └── __driver__.lua ├── diff_--external │ └── testhook.lua ├── filenames_in_diff_after_rename │ └── __driver__.lua ├── checkout_-r_no_dir │ └── __driver__.lua ├── netsync_client_absorbs_server_key │ └── __driver__.lua ├── use_restrictions_with_--exclude_and_inodeprints │ └── __driver__.lua ├── db_load_must_create_a_new_db │ └── __driver__.lua ├── escaped_selectors │ └── __driver__.lua ├── resolve_conflicts_duplicate_name │ └── merge-1 ├── merge_rev_with_ancestor │ └── __driver__.lua ├── ls_duplicates_with_duplicates │ └── __driver__.lua ├── add_executable │ └── __driver__.lua ├── revert_file_blocked_by_unversioned_directory │ └── __driver__.lua ├── status_with_missing_files │ └── __driver__.lua ├── revert_directories │ └── __driver__.lua ├── add_in_subdir │ └── __driver__.lua ├── automate_get_current_revision_id │ └── __driver__.lua ├── update_with_pending_add │ └── __driver__.lua ├── usage_output_streams │ └── __driver__.lua └── invoke_toplevel_group │ └── __driver__.lua ├── unix ├── README ├── make_io_binary.cc └── cputime.cc ├── figures ├── cert.pdf ├── cert.png ├── fork.pdf ├── fork.png ├── merge.pdf ├── merge.png ├── manifest.pdf ├── manifest.png ├── revision.pdf ├── revision.png ├── oo-figures.sxd ├── statement.pdf ├── statement.png ├── branch-heads.pdf ├── branch-heads.png ├── parent-child.pdf ├── parent-child.png ├── two-branches.pdf ├── two-branches.png ├── general-workflow.pdf ├── general-workflow.png ├── linear-history.pdf ├── linear-history.png ├── local-workflow.pdf ├── local-workflow.png ├── network-workflow.pdf ├── network-workflow.png ├── three-versions.pdf ├── three-versions.png ├── revision-chaining.pdf ├── revision-chaining.png ├── file-id-manifest-id.pdf ├── file-id-manifest-id.png ├── parent-child-hashes.pdf ├── parent-child-hashes.png ├── parent-child-names-hashes.pdf ├── parent-child-names-hashes.png ├── difference-between-versions.pdf └── difference-between-versions.png ├── win32 ├── monotone.bmp ├── monotone.iss ├── tester-check-net.c └── make_io_binary.cc ├── mac ├── monotone.pmproj └── monotone-pkg-logo.gif ├── tester-testsuite.lua ├── package_revision.h ├── contrib ├── command │ └── README ├── color-logs.sh ├── README.missing └── color-logs.conf ├── package_full_revision.h ├── tester-tests ├── isolated-2 │ └── __driver__.lua ├── cleanup-2 │ └── __driver__.lua ├── remove-unwriteable │ └── __driver__.lua ├── cleanup-1 │ └── __driver__.lua └── isolated-1 │ └── __driver__.lua ├── cygwin └── monotone-0.40-1.cygport ├── README ├── idna └── idn-int.h ├── lua └── lapi.h ├── indent_script ├── mkstemp.hh ├── botan ├── botan.h └── selftest.h ├── i18n.h ├── do-editor-vars.sh ├── quick_alloc.hh └── m4 ├── pch.m4 └── localeworks.m4 /debian/compat: -------------------------------------------------------------------------------- 1 | 4 2 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | sv 2 | it 3 | de 4 | es 5 | -------------------------------------------------------------------------------- /debian/monotone-doc.docs: -------------------------------------------------------------------------------- 1 | monotone.pdf 2 | -------------------------------------------------------------------------------- /debian/monotone.examples: -------------------------------------------------------------------------------- 1 | examples/* 2 | -------------------------------------------------------------------------------- /debian/monotone.manpages: -------------------------------------------------------------------------------- 1 | debian/mtn.1 2 | -------------------------------------------------------------------------------- /visualc/unknown_package.txt: -------------------------------------------------------------------------------- 1 | unknown 2 | -------------------------------------------------------------------------------- /debian/monotone.dirs: -------------------------------------------------------------------------------- 1 | etc/bash_completion.d 2 | -------------------------------------------------------------------------------- /examples/write-permissions: -------------------------------------------------------------------------------- 1 | user@domain.tld 2 | -------------------------------------------------------------------------------- /tests/automate_get_corresponding_path/expected2: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/test_a_merge_9/left: -------------------------------------------------------------------------------- 1 | A 2 | B' 3 | C 4 | -------------------------------------------------------------------------------- /tests/test_a_merge_9/parent: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | C 4 | -------------------------------------------------------------------------------- /examples/push.rc: -------------------------------------------------------------------------------- 1 | PROJECTBACKUP PROJECTBRANCH* 2 | -------------------------------------------------------------------------------- /tests/test_a_merge_9/right: -------------------------------------------------------------------------------- 1 | A 2 | A' 3 | B 4 | C 5 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/_MTN/format: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/i18n_commit_messages/utf8.txt: -------------------------------------------------------------------------------- 1 | ワークスペースが必要ですがみつかりませんでした -------------------------------------------------------------------------------- /tests/netsync_permissions/open/write-permissions: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/testfile1: -------------------------------------------------------------------------------- 1 | new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/testfile1: -------------------------------------------------------------------------------- 1 | new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/inodeprints: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/format: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/inodeprints: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/_MTN/format: -------------------------------------------------------------------------------- 1 | 2 2 | -------------------------------------------------------------------------------- /debian/monotone-doc.info: -------------------------------------------------------------------------------- 1 | monotone.info 2 | monotone.info-* 3 | -------------------------------------------------------------------------------- /tests/automate_get_corresponding_path/expected: -------------------------------------------------------------------------------- 1 | file "foo" 2 | -------------------------------------------------------------------------------- /tests/first_extent_normalization_pass/left: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | B 4 | -------------------------------------------------------------------------------- /tests/test_a_merge_6/parent: -------------------------------------------------------------------------------- 1 | 2 | o 3 | a 4 | q 5 | e 6 | g 7 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/testfile1: -------------------------------------------------------------------------------- 1 | new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/testfile1: -------------------------------------------------------------------------------- 1 | new stuff 2 | -------------------------------------------------------------------------------- /debian/monotone-doc.dirs: -------------------------------------------------------------------------------- 1 | usr/share/doc/monotone/html/figures 2 | -------------------------------------------------------------------------------- /tests/first_extent_normalization_pass/right: -------------------------------------------------------------------------------- 1 | A 2 | B 3 | A 4 | B 5 | -------------------------------------------------------------------------------- /tests/log_hides_deleted_renamed_files/first: -------------------------------------------------------------------------------- 1 | Addition of foo. 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/testfile: -------------------------------------------------------------------------------- 1 | left 2 | right 3 | -------------------------------------------------------------------------------- /tests/netsync_permissions/closed/write-permissions: -------------------------------------------------------------------------------- 1 | tester@test.net 2 | -------------------------------------------------------------------------------- /tests/netsync_permissions_wildcards/write-permissions: -------------------------------------------------------------------------------- 1 | tester@test.net 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/renamed-testfile2: -------------------------------------------------------------------------------- 1 | more new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/renamed-testfile2: -------------------------------------------------------------------------------- 1 | more new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/attrfile: -------------------------------------------------------------------------------- 1 | this file has attributes -------------------------------------------------------------------------------- /unix/README: -------------------------------------------------------------------------------- 1 | This directory keeps the Unix (POSIX) specific files. 2 | -------------------------------------------------------------------------------- /debian/po/POTFILES.in: -------------------------------------------------------------------------------- 1 | [type: gettext/rfc822deb] monotone-server.templates 2 | -------------------------------------------------------------------------------- /tests/add_workspace_commit_in_another/foo.alice: -------------------------------------------------------------------------------- 1 | foo 2 | change me 3 | bar 4 | -------------------------------------------------------------------------------- /tests/add_workspace_commit_in_another/foo.bob: -------------------------------------------------------------------------------- 1 | foo 2 | me change 3 | bar 4 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/otherfile: -------------------------------------------------------------------------------- 1 | this file is not involved in the merge -------------------------------------------------------------------------------- /tests/netsync_key_hook/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "*" 2 | allow "tester@test.net" -------------------------------------------------------------------------------- /tests/netsync_permissions/open/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "*" 2 | allow "*" 3 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/content-attached_left: -------------------------------------------------------------------------------- 1 | mtn: content foo 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/content-attached_right: -------------------------------------------------------------------------------- 1 | mtn: content foo 2 | -------------------------------------------------------------------------------- /tests/schema_migration_bad_schema/empty.dump: -------------------------------------------------------------------------------- 1 | BEGIN EXCLUSIVE; 2 | COMMIT; 3 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/renamed-testfile2: -------------------------------------------------------------------------------- 1 | more new stuff 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/renamed-testfile2: -------------------------------------------------------------------------------- 1 | more new stuff 2 | -------------------------------------------------------------------------------- /debian/po/fr.po: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/debian/po/fr.po -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file2: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | quux -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-adds_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name bar 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-adds_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name bar 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-renames_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name abc 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/_MTN/log: -------------------------------------------------------------------------------- 1 | oh frabjous patch, calloo callay 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/newdir/file3: -------------------------------------------------------------------------------- 1 | twas mimsy and the borogroves 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/_MTN/log: -------------------------------------------------------------------------------- 1 | oh frabjous patch, calloo callay 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/newdir/file3: -------------------------------------------------------------------------------- 1 | twas mimsy and the borogroves 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/_MTN/log: -------------------------------------------------------------------------------- 1 | oh frabjous patch, calloo callay 2 | -------------------------------------------------------------------------------- /figures/cert.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/cert.pdf -------------------------------------------------------------------------------- /figures/cert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/cert.png -------------------------------------------------------------------------------- /figures/fork.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/fork.pdf -------------------------------------------------------------------------------- /figures/fork.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/fork.png -------------------------------------------------------------------------------- /figures/merge.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/merge.pdf -------------------------------------------------------------------------------- /figures/merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/merge.png -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file1: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | quux 4 | -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file4: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | quux 4 | baz -------------------------------------------------------------------------------- /tests/explicit_merge/left: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/explicit_merge/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-add-rename_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name bar 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-add-rename_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name bar 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-renames_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name abc 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/log: -------------------------------------------------------------------------------- 1 | oh frabjous patch, calloo callay 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/newdir/file3: -------------------------------------------------------------------------------- 1 | twas mimsy and the borogroves 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/log: -------------------------------------------------------------------------------- 1 | oh frabjous patch, calloo callay 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/newdir/file3: -------------------------------------------------------------------------------- 1 | twas mimsy and the borogroves 2 | -------------------------------------------------------------------------------- /win32/monotone.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/win32/monotone.bmp -------------------------------------------------------------------------------- /win32/monotone.iss: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/win32/monotone.iss -------------------------------------------------------------------------------- /figures/manifest.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/manifest.pdf -------------------------------------------------------------------------------- /figures/manifest.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/manifest.png -------------------------------------------------------------------------------- /figures/revision.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/revision.pdf -------------------------------------------------------------------------------- /figures/revision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/revision.png -------------------------------------------------------------------------------- /mac/monotone.pmproj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/mac/monotone.pmproj -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file3: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | quux 4 | baz 5 | -------------------------------------------------------------------------------- /tests/explicit_merge/right: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/left: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/use_inodeprints_hook/off.lua: -------------------------------------------------------------------------------- 1 | function use_inodeprints() 2 | return false 3 | end 4 | -------------------------------------------------------------------------------- /tests/use_inodeprints_hook/on.lua: -------------------------------------------------------------------------------- 1 | function use_inodeprints() 2 | return true 3 | end 4 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/_MTN/revision: -------------------------------------------------------------------------------- 1 | c2cdede98d20694daf470055a100bf74fdd8e615 2 | -------------------------------------------------------------------------------- /debian/monotone.docs: -------------------------------------------------------------------------------- 1 | AUTHORS 2 | NEWS 3 | README 4 | README.changesets 5 | UPGRADE 6 | contrib 7 | -------------------------------------------------------------------------------- /figures/oo-figures.sxd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/oo-figures.sxd -------------------------------------------------------------------------------- /figures/statement.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/statement.pdf -------------------------------------------------------------------------------- /figures/statement.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/statement.png -------------------------------------------------------------------------------- /tests/explicit_merge/merged: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/right: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/test_a_merge_6/correct: -------------------------------------------------------------------------------- 1 | 2 | o 3 | a 4 | 2 5 | 3 6 | 4 7 | a 8 | q 9 | d 10 | g 11 | -------------------------------------------------------------------------------- /tests/test_a_merge_6/left: -------------------------------------------------------------------------------- 1 | 2 | o 3 | a 4 | 2 5 | 3 6 | 4 7 | a 8 | q 9 | d 10 | g 11 | -------------------------------------------------------------------------------- /tests/test_a_merge_6/right: -------------------------------------------------------------------------------- 1 | 2 | o 3 | a 4 | 2 5 | 3 6 | 4 7 | a 8 | q 9 | e 10 | g 11 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/revision: -------------------------------------------------------------------------------- 1 | c2cdede98d20694daf470055a100bf74fdd8e615 2 | -------------------------------------------------------------------------------- /figures/branch-heads.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/branch-heads.pdf -------------------------------------------------------------------------------- /figures/branch-heads.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/branch-heads.png -------------------------------------------------------------------------------- /figures/parent-child.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child.pdf -------------------------------------------------------------------------------- /figures/parent-child.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child.png -------------------------------------------------------------------------------- /figures/two-branches.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/two-branches.pdf -------------------------------------------------------------------------------- /figures/two-branches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/two-branches.png -------------------------------------------------------------------------------- /mac/monotone-pkg-logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/mac/monotone-pkg-logo.gif -------------------------------------------------------------------------------- /tests/automate_get_content_changed/expected: -------------------------------------------------------------------------------- 1 | content_mark [dae0d8e3f944c82a9688bcd6af99f5b837b41968] 2 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/merged: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_attr_corpse/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_files_added/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_no_changes/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/netsync_permissions_wildcards/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "test*" 2 | allow "tester@test.net" 3 | -------------------------------------------------------------------------------- /tests/rosterify_on_a_db_with_an_empty_manifest/manifest_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | -------------------------------------------------------------------------------- /tests/two_parent_workspace_annotate/left: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/two_parent_workspace_annotate/testfile: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /figures/general-workflow.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/general-workflow.pdf -------------------------------------------------------------------------------- /figures/general-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/general-workflow.png -------------------------------------------------------------------------------- /figures/linear-history.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/linear-history.pdf -------------------------------------------------------------------------------- /figures/linear-history.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/linear-history.png -------------------------------------------------------------------------------- /figures/local-workflow.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/local-workflow.pdf -------------------------------------------------------------------------------- /figures/local-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/local-workflow.png -------------------------------------------------------------------------------- /figures/network-workflow.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/network-workflow.pdf -------------------------------------------------------------------------------- /figures/network-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/network-workflow.png -------------------------------------------------------------------------------- /figures/three-versions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/three-versions.pdf -------------------------------------------------------------------------------- /figures/three-versions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/three-versions.png -------------------------------------------------------------------------------- /tests/_--rcfile=-/foo.rc: -------------------------------------------------------------------------------- 1 | function note_commit(new_id, certs) 2 | io.write("BOOGA BOOGA\n") 3 | end 4 | -------------------------------------------------------------------------------- /tests/alias_command/extra_rc: -------------------------------------------------------------------------------- 1 | alias_command("annotate", "blame") 2 | alias_command("annotate", "praise") 3 | -------------------------------------------------------------------------------- /tests/log_hides_deleted_renamed_files/second: -------------------------------------------------------------------------------- 1 | Addition of baz. 2 | Addition of bar. 3 | Addition of foo. 4 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_files_added/left: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_files_added/right: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_no_changes/left: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 blah 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_no_changes/right: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_errors/conflicts-attr-store-2: -------------------------------------------------------------------------------- 1 | mtn: misuse: conflicts file must be under _MTN 2 | -------------------------------------------------------------------------------- /tests/two_parent_workspace_annotate/right: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 blah 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /figures/revision-chaining.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/revision-chaining.pdf -------------------------------------------------------------------------------- /figures/revision-chaining.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/revision-chaining.png -------------------------------------------------------------------------------- /tests/_--rcfile=directory/aaa.rc: -------------------------------------------------------------------------------- 1 | function paraponzi() 2 | io.write("BOOGA BOOGA") 3 | end 4 | paraponzi() 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_errors/conflicts-attr-show-2: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_errors/conflicts-attr-store-1: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | -------------------------------------------------------------------------------- /tests/two_parent_workspace_annotate/merged: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 left change 3 | 3 blah 4 | 4 right change 5 | 5 blah 6 | -------------------------------------------------------------------------------- /figures/file-id-manifest-id.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/file-id-manifest-id.pdf -------------------------------------------------------------------------------- /figures/file-id-manifest-id.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/file-id-manifest-id.png -------------------------------------------------------------------------------- /figures/parent-child-hashes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child-hashes.pdf -------------------------------------------------------------------------------- /figures/parent-child-hashes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child-hashes.png -------------------------------------------------------------------------------- /tests/diff_a_binary_file/binary: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/diff_a_binary_file/binary -------------------------------------------------------------------------------- /tests/explicit_merge/dont_merge: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 change not to merge 3 | 3 blah 4 | 4 change not to merge 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_manual_file/left.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/merge_manual_file/left.bmp -------------------------------------------------------------------------------- /tests/merge_manual_file/right.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/merge_manual_file/right.bmp -------------------------------------------------------------------------------- /tests/_--rcfile=directory/aba.rc: -------------------------------------------------------------------------------- 1 | function notwowithoutthree() 2 | io.write("hu hu") 3 | end 4 | notwowithoutthree() 5 | -------------------------------------------------------------------------------- /tests/_--rcfile=directory/bbb.rc: -------------------------------------------------------------------------------- 1 | function labellagigogin() 2 | io.write("CICCA CICCA") 3 | end 4 | labellagigogin() 5 | -------------------------------------------------------------------------------- /tests/disapproving_of_a_revision/rootfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | -------------------------------------------------------------------------------- /tests/get_netsync_read_permitted/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "branch1" 2 | allow "*" 3 | pattern "branch3" 4 | allow "*" 5 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/dont_merge: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 change not to merge 3 | 3 blah 4 | 4 change not to merge 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/merge_manual_file/parent.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/merge_manual_file/parent.bmp -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/root: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/_MTN/monotonerc: -------------------------------------------------------------------------------- 1 | -- io.stderr:write("warning: bandersnatch insufficiently frumious\n") 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/_MTN/monotonerc: -------------------------------------------------------------------------------- 1 | -- io.stderr:write("warning: bandersnatch insufficiently frumious\n") 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | version=3 2 | http://www.monotone.ca/downloads/([\d\.]+)/ \ 3 | monotone-([\d\.]+)\.tar\.gz debian uupdate 4 | -------------------------------------------------------------------------------- /figures/parent-child-names-hashes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child-names-hashes.pdf -------------------------------------------------------------------------------- /figures/parent-child-names-hashes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/parent-child-names-hashes.png -------------------------------------------------------------------------------- /tests/calculation_of_unidiffs_start_of_file/firstfile: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | 7 8 | 8 9 | 9 10 | 10 11 | -------------------------------------------------------------------------------- /tests/commit_using__MTN_log/commit_log.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | return user_log_file 3 | end 4 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_merging/origfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_updating/origfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | -------------------------------------------------------------------------------- /tests/creating_a_good_and_bad_test_result/root: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | -------------------------------------------------------------------------------- /tests/i18n_commit_messages/euc-jp.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/i18n_commit_messages/euc-jp.txt -------------------------------------------------------------------------------- /tests/merge_into_workspace/otherfile_mod: -------------------------------------------------------------------------------- 1 | this file is not involved in the merge 2 | but it was modified in the target workspace -------------------------------------------------------------------------------- /tests/merging_data_in_unrelated_files/left: -------------------------------------------------------------------------------- 1 | line 1: foo 2 | line 2: something unexpected 3 | line 3: baz 4 | line 4: quux 5 | -------------------------------------------------------------------------------- /tests/merging_data_in_unrelated_files/right: -------------------------------------------------------------------------------- 1 | line 1: foo 2 | line 2: bar 3 | line 3: baz 4 | line 4: something unexpected 5 | -------------------------------------------------------------------------------- /tests/merging_data_in_unrelated_revisions/left: -------------------------------------------------------------------------------- 1 | line 1: foo 2 | line 2: something unexpected 3 | line 3: baz 4 | line 4: quux 5 | -------------------------------------------------------------------------------- /tests/merging_data_in_unrelated_revisions/right: -------------------------------------------------------------------------------- 1 | line 1: foo 2 | line 2: bar 3 | line 3: baz 4 | line 4: something unexpected 5 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/_MTN/monotonerc: -------------------------------------------------------------------------------- 1 | -- io.stderr:write("warning: bandersnatch insufficiently frumious\n") 2 | -------------------------------------------------------------------------------- /figures/difference-between-versions.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/difference-between-versions.pdf -------------------------------------------------------------------------------- /figures/difference-between-versions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/figures/difference-between-versions.png -------------------------------------------------------------------------------- /tests/commit_with_--message-file/commit_log.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | return user_log_file 3 | end 4 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_no_changes/unrelated: -------------------------------------------------------------------------------- 1 | 1 blah 2 | 2 change not to merge 3 | 3 blah 4 | 4 change not to merge 5 | 5 blah 6 | -------------------------------------------------------------------------------- /tests/persistence_of_passphrase/persist.lua: -------------------------------------------------------------------------------- 1 | function persist_phrase_ok() 2 | return true 3 | end 4 | 5 | get_passphrase = nil 6 | -------------------------------------------------------------------------------- /tests/schema_migration_bad_schema/bogus.dump: -------------------------------------------------------------------------------- 1 | BEGIN EXCLUSIVE; 2 | CREATE TABLE foo (bar primary key, baz not null); 3 | COMMIT; 4 | -------------------------------------------------------------------------------- /tests/setup_creates__MTN_log/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(exists("_MTN/log")) 5 | check(fsize("_MTN/log") == 0) 6 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/monotonerc: -------------------------------------------------------------------------------- 1 | -- io.stderr:write("warning: bandersnatch insufficiently frumious\n") 2 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/monotonerc: -------------------------------------------------------------------------------- 1 | -- io.stderr:write("warning: bandersnatch insufficiently frumious\n") 2 | -------------------------------------------------------------------------------- /tester-testsuite.lua: -------------------------------------------------------------------------------- 1 | -- we have very little to do here; just declare the directory of tests. 2 | testdir = srcdir.."/tester-tests" 3 | -------------------------------------------------------------------------------- /tests/i18n_commit_messages/extra_hooks.lua: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/i18n_commit_messages/extra_hooks.lua -------------------------------------------------------------------------------- /tests/inventory_hooks.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "%~$")) then return true end 3 | return false 4 | end 5 | -------------------------------------------------------------------------------- /tests/netsync_key_hook/client-hooks.lua: -------------------------------------------------------------------------------- 1 | function get_netsync_key(server, include, exclude) 2 | return "tester@test.net" 3 | end 4 | -------------------------------------------------------------------------------- /tests/netsync_permissions/closed/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "badbranch" 2 | deny "*" 3 | 4 | pattern "*" 5 | allow "tester@test.net" 6 | -------------------------------------------------------------------------------- /tests/unnormalized_paths_in_database/bad.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/graydon/monotone/HEAD/tests/unnormalized_paths_in_database/bad.db -------------------------------------------------------------------------------- /tests/warn_on_bad_restriction/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("diff", "bogusdir1", "bogusdir2"), 1, false, true) 5 | -------------------------------------------------------------------------------- /po/POTFILES.skip: -------------------------------------------------------------------------------- 1 | contrib/ciabot_monotone.py 2 | idna/nfkc.c 3 | popt/popt.c 4 | popt/popthelp.c 5 | sqlite/os_common.h 6 | sqlite/vdbe.c 7 | -------------------------------------------------------------------------------- /tests/calculation_of_unidiffs_start_of_file/secondfile: -------------------------------------------------------------------------------- 1 | 1 2 | 2 3 | 3 4 | 4 5 | 5 6 | 6 7 | inserted 8 | 7 9 | 8 10 | 9 11 | 10 12 | -------------------------------------------------------------------------------- /tests/commit_using__MTN_log_and_--message/commit_log.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | return user_log_file 3 | end 4 | -------------------------------------------------------------------------------- /tests/commit_writes_message_back_to__MTN_log/my_hook.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(basetext, user_log_message) 2 | return "foobar\n" 3 | end 4 | -------------------------------------------------------------------------------- /tests/min_hooks.lua: -------------------------------------------------------------------------------- 1 | 2 | function get_passphrase(keyid) 3 | return keyid 4 | end 5 | function persist_phrase_ok() 6 | return true 7 | end 8 | -------------------------------------------------------------------------------- /tests/mkdir/ignore_hook.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "testing4")) then return true end 3 | return false 4 | end 5 | -------------------------------------------------------------------------------- /tests/commit_validation_lua_hook/errmsg: -------------------------------------------------------------------------------- 1 | mtn: beginning commit on branch 'testbranch' 2 | mtn: misuse: log message rejected by hook: input.txt 3 | -------------------------------------------------------------------------------- /tests/disallowing_persistence_of_passphrase/persist.lua: -------------------------------------------------------------------------------- 1 | function persist_phrase_ok() 2 | return false 3 | end 4 | 5 | get_passphrase = nil 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_none/conflicts-1: -------------------------------------------------------------------------------- 1 | left [bcd098b31f9ed42acfb5ab550c973e7d8f7203fd] 2 | right [c28c3c0f5a7f9cde848be91f79d86a6dd63e88ca] 3 | -------------------------------------------------------------------------------- /tests/_MTN_files_handled_correctly_in_aborted_commit/bad_edit_comment.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(basetext, user_log_message) 2 | return "" 3 | end 4 | -------------------------------------------------------------------------------- /tests/annotate_file_on_multirooted_branch/merge2.lua: -------------------------------------------------------------------------------- 1 | function merge2 (left, right) 2 | data = "z\na\nk\nx\n" 3 | return data 4 | end 5 | -------------------------------------------------------------------------------- /tests/include()_includedir()_and_includedirpattern()_lua_functions/aaa.rc: -------------------------------------------------------------------------------- 1 | function paraponzi() 2 | io.write("BOOGA BOOGA") 3 | end 4 | paraponzi() 5 | -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/modified-root: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | third line of the file 4 | a new fourth line 5 | -------------------------------------------------------------------------------- /tests/annotate_file_added_on_different_forks/merge2.lua: -------------------------------------------------------------------------------- 1 | function merge2 (left, right) 2 | data = "z\na\nk\nx\n" 3 | return data 4 | end 5 | -------------------------------------------------------------------------------- /tests/automate_get_manifest_of/expected: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | file "foo" 6 | content [4cbd040533a2f43fc6691d773d510cda70f4126a] 7 | -------------------------------------------------------------------------------- /tests/automate_get_manifest_of/expected2: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | file "foo" 6 | content [9fd2be4badf713d640ae46bf4547d1549654dfe5] 7 | -------------------------------------------------------------------------------- /tests/manifest_restrictions/ignored.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "%.o$")) then return true end 3 | return false; 4 | end 5 | -------------------------------------------------------------------------------- /tests/merge_conflict_with_no_lca/rcfile: -------------------------------------------------------------------------------- 1 | function merge3(anc_path, left_path, right_path, merged_path, ancestor, left, right) 2 | return left 3 | end 4 | -------------------------------------------------------------------------------- /package_revision.h: -------------------------------------------------------------------------------- 1 | #ifndef __PACKAGE_REVISION_H__ 2 | #define __PACKAGE_REVISION_H__ 3 | 4 | extern char const package_revision_constant[]; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /tests/include()_includedir()_and_includedirpattern()_lua_functions/aba.rc: -------------------------------------------------------------------------------- 1 | function notwowithoutthree() 2 | io.write("hu hu") 3 | end 4 | notwowithoutthree() 5 | -------------------------------------------------------------------------------- /tests/include()_includedir()_and_includedirpattern()_lua_functions/bbb.zz: -------------------------------------------------------------------------------- 1 | function labellagigogin() 2 | io.write("CICCA CICCA") 3 | end 4 | labellagigogin() 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_remaining-thermostat: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name thermostat.c 2 | mtn: content interactive_file 3 | mtn: content user_file 4 | -------------------------------------------------------------------------------- /tests/revert_ignored_files/ignore.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "%.ignored$")) then return true end 3 | return false 4 | end 5 | -------------------------------------------------------------------------------- /tests/test_a_merge_8/parent: -------------------------------------------------------------------------------- 1 | AN INITIAL COMMON LINE 2 | ANOTHER COMMON LINE 3 | 4 | THIS LINE EXISTS TWICE 5 | ANOTHER COMMON LINE (B) 6 | A LAST COMMON LINE 7 | -------------------------------------------------------------------------------- /tests/annotate_where_line_splits/merge.lua: -------------------------------------------------------------------------------- 1 | function merge3 (ancestor, left, right) 2 | data = "a\nident\nb\nc\nident\nd\n" 3 | return data 4 | end 5 | -------------------------------------------------------------------------------- /tests/disapproving_of_a_revision/goodfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/disapproving_of_a_revision/updatefile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | an insertion between second and third 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/serve_pull_with_--exclude/read-permissions: -------------------------------------------------------------------------------- 1 | pattern "branch2" 2 | deny "*" 3 | 4 | pattern "branch4" 5 | deny "*" 6 | 7 | pattern "branch*" 8 | allow "*" 9 | -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/middle: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_merging/firstinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_merging/secondinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | an insertion between second and third 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_updating/firstinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_updating/secondinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | an insertion between second and third 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_good_and_bad_test_result/good: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/creating_a_good_and_bad_test_result/work: -------------------------------------------------------------------------------- 1 | first line of the file 2 | second line of the file 3 | an insertion between second and third 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/db_info_of_new_database/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- check that db info of a new database works 5 | 6 | check(mtn("db", "info"), 0, false, false) 7 | -------------------------------------------------------------------------------- /tests/scanning_trees/manifest1: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "foo" 6 | 7 | file "testfile0" 8 | content [5c39de9ca49b3aa34fa21f5778954665d947476c] 9 | -------------------------------------------------------------------------------- /debian/monotone-server.dirs: -------------------------------------------------------------------------------- 1 | var/lib/monotone 2 | var/lib/monotone/keys 3 | etc/monotone 4 | var/log/monotone 5 | var/run/monotone 6 | usr/share/doc 7 | usr/share/monotone 8 | -------------------------------------------------------------------------------- /debian/shlibs.local: -------------------------------------------------------------------------------- 1 | # libpcre's own shlibs file requires only >=7.4, but we want to be sure 2 | # to get the security fixes in 7.5 and 7.6. 3 | libpcre 3 libpcre3 (>= 7.6) 4 | -------------------------------------------------------------------------------- /tests/annotate_with_no_revs/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | 6 | check(mtn("annotate", "--brief", "testfile"), 1, false, false) 7 | -------------------------------------------------------------------------------- /tests/list_branches/ignore_branch.lua: -------------------------------------------------------------------------------- 1 | function ignore_branch(branchname) 2 | if(branchname == "branch.to.be.ignored") then return true end 3 | return false 4 | end 5 | -------------------------------------------------------------------------------- /tests/netsync_badhost_gives_nice_error/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("pull", "nosuchhost__blahblah__asdvasoih.com", "some.pattern"), 1, false, false) 5 | -------------------------------------------------------------------------------- /contrib/command/README: -------------------------------------------------------------------------------- 1 | 2 | These are Lua scripts which implement additional Monotone commands. 3 | A script in file .lua usually implements "mtn [...]". 4 | 5 | -------------------------------------------------------------------------------- /package_full_revision.h: -------------------------------------------------------------------------------- 1 | #ifndef __PACKAGE_FULL_REVISION_H__ 2 | #define __PACKAGE_FULL_REVISION_H__ 3 | 4 | extern char const package_full_revision_constant[]; 5 | 6 | #endif 7 | -------------------------------------------------------------------------------- /tests/automate_branches/ignore_branch.lua: -------------------------------------------------------------------------------- 1 | function ignore_branch(branchname) 2 | if(branchname == "branch.to.be.ignored") then return true end 3 | return false 4 | end 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/unrelated-projects_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name 2 | mtn: warning: 1 conflict with no supported resolutions. 3 | mtn: conflict: missing root directory 4 | -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/right-leaf: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | a changed second line of the file 4 | third line of the file 5 | -------------------------------------------------------------------------------- /tests/do_not_log_the_result_of_hook_get_passphrase/hook.lua: -------------------------------------------------------------------------------- 1 | function get_passphrase(keyid) 2 | if keyid == "quux" then return "xyzzypassphrasexyzzy" end 3 | return keyid 4 | end 5 | -------------------------------------------------------------------------------- /tests/merge_manual_file/binary.lua: -------------------------------------------------------------------------------- 1 | if (attr_init_functions == nil) then attr_init_functions = {} end 2 | attr_init_functions["mtn:manual_merge"] = function(filename) return "true" end 3 | -------------------------------------------------------------------------------- /tests/merge_manual_file/text.lua: -------------------------------------------------------------------------------- 1 | if (attr_init_functions == nil) then attr_init_functions = {} end 2 | attr_init_functions["mtn:manual_merge"] = function(filename) return "false" end 3 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/unrelated-projects_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name 2 | mtn: warning: 1 conflict with no supported resolutions. 3 | mtn: conflict: missing root directory 4 | -------------------------------------------------------------------------------- /tests/test_a_merge_8/left: -------------------------------------------------------------------------------- 1 | AN INITIAL COMMON LINE 2 | A LINE FROM THE LEFT 3 | ANOTHER COMMON LINE 4 | 5 | THIS LINE EXISTS TWICE 6 | ANOTHER COMMON LINE (B) 7 | A LAST COMMON LINE 8 | -------------------------------------------------------------------------------- /tests/update_no-ops_when_no_parent_revision/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo", "blah balh") 5 | 6 | check(mtn("update", "--branch=testbranch"), 1, false, false) 7 | -------------------------------------------------------------------------------- /debian/monotone-server.TODO.Debian: -------------------------------------------------------------------------------- 1 | TODO for Debian 2 | =============== 3 | 4 | * Add logrotate hooks. 5 | 6 | -- Matthew A. Nicholson Sun, 2 Apr 2006 23:55:00 -0600 7 | -------------------------------------------------------------------------------- /tests/_--no-workspace/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | addfile("foo", "bar") 4 | check(mtn("commit", "-mx", "--no-workspace"), 1, false, false) 5 | check(mtn("commit", "-mx"), 0, false, false) -------------------------------------------------------------------------------- /tests/annotate_where_lineage_depends_on_traversal/merge.lua: -------------------------------------------------------------------------------- 1 | function merge3 (ancestor, left, right) 2 | data = "a\nb\np\nd changed in C\ne\nadded line\n" 3 | return data 4 | end 5 | -------------------------------------------------------------------------------- /tests/empty_id_completion/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- regression test: completing the revision "" doesn't crash 5 | check(mtn("cat", "-r", "", "nosuchfile"), 1, false, false) 6 | -------------------------------------------------------------------------------- /tests/rosterify_--drop-attr/manifest_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | file "testfile" 6 | content [f572d396fae9206628714fb2ce00f72e94f2258f] 7 | attr "mtn:execute" "yes" 8 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.src: -------------------------------------------------------------------------------- 1 | #include "hello.h" 2 | 3 | void say_hello() 4 | { 5 | printf("hello, world\n"); 6 | } 7 | 8 | int main() 9 | { 10 | say_hello(); 11 | } 12 | -------------------------------------------------------------------------------- /tests/rename_in_new_workspace/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | check(mtn("rename", "--bookkeep-only", "unversioned", "also-unversioned"), 1, false, false) 4 | check(mtn("status"), 0, false, false) 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_first-user: -------------------------------------------------------------------------------- 1 | mtn: content user_file 2 | mtn: possible resolutions: 3 | mtn: resolve_first interactive "file_name" 4 | mtn: resolve_first user "file_name" 5 | -------------------------------------------------------------------------------- /tests/sync_server_--exclude_foo/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- check that sync with no includes doesn't I() 5 | check(mtn("sync", "127.0.0.9:65528", "--exclude=foo"), 1, false, false) 6 | -------------------------------------------------------------------------------- /tests/automate_tags/ignore_branch.lua: -------------------------------------------------------------------------------- 1 | -- -*-lua-*- 2 | function ignore_branch(branchname) 3 | if (branchname == "otherbranch") then 4 | return true 5 | end 6 | return false 7 | end 8 | -------------------------------------------------------------------------------- /tests/disapproving_of_a_revision/badfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | an evil line which should never be seen 6 | -------------------------------------------------------------------------------- /tests/disapproving_of_a_revision/finalfile: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_merging/bothinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | -------------------------------------------------------------------------------- /tests/creating_a_fork_and_updating/bothinsert: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | -------------------------------------------------------------------------------- /tests/creating_a_good_and_bad_test_result/bad: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | third line of the file 5 | an evil line which should never be seen 6 | -------------------------------------------------------------------------------- /tests/creating_a_good_and_bad_test_result/final: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | -------------------------------------------------------------------------------- /tests/merge_update_part_of_file/twochanges: -------------------------------------------------------------------------------- 1 | if true; then 2 | true 3 | fi 4 | 5 | this 6 | is 7 | a 8 | long 9 | text 10 | used 11 | to 12 | separate 13 | two 14 | chunks 15 | 16 | line changed 17 | -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/left-leaf: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | -------------------------------------------------------------------------------- /debian/monotone.TODO.Debian: -------------------------------------------------------------------------------- 1 | TODO for Debian 2 | =============== 3 | 4 | * Link monotone dynamically with the sqlite3 shared library. 5 | 6 | -- Tomas Fasth Fri, 29 Jul 2005 13:44:35 +0000 7 | -------------------------------------------------------------------------------- /tester-tests/isolated-2/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | -- part 2: ...check that those globals have been reset 3 | check(foo == nil) 4 | mkdir("abc") 5 | check(not exists("xxx")) 6 | L("...") -- "attempt to call nil value" 7 | -------------------------------------------------------------------------------- /tests/automate_lua/test.lua: -------------------------------------------------------------------------------- 1 | -- this very simply lua function just returns all input parameters it 2 | -- receives in the right order and without any modification 3 | function echo(...) 4 | return ... 5 | end 6 | -------------------------------------------------------------------------------- /tests/merge_update_part_of_file/onechange: -------------------------------------------------------------------------------- 1 | if true; then 2 | true 3 | fi 4 | 5 | this 6 | is 7 | a 8 | long 9 | text 10 | used 11 | to 12 | separate 13 | two 14 | chunks 15 | 16 | line to be changed 17 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_first-interactive: -------------------------------------------------------------------------------- 1 | mtn: content interactive_file 2 | mtn: possible resolutions: 3 | mtn: resolve_first interactive "file_name" 4 | mtn: resolve_first user "file_name" 5 | -------------------------------------------------------------------------------- /tests/test_some_hook_helper_functions/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("testhooks")) 5 | 6 | check(raw_mtn("--rcfile=testhooks", "ls", "unknown"), 0, false, false) 7 | check(exists("outfile")) 8 | -------------------------------------------------------------------------------- /win32/tester-check-net.c: -------------------------------------------------------------------------------- 1 | /* Stub - needs implementing. See lua-testsuite.lua (very end) for rationale, 2 | and unix/tester-check-net.c for behavior to emulate. */ 3 | int main(void) 4 | { 5 | return 0; 6 | } 7 | -------------------------------------------------------------------------------- /contrib/color-logs.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ./mtn log --diffs --no-merges $@ \ 4 | | ./contrib/colorize -c contrib/color-logs.conf \ 5 | | less -r -p ----------------------------------------------------------------- 6 | -------------------------------------------------------------------------------- /examples/read-permissions: -------------------------------------------------------------------------------- 1 | comment "Read permissions go here. See the manual for proper syntax" 2 | pattern "tld.domain.branch" 3 | allow "user@domain.tld" 4 | 5 | pattern "domain.tld/branch" 6 | allow "user@domain.tld" 7 | -------------------------------------------------------------------------------- /tests/restricted_commands_are_consistent/ignore.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "1$")) then return true end 3 | if (string.find(name, "2$")) then return true end 4 | return false 5 | end 6 | -------------------------------------------------------------------------------- /tests/update_to_non-existent_rev/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | 7 | check(mtn("update", "--revision=73070030f7b0d0f3d4ee02545d45ca4bbe5e189f"), 1, false, false) 8 | -------------------------------------------------------------------------------- /tester-tests/cleanup-2/__driver__.lua: -------------------------------------------------------------------------------- 1 | -- the variables set by cleanup-1 should not have survived to this point 2 | check(t_ran == nil) 3 | check(cleanup_ran == nil) 4 | check(test.t_ran == nil) 5 | check(test.cleanup_ran == nil) 6 | -------------------------------------------------------------------------------- /tests/diff_in_a_never-committed_project/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "flagella") 5 | check(mtn("diff"), 0, true, false) 6 | check(qgrep("testfile", "stdout")) 7 | check(qgrep("flagella", "stdout")) 8 | -------------------------------------------------------------------------------- /cygwin/monotone-0.40-1.cygport: -------------------------------------------------------------------------------- 1 | DESCRIPTION="A free distributed version control system" 2 | HOMEPAGE="http://monotone.ca/" 3 | SRC_URI="http://monotone.ca/downloads/${PV}/${P}.tar.gz" 4 | 5 | CXXFLAGS+="-I/usr/include/boost-1_33_1/" 6 | -------------------------------------------------------------------------------- /tests/_--confdir_option_and_get_confdir_lua_function_work/myhooks: -------------------------------------------------------------------------------- 1 | dir = get_confdir() 2 | if string.find(dir, "fooxyzzybar$") then 3 | file = io.open(dir .. "/checkfile", "w") 4 | file:write("foobar") 5 | io.close(file) 6 | end 7 | -------------------------------------------------------------------------------- /tests/rosterify_on_a_db_with_an_empty_manifest/revision_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [ec9ef3a345b0766c1e03c47c1e22b1fe174395e7] 4 | 5 | old_revision [9a0e6637605966d7a125f7c8932bed02ee930207] 6 | 7 | delete "afile" 8 | -------------------------------------------------------------------------------- /tests/schema_migration_with_rosterify/old_revs_propagate_log: -------------------------------------------------------------------------------- 1 | propagate from branch 'testbranch2' (head c606ed519e48f526bb130fd64fef712f795f0625) 2 | to branch 'testbranch1' (head 04fe9ed6642b2e258162f948934726a3085e473f) 3 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/_MTN/options: -------------------------------------------------------------------------------- 1 | database "/twas/brillig/and/the/slithy/toves.mtn" 2 | branch "did.gyre.and.gimble.in.the.wabe" 3 | key "all.mimsy.were@the.borogoves" 4 | keydir "/and/the/mome/raths/outgrabe" 5 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/_MTN/options: -------------------------------------------------------------------------------- 1 | database "/twas/brillig/and/the/slithy/toves.mtn" 2 | branch "did.gyre.and.gimble.in.the.wabe" 3 | key "all.mimsy.were@the.borogoves" 4 | keydir "/and/the/mome/raths/outgrabe" 5 | -------------------------------------------------------------------------------- /tests/updating_to_a_given_revision/modified-left-leaf: -------------------------------------------------------------------------------- 1 | first line of the file 2 | an insertion between first and second 3 | second line of the file 4 | an insertion between second and third 5 | third line of the file 6 | a new fourth line 7 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/options: -------------------------------------------------------------------------------- 1 | database "/twas/brillig/and/the/slithy/toves.mtn" 2 | branch "did.gyre.and.gimble.in.the.wabe" 3 | key "all.mimsy.were@the.borogoves" 4 | keydir "/and/the/mome/raths/outgrabe" 5 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/options: -------------------------------------------------------------------------------- 1 | database "/twas/brillig/and/the/slithy/toves.mtn" 2 | branch "did.gyre.and.gimble.in.the.wabe" 3 | key "all.mimsy.were@the.borogoves" 4 | keydir "/and/the/mome/raths/outgrabe" 5 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/_MTN/options: -------------------------------------------------------------------------------- 1 | database "/twas/brillig/and/the/slithy/toves.mtn" 2 | branch "did.gyre.and.gimble.in.the.wabe" 3 | key "all.mimsy.were@the.borogoves" 4 | keydir "/and/the/mome/raths/outgrabe" 5 | -------------------------------------------------------------------------------- /tests/replace_file_with_dir/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("file", "file") 5 | commit() 6 | 7 | remove("file") 8 | mkdir("file") 9 | check(mtn("status"), 1, false, false) 10 | check(mtn("diff"), 1, false, false) 11 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_remaining-checkout_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name checkout_left.sh 2 | mtn: duplicate_name checkout_right.sh 3 | mtn: duplicate_name thermostat.c 4 | mtn: content interactive_file 5 | mtn: content user_file 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/directory-loop_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: directory loop created 3 | mtn: 'bar' renamed to 'foo/bar' on the right 4 | mtn: 'foo' renamed to 'bar/foo' on the left 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/directory-loop_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: directory loop created 3 | mtn: 'foo' renamed to 'bar/foo' on the right 4 | mtn: 'bar' renamed to 'foo/bar' on the left 5 | -------------------------------------------------------------------------------- /examples/000README.txt: -------------------------------------------------------------------------------- 1 | Examples directory 2 | 3 | A directory with small examples of what you can do with monotone. 4 | Could be some nice trick or a cool set of lua hooks to add to your 5 | ~/.monotone/monotonerc, or example permission files, or... 6 | -------------------------------------------------------------------------------- /tests/_--rcfile_requires_extant_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- rcfiles may contain security settings. So make it a hard error if 5 | -- the user typoes or somesuch. 6 | check(mtn("--rcfile=no-such-file", "status"), 1, false, false) 7 | -------------------------------------------------------------------------------- /tests/automate_get_revision/expected: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [407ad1469e65feae6dcecc268e129d9369b69675] 4 | 5 | old_revision [] 6 | 7 | add_dir "" 8 | 9 | add_file "foo" 10 | content [4cbd040533a2f43fc6691d773d510cda70f4126a] 11 | -------------------------------------------------------------------------------- /tests/can_execute_things/nix-cphook.lua: -------------------------------------------------------------------------------- 1 | function note_commit(new_id, certs) 2 | local pid 3 | local ret = -1 4 | pid = spawn("cp", "testfile", "testfile.copied") 5 | if (pid == -1) then 6 | return nil 7 | end 8 | ret, pid = wait(pid) 9 | end 10 | -------------------------------------------------------------------------------- /tests/merge_into_workspace/expected-manifest: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | file "otherfile" 6 | content [db19801f1850d7d85114e6c3f80d019f5bdb804a] 7 | 8 | file "testfile" 9 | content [aed28f362beb27308db048db953a985fba45d8e7] 10 | -------------------------------------------------------------------------------- /tests/_--confdir_option_and_get_confdir_lua_function_work/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("myhooks")) 5 | mkdir("fooxyzzybar") 6 | check(mtn("--confdir=fooxyzzybar", "--rcfile=myhooks", "ls", "known")) 7 | check(exists("fooxyzzybar/checkfile")) 8 | -------------------------------------------------------------------------------- /tests/can_execute_things/win-cphook.lua: -------------------------------------------------------------------------------- 1 | function note_commit(new_id, certs) 2 | local pid 3 | local ret = -1 4 | pid = spawn("xcopy", "testfile", "testfile.copied\\") 5 | if (pid == -1) then 6 | return nil 7 | end 8 | ret, pid = wait(pid) 9 | end 10 | -------------------------------------------------------------------------------- /tests/merge_update_part_of_file/original: -------------------------------------------------------------------------------- 1 | if true; then 2 | true 3 | fi 4 | 5 | if false; then 6 | false 7 | fi 8 | 9 | this 10 | is 11 | a 12 | long 13 | text 14 | used 15 | to 16 | separate 17 | two 18 | chunks 19 | 20 | line to be changed 21 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/invalid-rename_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: invalid name _MTN in root directory 3 | mtn: 'foo' pivoted to root on the left 4 | mtn: 'bad/_MTN' renamed to 'foo/_MTN' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/invalid-rename_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: invalid name _MTN in root directory 3 | mtn: 'foo' pivoted to root on the right 4 | mtn: 'bad/_MTN' renamed to 'foo/_MTN' on the left 5 | -------------------------------------------------------------------------------- /tests/spawn_pipe/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("testhooks")) 5 | 6 | check(raw_mtn("--rcfile=testhooks", "ls", "unknown"), 0, false, false) 7 | 8 | skip_if(exists("skipfile")) 9 | xfail_if(ostype == "Windows", exists("outfile")) 10 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | If you've downloaded a release, see INSTALL for installation 2 | instructions. If you've checked this out, the generated files are not 3 | included, and you must use "autoreconf --install" to create them. 4 | 5 | "make html" for docs, or read the .info file. 6 | 7 | -------------------------------------------------------------------------------- /tests/lua_function_existsonpath/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("test.lua")) 5 | check(mtn("setup", "--rcfile=test.lua", "--branch=testbranch", "subdir"), 0, true, false) 6 | check(qgrep("asdfghjkl", "stdout")) 7 | check(qgrep("qwertyuiop", "stdout")) 8 | -------------------------------------------------------------------------------- /tests/multiple_message_commit/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("a", "hello there") 5 | check(mtn("--debug", "commit", "--message", "line 1", "--message", "line 2"), 0, false, false) 6 | check(certvalue(base_revision(), "changelog") == "line 1\nline 2\n") 7 | -------------------------------------------------------------------------------- /tester-tests/remove-unwriteable/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | skip_if(not existsonpath("chmod")) 3 | 4 | mkdir("foo") 5 | writefile("foo/bar", "quux") 6 | 7 | check({"chmod", "a-w", "foo"}) 8 | check({"chmod", "a-w", "foo/bar"}) 9 | remove("foo") 10 | check(not exists("foo")) 11 | -------------------------------------------------------------------------------- /tests/_--rcfile=-/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("foo.rc")) 5 | 6 | addfile("testfile", "blah blah") 7 | check(mtn("--rcfile=-", "commit", "--message=foo", "--branch=testbranch"), 0, true, false, {"foo.rc"}) 8 | 9 | check(qgrep("BOOGA", "stdout")) 10 | -------------------------------------------------------------------------------- /tests/diff_a_binary_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("binary")) 5 | 6 | check(mtn("add", "binary"), 0, false, false) 7 | check(mtn("status"), 0, false, false) 8 | check(mtn("diff"), 0, true, false) 9 | check(not qgrep("[^[:print:]]", "stdout")) 10 | -------------------------------------------------------------------------------- /idna/idn-int.h: -------------------------------------------------------------------------------- 1 | #include "config.h" 2 | 3 | #define uint8_t TYPE_U8 4 | #define uint16_t TYPE_U16 5 | #define uint32_t TYPE_U32 6 | #define uint64_t TYPE_U64 7 | #define int8_t TYPE_S8 8 | #define int16_t TYPE_S16 9 | #define int32_t TYPE_S32 10 | #define int64_t TYPE_S64 11 | -------------------------------------------------------------------------------- /tests/automate_inventory_ignore_dirs/expected.stderr: -------------------------------------------------------------------------------- 1 | ignore_file: 'emptyhomedir': false 2 | ignore_file: 'keys': false 3 | ignore_file: 'source': false 4 | ignore_file: 'source/ignored_dir': true 5 | ignore_file: 'source/ignored_1': true 6 | ignore_file: 'source/ignored_dir': true 7 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.dst: -------------------------------------------------------------------------------- 1 | #include "hello.h" 2 | 3 | void say_hello() 4 | { 5 | printf("hello, world\n"); 6 | } 7 | 8 | int main() 9 | { 10 | say_hello(); 11 | } 12 | 13 | void say_goodbye() 14 | { 15 | printf("goodbye\n"); 16 | } 17 | 18 | -------------------------------------------------------------------------------- /tests/files_with_spaces_at_the_end/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | skip_if(ostype == "Windows") 4 | -- On Win32, the files "foo bar" and "foo bar " are the same, obviating this test 5 | 6 | writefile("foo bar ") 7 | check(mtn("add", "foo bar "), 0, false, false) 8 | commit() 9 | -------------------------------------------------------------------------------- /tester-tests/cleanup-1/__driver__.lua: -------------------------------------------------------------------------------- 1 | -- no state whatsoever is inherited across tests 2 | -- (see cleanup-2 for the other half of this test) 3 | 4 | function cleanup() 5 | cleanup_ran = true 6 | test.cleanup_ran = true 7 | end 8 | 9 | t_ran = true 10 | test.t_ran = true 11 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-names_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision 560b97068441495b17d8924f6122a1c47213a08b 3 | mtn: renamed to 'bar' on the left 4 | mtn: renamed to 'baz' on the right 5 | -------------------------------------------------------------------------------- /tests/importing_cvs_tricky_repo_with_tags/test.tags: -------------------------------------------------------------------------------- 1 | initial 7be6a094cb29307bed5bbacf40b3f3642222f413 tester@test.net 2 | portable-branch-base 32ba3f451dcf277762ca1c328043df2e2ceebc17 tester@test.net 3 | portable-branch-fork-20050601T0139 32ba3f451dcf277762ca1c328043df2e2ceebc17 tester@test.net 4 | -------------------------------------------------------------------------------- /tests/refresh_inodeprints/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | 7 | check(not exists("_MTN/inodeprints")) 8 | 9 | check(mtn("refresh_inodeprints")) 10 | check(exists("_MTN/inodeprints")) 11 | check(fsize("_MTN/inodeprints") ~= 0) 12 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-names_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision 560b97068441495b17d8924f6122a1c47213a08b 3 | mtn: renamed to 'baz' on the left 4 | mtn: renamed to 'bar' on the right 5 | -------------------------------------------------------------------------------- /tests/revert_works_with_restrictions/ignore_hook.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (string.find(name, "test_hooks.lua")) then return true end 3 | if (string.find(name, "test.db")) then return true end 4 | if (string.find(name, "%.ignore$")) then return true end 5 | return false 6 | end 7 | -------------------------------------------------------------------------------- /tests/rosterify_on_a_db_with_1_rev/manifest_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "testdir" 6 | 7 | file "testdir/otherfile" 8 | content [a5de1b65f54b120f5986028af3f83632f4c65470] 9 | 10 | file "testfile" 11 | content [c0eff70406a3aeed4a50e0772c0ee1f8919d9988] 12 | -------------------------------------------------------------------------------- /tests/automate_inventory_options/test_hooks.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | if (name == "source/ignored_1" or 3 | name == "target/ignored_1") then 4 | return true 5 | end 6 | return false 7 | end 8 | function get_passphrase(keyid) 9 | return keyid 10 | end 11 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.ud: -------------------------------------------------------------------------------- 1 | --- hello 80ad86578e12a12c838cd4ff7ca226aa6bcc44e9 2 | +++ hello 94ebfe438b30bf18631c1846b2891b818f46aa23 3 | @@ -9,3 +9,9 @@ 4 | { 5 | say_hello(); 6 | } 7 | + 8 | +void say_goodbye() 9 | +{ 10 | + printf("goodbye\n"); 11 | +} 12 | + 13 | -------------------------------------------------------------------------------- /tests/drop_a_public_key/pubkey.txt: -------------------------------------------------------------------------------- 1 | [pubkey john@doe.com] 2 | MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQCPUdR/bM41m2KIpS0eXlTG91PSWvOUdwY4 3 | 6aKd+DXZFma8Hi00Wvwmr+0JJdWqPwyxR/Dr2a2Z7Db76lUiNlhvRw3yoKP2ip9Jjfe0LReG 4 | 5aJ5u1l5L5VPiZ5iZq9PjxNDAYASpb89yBT7BJZ6OAXuE9zHFR506Apg7UB4Em184wIBEQ== 5 | [end] 6 | -------------------------------------------------------------------------------- /tests/replace_dir_with_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("dir") 5 | addfile("dir/file", "file") 6 | commit() 7 | 8 | remove("dir") 9 | writefile("dir", "this isn't a directory") 10 | 11 | check(mtn("status"), 1, false, false) 12 | check(mtn("diff"), 1, false, false) 13 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/invalid-add_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: invalid name _MTN in root directory 3 | mtn: 'foo' pivoted to root on the left 4 | mtn: 'foo/_MTN' added in revision cdf9a4171d1d386f9ecb83218a11df6c5fa75c6c on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/invalid-add_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: invalid name _MTN in root directory 3 | mtn: 'foo' pivoted to root on the right 4 | mtn: 'foo/_MTN' added in revision cdf9a4171d1d386f9ecb83218a11df6c5fa75c6c on the left 5 | -------------------------------------------------------------------------------- /contrib/README.missing: -------------------------------------------------------------------------------- 1 | Missing something that was here before? Some things may simply be 2 | deprecated because monotone itself got better, or because they moved 3 | to their own branches. Some of them are noted here. 4 | 5 | - usher Moved to its own branch, net.venge.monotone.contrib.usher 6 | -------------------------------------------------------------------------------- /tests/duplicate_key_id/bad_test_key: -------------------------------------------------------------------------------- 1 | [pubkey tester@test.net] 2 | MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC6yvo3L+AJ7AHWfcpH0CH5tGsCtm/ChgfL 3 | NM5UpMWEZSzYlVhaR5fE65dV4QujL8xTkV0FUJuDe3Omz+IArxYZpHZNQVS2inhMUt08cJxe 4 | fmP0fz3qmyMn1TZhyof6ksS4b4qt81nmjIYNFvQzupk0lq2gEqNbR8JlUMQkaQrWJQIDAQAB 5 | [end] 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/merge3_hook.lua: -------------------------------------------------------------------------------- 1 | -- show that we called the merge3 hook 2 | 3 | function merge3 (anc_path, left_path, right_path, merged_path, ancestor, left, right) 4 | io.write("running merge3 hook\n") 5 | return "interactive_file merged" 6 | end 7 | 8 | -- end of file 9 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-orphan_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision e487f26d5c464b381743e394923b7fd44b00705e 3 | mtn: renamed to 'a/foo' on the left 4 | mtn: renamed to 'b/foo' on the right 5 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.udp: -------------------------------------------------------------------------------- 1 | --- hello 80ad86578e12a12c838cd4ff7ca226aa6bcc44e9 2 | +++ hello 94ebfe438b30bf18631c1846b2891b818f46aa23 3 | @@ -9,3 +9,9 @@ int main() 4 | { 5 | say_hello(); 6 | } 7 | + 8 | +void say_goodbye() 9 | +{ 10 | + printf("goodbye\n"); 11 | +} 12 | + 13 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_propagate/propagate-2: -------------------------------------------------------------------------------- 1 | mtn: propagating beth_branch -> abe_branch 2 | mtn: [left] a74c964afba9c299c81ec404e5233ad6faffadc1 3 | mtn: [right] 1337cb1059c4bc3e376b14381b43e9383c654da1 4 | mtn: no merge necessary; putting a74c964afba9c299c81ec404e5233ad6faffadc1 in branch 'abe_branch' 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision 621e8ed86b46adcc57cd6abec90ecc41481a3e3b 3 | mtn: renamed to 'aaa' on the left 4 | mtn: renamed to 'bbb' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-duplicate-name_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision 621e8ed86b46adcc57cd6abec90ecc41481a3e3b 3 | mtn: renamed to 'bbb' on the left 4 | mtn: renamed to 'aaa' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-orphan_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for file 'foo' from revision e487f26d5c464b381743e394923b7fd44b00705e 3 | mtn: renamed to 'b/foo' on the left 4 | mtn: renamed to 'a/foo' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/orphaned-add_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: orphaned file 'foo/bar' from revision efb0fbbaad55564248c9aa2d7b8154d7aa02031a 3 | mtn: parent directory 'foo' was deleted on the right 4 | mtn: file 'foo/baz' was added on the left 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/orphaned-add_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: orphaned file 'foo/bar' from revision efb0fbbaad55564248c9aa2d7b8154d7aa02031a 3 | mtn: parent directory 'foo' was deleted on the left 4 | mtn: file 'foo/baz' was added on the right 5 | -------------------------------------------------------------------------------- /tests/attr_init_functions/hook.lua: -------------------------------------------------------------------------------- 1 | if (attr_init_functions == nil) then 2 | attr_init_functions = {} 3 | end 4 | attr_init_functions["test:test_attr"] = 5 | function(filename) 6 | if filename == "magic" then 7 | return "bob" 8 | else 9 | return nil 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/content-detached_left: -------------------------------------------------------------------------------- 1 | mtn: content bar 2 | mtn: warning: 1 conflict with no supported resolutions. 3 | mtn: conflict: multiple names for file 'foo' from revision 936159c798b9bb3f5d0f871a0dda158a844e9348 4 | mtn: renamed to 'bar' on the left 5 | mtn: renamed to 'baz' on the right 6 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/content-detached_right: -------------------------------------------------------------------------------- 1 | mtn: content baz 2 | mtn: warning: 1 conflict with no supported resolutions. 3 | mtn: conflict: multiple names for file 'foo' from revision 936159c798b9bb3f5d0f871a0dda158a844e9348 4 | mtn: renamed to 'baz' on the left 5 | mtn: renamed to 'bar' on the right 6 | -------------------------------------------------------------------------------- /tester-tests/isolated-1/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | -- functions can be redefined 3 | foo = "bar" 4 | old_L = L 5 | L = function () unlogged_mkdir("xxx") end 6 | mkdir("bar") -- calls L() 7 | L = old_L 8 | check(exists("xxx")) 9 | 10 | -- part 1: edit some globals for the next test... 11 | foo = "bar" 12 | L = nil 13 | -------------------------------------------------------------------------------- /tests/automate_get_workspace_root/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | local cwd = chdir(".") 5 | 6 | mkdir("foo") 7 | addfile("foo/bar", "text") 8 | 9 | check(indir("foo",mtn("automate", "get_workspace_root")), 0, true, false) 10 | canonicalize("stdout") 11 | check(cwd .. '\n' == readfile("stdout")) 12 | -------------------------------------------------------------------------------- /tests/diffing_a_revision_with_an_added_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo1", "foo file 1") 5 | commit() 6 | parent = base_revision() 7 | 8 | addfile("foo2", "foo file 2") 9 | commit() 10 | 11 | check(mtn("diff", "--revision", parent, "--revision", base_revision()), 0, false, false) 12 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for directory 'foo' from revision 27169065f28ccfb64678ac168b3805796bd9e5ae 3 | mtn: renamed to 'a/foo' on the left 4 | mtn: renamed to 'b/foo' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/multiple-name-plus-directory-loop_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple names for directory 'foo' from revision 27169065f28ccfb64678ac168b3805796bd9e5ae 3 | mtn: renamed to 'b/foo' on the left 4 | mtn: renamed to 'a/foo' on the right 5 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/orphaned-rename_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: orphaned file 'bar' from revision b5f52dbc0dc530adffbdd140a7de5b129cf74f29 3 | mtn: parent directory 'foo' was deleted on the right 4 | mtn: file 'foo/baz' was renamed from 'bar' on the left 5 | -------------------------------------------------------------------------------- /tests/clone_creates__MTN_log/commit_log.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | -- this used to just return the variable user_log_file, 3 | -- but now must return the original entry without the 'magic' line. 4 | -- this avoids a failing test after the 'magic line' patch 5 | return "Log Entry" 6 | end 7 | -------------------------------------------------------------------------------- /tests/db_rosterify_preserves_renames/expout: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [0ee54a587bc4465f17eaf5de2807fbd7d9f46c75] 4 | 5 | old_revision [3ee4662e91afd842e0eb0e6681db790bf8c3e627] 6 | 7 | rename "testdir_start" 8 | to "testdir_end" 9 | 10 | rename "testfile_start" 11 | to "testfile_end" 12 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/orphaned-rename_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: orphaned file 'bar' from revision b5f52dbc0dc530adffbdd140a7de5b129cf74f29 3 | mtn: parent directory 'foo' was deleted on the left 4 | mtn: file 'foo/baz' was renamed from 'bar' on the right 5 | -------------------------------------------------------------------------------- /visualc/mt-stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef _MONOTONE_MT_STDINT_H 2 | #define _MONOTONE_MT_STDINT_H 1 3 | #ifndef _GENERATED_STDINT_H 4 | #define _GENERATED_STDINT_H "monotone 0.26pre1" 5 | /* generated using gnu compiler gcc.exe (GCC) 3.4.2 (mingw-special) */ 6 | #define _STDINT_HAVE_STDINT_H 1 7 | #include 8 | #endif 9 | #endif -------------------------------------------------------------------------------- /tests/checkout_creates__MTN_log/commit_log.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | -- this used to just return the variable user_log_file, 3 | -- but now must return the original entry without the 'magic' line. 4 | -- this avoids a failing test after the 'magic line' patch 5 | return "Log Entry" 6 | end 7 | -------------------------------------------------------------------------------- /tests/user_commands/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | check(get("extra_rc")) 4 | 5 | addfile("foo", "random info\n") 6 | commit() 7 | rev_a = base_revision() 8 | 9 | check(mtn("check_head", "--rcfile=extra_rc", rev_a), 0, true, false) 10 | 11 | check(samelines("stdout", {"heads are equal", "end of command"})) 12 | -------------------------------------------------------------------------------- /tests/verification_of_command_line_options/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn(), 2, false, false) 5 | check(mtn("--norc"), 2, false, false) 6 | check(mtn("--rcfile=test_hooks.lua"), 2, false, false) 7 | 8 | check(mtn("--unknown-option"), 1, false, false) 9 | check(mtn("--rcfile"), 1, false, false) 10 | -------------------------------------------------------------------------------- /visualc/unistd.h: -------------------------------------------------------------------------------- 1 | /* 2 | * This file is part of the Mingw32 package. 3 | * 4 | * unistd.h maps (roughly) to io.h 5 | */ 6 | 7 | #ifndef _UNISTD_H 8 | #define _UNISTD_H 9 | 10 | #ifdef _MSC_VER 11 | #include 12 | #include 13 | typedef size_t ssize_t; 14 | #endif 15 | 16 | #endif /* _UNISTD_H */ 17 | -------------------------------------------------------------------------------- /tests/two_parent_workspace_annotate/expected-annotation: -------------------------------------------------------------------------------- 1 | 5e2a549855d47ce5627e826265ef016bce093539: 1 blah 2 | cb9caf566fa2b37ef60c38bd66de01092b610ffc: 2 left change 3 | 5e2a549855d47ce5627e826265ef016bce093539: 3 blah 4 | eb8fe9e2675be830f566b7c199c8ecec069a0d4c: 4 right change 5 | 5e2a549855d47ce5627e826265ef016bce093539: 5 blah 6 | -------------------------------------------------------------------------------- /unix/make_io_binary.cc: -------------------------------------------------------------------------------- 1 | // I/O is always binary on sane platforms... 2 | void make_io_binary() 3 | { 4 | } 5 | 6 | // Local Variables: 7 | // mode: C++ 8 | // fill-column: 76 9 | // c-file-style: "gnu" 10 | // indent-tabs-mode: nil 11 | // End: 12 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 13 | -------------------------------------------------------------------------------- /tests/commit_using__MTN_log/commit_log_modified_return.lua: -------------------------------------------------------------------------------- 1 | function edit_comment(summary, user_log_file) 2 | -- this used to just return the variable user_log_file, 3 | -- but now must return the original entry without the 'magic' line. 4 | -- this avoids a failing test after the 'magic line' patch 5 | return "Log Entry" 6 | end 7 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_errors/conflicts-attr-show-1: -------------------------------------------------------------------------------- 1 | mtn: warning: 1 conflict with no supported resolutions. 2 | mtn: conflict: multiple values for attribute 'foo' on file 'simple_file' from revision 30c20be14d4d18c404bc4c121bb0232c9c9b975f 3 | mtn: set to '1' on left file 'simple_file' 4 | mtn: set to '2' on right file 'simple_file' 5 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.cd: -------------------------------------------------------------------------------- 1 | *** hello 80ad86578e12a12c838cd4ff7ca226aa6bcc44e9 2 | --- hello 94ebfe438b30bf18631c1846b2891b818f46aa23 3 | *************** 4 | *** 9,11 **** 5 | --- 9,17 ---- 6 | { 7 | say_hello(); 8 | } 9 | + 10 | + void say_goodbye() 11 | + { 12 | + printf("goodbye\n"); 13 | + } 14 | + 15 | -------------------------------------------------------------------------------- /tests/test_a_merge_8/right: -------------------------------------------------------------------------------- 1 | AN INITIAL COMMON LINE 2 | ANOTHER COMMON LINE 3 | 4 | SOME STUFF FROM THE RIGHT 5 | 6 | THIS LINE EXISTS TWICE 7 | SOME MORE TEXT INSERTED BY RIGHT 8 | END OF STUFF FROM THE RIGHT 9 | 10 | THIS LINE EXISTS TWICE 11 | ANOTHER COMMON LINE (B) 12 | AN ADDITIONAL LINE FROM THE RIGHT 13 | A LAST COMMON LINE 14 | -------------------------------------------------------------------------------- /lua/lapi.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: lapi.h,v 2.2 2005/04/25 19:24:10 roberto Exp $ 3 | ** Auxiliary functions from Lua API 4 | ** See Copyright Notice in lua.h 5 | */ 6 | 7 | #ifndef lapi_h 8 | #define lapi_h 9 | 10 | 11 | #include "lobject.h" 12 | 13 | 14 | LUAI_FUNC void luaA_pushobject (lua_State *L, const TValue *o); 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /tests/CRLF_line_normalization/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("test.crlf", "a\r\nb\r\nc\r\nd\r\n") 5 | commit() 6 | 7 | writefile("test.crlf", "a\r\nb\r\nnew line!\r\nc\r\nd\r\n") 8 | 9 | check(mtn("diff"), 0, true, false) 10 | lines = 0 11 | for i in io.lines("stdout") do lines = lines + 1 end 12 | check(lines == 16) 13 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_errors/merge-old-conflicts-file: -------------------------------------------------------------------------------- 1 | mtn: 2 heads on branch 'testbranch' 2 | mtn: merge 1 / 1: 3 | mtn: calculating best pair of heads to merge next 4 | mtn: [left] 52f8049a6454895521a6a5f7d739ebfd58e72655 5 | mtn: [right] 7d425fa3827653bfc4ea9b62560ef896bb3c83ca 6 | mtn: misuse: right revision id does not match conflict file 7 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-1/_MTN/work: -------------------------------------------------------------------------------- 1 | rename "testfile2" 2 | to "renamed-testfile2" 3 | 4 | add_dir "newdir" 5 | 6 | add_file "newdir/file3" 7 | content [6cae7599afc389125f786f1d703ef2a9eea08424] 8 | 9 | clear "testfile1" 10 | attr "test:attr" 11 | 12 | set "renamed-testfile2" 13 | attr "test:attr2" 14 | value "asdf" 15 | -------------------------------------------------------------------------------- /tests/check_--log/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("input.txt", "random content") 5 | 6 | check(mtn("add", "input.txt"), 0, false, false) 7 | 8 | check(mtn("--branch=testbranch", "--log=log.log", "commit", "-m", "test"), 0, true, false) 9 | 10 | check(not qgrep('^mtn:', "stdout")) 11 | check(qgrep('^mtn:', "log.log")) 12 | -------------------------------------------------------------------------------- /tests/db_missing/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | 6 | writefile("foo/foo.db", "foo file") 7 | 8 | check(indir("foo", mtn("--db=", "ls", "keys")), 1, false, false) 9 | check(indir("foo", mtn("--db=foo.db", "ls", "keys")), 1, false, false) 10 | check(indir("foo", mtn("--db=missing.db", "ls", "keys")), 1, false, false) 11 | -------------------------------------------------------------------------------- /tests/importing_a_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("importme", "version 0 of test file\n") 5 | 6 | tsha = sha1("importme") 7 | 8 | check(mtn("add", "importme"), 0, false, false) 9 | commit() 10 | check(mtn("automate", "get_file", tsha), 0, true) 11 | canonicalize("stdout") 12 | check(samefile("importme", "stdout")) 13 | -------------------------------------------------------------------------------- /tests/netsync_over_pipes/__driver__.lua: -------------------------------------------------------------------------------- 1 | skip_if(ostype == "Windows") -- file: not supported on native Win32 2 | 3 | mtn_setup() 4 | 5 | copy("test.db", "test2.db") 6 | 7 | addfile("testfile", "foo") 8 | commit() 9 | 10 | check(mtn("sync", "file:test2.db", "testbranch"), 0, false, false) 11 | check_same_db_contents("test.db", "test2.db") 12 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-1/_MTN/work: -------------------------------------------------------------------------------- 1 | rename "testfile2" 2 | to "renamed-testfile2" 3 | 4 | add_dir "newdir" 5 | 6 | add_file "newdir/file3" 7 | content [6cae7599afc389125f786f1d703ef2a9eea08424] 8 | 9 | clear "testfile1" 10 | attr "test:attr" 11 | 12 | set "renamed-testfile2" 13 | attr "test:attr2" 14 | value "asdf" 15 | -------------------------------------------------------------------------------- /tests/workspace_migration/twoparent-2/_MTN/revision: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [0000000000000000000000000000000000000002] 4 | 5 | old_revision [c3b220202e4e554005917b1f218406b716a039b9] 6 | 7 | old_revision [db5b36ca58a34c482f57463dd04c450647d53954] 8 | 9 | set "attrfile" 10 | attr "my other car" 11 | value "made of meat" 12 | -------------------------------------------------------------------------------- /tests/diff_output_formats/hello.cdp: -------------------------------------------------------------------------------- 1 | *** hello 80ad86578e12a12c838cd4ff7ca226aa6bcc44e9 2 | --- hello 94ebfe438b30bf18631c1846b2891b818f46aa23 3 | *************** int main() 4 | *** 9,11 **** 5 | --- 9,17 ---- 6 | { 7 | say_hello(); 8 | } 9 | + 10 | + void say_goodbye() 11 | + { 12 | + printf("goodbye\n"); 13 | + } 14 | + 15 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_first-thermostat: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name thermostat.c 2 | mtn: possible resolutions: 3 | mtn: resolve_first_left drop 4 | mtn: resolve_first_left rename "name" 5 | mtn: resolve_first_left user "name" 6 | mtn: resolve_first_right drop 7 | mtn: resolve_first_right rename "name" 8 | mtn: resolve_first_right user "name" 9 | -------------------------------------------------------------------------------- /tests/setup_in_subdirectory/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- Set up a project 5 | check(mtn("setup", "--branch=testbranch", "foo"), 0, false, false) 6 | 7 | -- Then set up another project in a subdirectory without giving a database 8 | -- or branch. mtn SHOULD fail on this. 9 | check(indir("foo", safe_mtn("setup", "bar")), 1, false, false) 10 | -------------------------------------------------------------------------------- /examples/mirror.rc: -------------------------------------------------------------------------------- 1 | mirror PROJECTDOMAIN PROJECTBRANCH* 2 | 3 | postaction /etc/monotone/monotone-mirror-postaction-update.sh /etc/monotone/update.rc 4 | postaction /etc/monotone/monotone-notify.pl --db=$DATABASE '--branch=PROJECTBRANCH*' --from=PROJECT@`hostname` --difflogs-to=PROJECT-commits-diffs@PROJECTDOMAIN --nodifflogs-to=PROJECT-commits-nodiffs@PROJECTDOMAIN 5 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-unrelated-projects.stdout: -------------------------------------------------------------------------------- 1 | left [161e426c3b0c3f98d0be225f69d6f893ce8e0442] 2 | right [0e3260f51acd1e98c40666557eb6c0eefeae5f02] 3 | ancestor [] 4 | 5 | conflict missing_root 6 | 7 | conflict duplicate_name 8 | left_type "added directory" 9 | left_name "" 10 | right_type "added directory" 11 | right_name "" 12 | -------------------------------------------------------------------------------- /tests/importing_cvs_tricky_repo_with_tags/test.manifest: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "t" 6 | 7 | dir "t/libasm" 8 | 9 | file "t/libasm/ChangeLog" 10 | content [73c0eabf76cc611c33d821d203a52670b8f6265a] 11 | 12 | dir "t/libelf-po" 13 | 14 | file "t/libelf-po/POTFILES.in" 15 | content [411cfd008f4a72e433b48d6421733b6a792ca3b7] 16 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_first-checkout_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name checkout_left.sh 2 | mtn: possible resolutions: 3 | mtn: resolve_first_left drop 4 | mtn: resolve_first_left rename "name" 5 | mtn: resolve_first_left user "name" 6 | mtn: resolve_first_right drop 7 | mtn: resolve_first_right rename "name" 8 | mtn: resolve_first_right user "name" 9 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_all_resolutions/show_first-checkout_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name checkout_right.sh 2 | mtn: possible resolutions: 3 | mtn: resolve_first_left drop 4 | mtn: resolve_first_left rename "name" 5 | mtn: resolve_first_left user "name" 6 | mtn: resolve_first_right drop 7 | mtn: resolve_first_right rename "name" 8 | mtn: resolve_first_right user "name" 9 | -------------------------------------------------------------------------------- /tests/select_partial_id/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "this is just a file") 5 | commit() 6 | rev = base_revision() 7 | 8 | -- Check that automate select returns the correct id when given a partial one 9 | check(mtn("automate", "select", string.sub(rev,1,8)), 0, true, false) 10 | check(grep(rev, "stdout"), 0, false, false) 11 | -------------------------------------------------------------------------------- /indent_script: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Nico Schottelius 3 | # indents like kr with a little bit more beauty look 4 | # 13-May-2004 5 | 6 | for file in $@; do 7 | indent -nbad -bap -ts3 -nut -sc -br -ce -cdw -cli0 -nbc -brs -i3 -lp -ppi3 -di1 -c33 -cd33 -ncdb -ci3 -cp33 -cs -d0 -di0 -l75 -bbo -nfc1 -nfca -hnl -ip0 -npcs -nprs -saf -sai -saw -nsob -nss -npsl "$file" 8 | done 9 | -------------------------------------------------------------------------------- /tests/revert_moving_a_file_to_a_renamed_directory/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("file", "file") 5 | 6 | mkdir("dir") 7 | check(mtn("add", "dir"), 0, false, false) 8 | 9 | commit() 10 | 11 | check(mtn("mv", "file", "dir"), 0, false, false) 12 | check(mtn("mv", "dir", "foo"), 0, false, false) 13 | check(mtn("revert", "dir"), 0, false, false) 14 | -------------------------------------------------------------------------------- /tests/rosterify_migrates_file_dir_attrs/first_manifest_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "testdir" 6 | attr "mtn:manual_merge" "yes" 7 | 8 | file "testdir/otherfile" 9 | content [ee9e51458f4642f48efe956962058245ee7127b1] 10 | 11 | file "testfile" 12 | content [55ca6286e3e4f4fba5d0448333fa99fc5a404a73] 13 | attr "mtn:execute" "true" 14 | -------------------------------------------------------------------------------- /tests/test_a_merge_8/correct: -------------------------------------------------------------------------------- 1 | AN INITIAL COMMON LINE 2 | A LINE FROM THE LEFT 3 | ANOTHER COMMON LINE 4 | 5 | SOME STUFF FROM THE RIGHT 6 | 7 | THIS LINE EXISTS TWICE 8 | SOME MORE TEXT INSERTED BY RIGHT 9 | END OF STUFF FROM THE RIGHT 10 | 11 | THIS LINE EXISTS TWICE 12 | ANOTHER COMMON LINE (B) 13 | AN ADDITIONAL LINE FROM THE RIGHT 14 | A LAST COMMON LINE 15 | -------------------------------------------------------------------------------- /tests/diff_against_empty_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | check(get("expected.diff")) 4 | 5 | addfile("foo", "1\n2\n") 6 | commit("foo", "foo") 7 | 8 | rename("foo", "foo.away") 9 | writefile("foo") 10 | check(mtn("diff", "foo"), 0, true) 11 | canonicalize("stdout") 12 | rename("stdout", "monodiff") 13 | 14 | check(samefile("monodiff", "expected.diff")) 15 | -------------------------------------------------------------------------------- /tests/ls_unknown_of_unknown_subdir/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | mkdir("foo") 4 | writefile("foo/a", "aaa") 5 | writefile("foo/b", "bbb") 6 | 7 | check(mtn("ls", "unknown", "foo"), 0, true, false) 8 | check(grep('foo$', "stdout"), 0, false, false) 9 | check(grep('foo/a$', "stdout"), 1, false, false) 10 | check(grep('foo/b$', "stdout"), 1, false, false) 11 | 12 | -------------------------------------------------------------------------------- /tests/missing_empty_dir/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | mkdir("bar") 6 | 7 | check(mtn("add", "foo"), 0, false, true) 8 | check(mtn("add", "bar"), 0, false, true) 9 | commit() 10 | 11 | remove("foo") 12 | 13 | check(mtn("status"), 1, false, false) 14 | 15 | writefile("foo", "foo") 16 | 17 | check(mtn("status"), 1, false, false) 18 | 19 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_none/merge-1: -------------------------------------------------------------------------------- 1 | mtn: 2 heads on branch 'testbranch' 2 | mtn: merge 1 / 1: 3 | mtn: calculating best pair of heads to merge next 4 | mtn: [left] bcd098b31f9ed42acfb5ab550c973e7d8f7203fd 5 | mtn: [right] c28c3c0f5a7f9cde848be91f79d86a6dd63e88ca 6 | mtn: [merged] 7f38dd536c4f995a4a7ccd788d2b5be2755805cf 7 | mtn: note: your workspaces have not been updated 8 | -------------------------------------------------------------------------------- /tests/rosterify_migrates_file_dir_attrs/second_manifest_good: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "testdir" 6 | attr "mtn:manual_merge" "true" 7 | 8 | file "testdir/otherfile" 9 | content [ee9e51458f4642f48efe956962058245ee7127b1] 10 | 11 | file "testfile" 12 | content [55ca6286e3e4f4fba5d0448333fa99fc5a404a73] 13 | attr "mtn:execute" "yes" 14 | -------------------------------------------------------------------------------- /tests/ls_duplicates_without_duplicates/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | 7 | writefile("testfile", "foo foo") 8 | commit() 9 | 10 | addfile("testfile2", "blah blah") 11 | commit() 12 | R=base_revision() 13 | 14 | check(mtn("ls", "duplicates","-r", R), 0, true, false) 15 | check(not qgrep("testfile", "stdout")) 16 | -------------------------------------------------------------------------------- /visualc/stdint.h: -------------------------------------------------------------------------------- 1 | #ifndef STDINT_H 2 | #define STDINT_H 1 3 | 4 | typedef unsigned __int8 uint8_t; 5 | typedef unsigned __int16 uint16_t; 6 | typedef unsigned __int32 uint32_t; 7 | typedef unsigned __int64 uint64_t; 8 | 9 | typedef __int8 int8_t; 10 | typedef __int16 int16_t; 11 | typedef __int32 int32_t; 12 | typedef __int64 int64_t; 13 | 14 | #endif /* STDINT_H */ 15 | -------------------------------------------------------------------------------- /mkstemp.hh: -------------------------------------------------------------------------------- 1 | #ifndef __MKSTEMP_HH__ 2 | #define __MKSTEMP_HH__ 3 | 4 | 5 | bool 6 | monotone_mkstemp(std::string &tmpl); 7 | 8 | // Local Variables: 9 | // mode: C++ 10 | // fill-column: 76 11 | // c-file-style: "gnu" 12 | // indent-tabs-mode: nil 13 | // End: 14 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 15 | 16 | #endif // __MKSTEMP_HH__ 17 | -------------------------------------------------------------------------------- /tests/add_ignored/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("add", "test_hooks.lua"), 0, false, false) 5 | check(mtn("ls", "known"), 0, true, false) 6 | check(not qgrep("test_hooks.lua", "stdout")) 7 | check(mtn("add", "--no-respect-ignore", "test_hooks.lua"), 0, false, false) 8 | check(mtn("ls", "known"), 0, true, false) 9 | check(qgrep("test_hooks.lua", "stdout")) 10 | -------------------------------------------------------------------------------- /tests/add_unknown_ignored/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("add", "--unknown"), 0, false, false) 5 | check(mtn("ls", "known"), 0, true, false) 6 | check(not qgrep("test_hooks.lua", "stdout")) 7 | check(mtn("add", "--unknown", "--no-respect-ignore"), 0, false, false) 8 | check(mtn("ls", "known"), 0, true, false) 9 | check(qgrep("test_hooks.lua", "stdout")) 10 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-invalid-add.stdout: -------------------------------------------------------------------------------- 1 | left [507f1209e78415722129e65633a8d6a9dd6003f1] 2 | right [cdf9a4171d1d386f9ecb83218a11df6c5fa75c6c] 3 | ancestor [36e6935d3fddf349ef829125e8b6d41ea85d1db8] 4 | 5 | conflict invalid_name 6 | left_type "pivoted root" 7 | ancestor_name "foo" 8 | right_type "added directory" 9 | right_name "foo/_MTN" 10 | -------------------------------------------------------------------------------- /tests/fail_cleanly_on_unreadable__MTN_options/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | skip_if(ostype == "Windows") 3 | skip_if(string.sub(ostype, 1, 6) == "CYGWIN") 4 | skip_if(not existsonpath("chmod")) 5 | mtn_setup() 6 | 7 | check({"chmod", "a-rwx", "_MTN/"}) 8 | 9 | function cleanup() 10 | check({"chmod", "u+rwx", "_MTN/"}) 11 | end 12 | 13 | check(raw_mtn("status"), 1, false, false) 14 | -------------------------------------------------------------------------------- /tests/scanning_trees/manifest: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "foo" 6 | 7 | dir "foo/bar" 8 | 9 | file "foo/bar/testfile2" 10 | content [85d521304e3660f05bbb458b05d0efc6e981f832] 11 | 12 | file "foo/testfile1" 13 | content [14c5b672e2181377e41e6d8c5ce21457d8342667] 14 | 15 | file "testfile0" 16 | content [5c39de9ca49b3aa34fa21f5778954665d947476c] 17 | -------------------------------------------------------------------------------- /tests/test_the_approve_command/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo", "bar") 5 | commit() 6 | key = "reviewer@test.net" 7 | check(mtn("genkey", key), 0, false, false, string.rep(key.."\n", 2)) 8 | check(mtn("approve", "-k", key, base_revision()), 0, false, false) 9 | check(mtn("ls", "certs", base_revision()), 0, true, false) 10 | check(qgrep(key, "stdout")) 11 | -------------------------------------------------------------------------------- /debian/monotone-doc.postinst: -------------------------------------------------------------------------------- 1 | #! /bin/sh 2 | 3 | case "$1" in 4 | configure) 5 | # directory turned into symlink; give dpkg a hand 6 | if [ ! -L /usr/share/doc/monotone-doc ] && \ 7 | [ -e /usr/share/doc/monotone-doc ]; then 8 | rmdir /usr/share/doc/monotone-doc 9 | ln -sf monotone /usr/share/doc/monotone-doc 10 | fi 11 | esac 12 | 13 | #DEBHELPER# 14 | -------------------------------------------------------------------------------- /tests/commit_w_o__MTN_log_being_present/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | remove("_MTN/log") 5 | 6 | writefile("input.txt", "version 0 of the file") 7 | 8 | check(mtn("add", "input.txt"), 0, false, false) 9 | 10 | commit("testbranch", "Log entry") 11 | 12 | tsha = base_revision() 13 | check(mtn("ls", "certs", tsha), 0, true, false) 14 | check(qgrep('Log entry', "stdout")) 15 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_same_rev/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | addfile("bilbo", "this is bilbo's secret diary\n") 4 | commit() 5 | anc = base_revision() 6 | 7 | addfile("charlie", "this is charlie's file\n") 8 | commit() 9 | other = base_revision() 10 | 11 | -- try merging the current workspace head into the workspace 12 | check(mtn("merge_into_workspace", other), 1, nil, false) 13 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_content/update-1: -------------------------------------------------------------------------------- 1 | mtn: updating along branch 'testbranch' 2 | mtn: selected update target d18cecd65445fa5b10732c6ca8a8bbdac2a6610a 3 | mtn: [left] e9d684d80d320d181793766e43a2feb525d254f8 4 | mtn: [right] d18cecd65445fa5b10732c6ca8a8bbdac2a6610a 5 | mtn: modifying files/bar 6 | mtn: modifying files/baz 7 | mtn: updated to base revision d18cecd65445fa5b10732c6ca8a8bbdac2a6610a 8 | -------------------------------------------------------------------------------- /tests/setup_on_existing_path/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("foo", "blah blah") 5 | check(mtn("setup", "--branch=testbranch", "foo"), 1, false, false) 6 | mkdir("bar") 7 | check(mtn("setup", "--branch=testbranch", "bar"), 0, false, false) 8 | check(exists("bar/_MTN")) 9 | remove("bar/_MTN") 10 | check(indir("bar", mtn("setup", "--branch=testbranch")), 0, false, false) 11 | -------------------------------------------------------------------------------- /tests/automate_inventory_ignore_dirs/expected_2.stderr: -------------------------------------------------------------------------------- 1 | ignore_file: 'emptyhomedir': false 2 | ignore_file: 'keys': false 3 | ignore_file: 'source': false 4 | ignore_file: 'source/ignored_dir': true 5 | ignore_file: 'source/ignored_1': true 6 | ignore_file: 'source/ignored_dir/oops': true 7 | mtn: warning: 'source/ignored_dir/oops' is both known and ignored; it will be shown as 'missing'. Check .mtn-ignore. 8 | -------------------------------------------------------------------------------- /tests/commit_using__MTN_log_and_--message/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("commit_log.lua")) 5 | 6 | writefile("_MTN/log", "Log entry") 7 | 8 | writefile("input.txt", "version 0 of the file") 9 | 10 | check(mtn("add", "input.txt"), 0, false, false) 11 | 12 | check(mtn("--branch=testbranch", "--rcfile=commit_log.lua", "commit", "--message=Cause me an error"), 1, false, false) 13 | -------------------------------------------------------------------------------- /tests/importing_cvs_file_with_one_version/cvs-repository/test/foo,v: -------------------------------------------------------------------------------- 1 | head 1.1; 2 | access; 3 | symbols; 4 | locks; strict; 5 | comment @# @; 6 | 7 | 8 | 1.1 9 | date 2007.02.27.20.45.00; author markus; state Exp; 10 | branches; 11 | next ; 12 | commitid A4By316YPyhtFa8s; 13 | 14 | 15 | desc 16 | @@ 17 | 18 | 19 | 1.1 20 | log 21 | @commit 0 22 | @ 23 | text 24 | @version 0 of test file foo 25 | @ 26 | -------------------------------------------------------------------------------- /tests/importing_cvs_small_real_repo/test.manifest: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | dir "" 4 | 5 | dir "src" 6 | 7 | file "src/objdump.c" 8 | content [94c86fa749ed82d76fe8d6cce18d11b8c3f0ee38] 9 | 10 | dir "tests" 11 | 12 | file "tests/asm-tst3.c" 13 | content [01f722126e54806abfa32f867dbeb8529b79298b] 14 | 15 | file "tests/asm-tst4.c" 16 | content [7968cb0c8f62e6f15d710ce0cd42a65f7acd2567] 17 | -------------------------------------------------------------------------------- /tests/magic__MTN_in_restrictions/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | -- have to commit something, so that our restriction does not fail because it 4 | -- doesn't include the root directory. 5 | addfile("a", "some data") 6 | commit() 7 | 8 | writefile("a", "other data") 9 | 10 | check(mtn("diff", "a", "_MTN"), 0, true, true) 11 | check(not qgrep("_MTN", "stdout")) 12 | check(qgrep("_MTN", "stderr")) 13 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_none/update-1: -------------------------------------------------------------------------------- 1 | mtn: updating along branch 'testbranch' 2 | mtn: selected update target 7f38dd536c4f995a4a7ccd788d2b5be2755805cf 3 | mtn: [left] 9c1b716d160fd291ed7c68f5b6387cfbf8afb6fb 4 | mtn: [right] 7f38dd536c4f995a4a7ccd788d2b5be2755805cf 5 | mtn: modifying bar 6 | mtn: modifying baz 7 | mtn: modifying foo 8 | mtn: updated to base revision 7f38dd536c4f995a4a7ccd788d2b5be2755805cf 9 | -------------------------------------------------------------------------------- /tests/default_command_options/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("default_options.lua")) 5 | 6 | check(mtn("version", "--full"), 0, true, false) 7 | rename("stdout", "fullversion") 8 | 9 | check(mtn("version", "--rcfile=default_options.lua"), 0, true, false) 10 | check(samefile("stdout", "fullversion")) 11 | 12 | check(mtn("status", "--rcfile=default_options.lua"), 1, false, false) 13 | 14 | -------------------------------------------------------------------------------- /tests/importing_cvs_file_with_one_version/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- See makerepo.sh on how this repository was created. 5 | check(get("cvs-repository")) 6 | 7 | 8 | writefile("foo", "version 0 of test file foo\n") 9 | tsha = sha1("foo") 10 | 11 | check(mtn("--branch=testbranch", "cvs_import", "cvs-repository"), 0, false, false) 12 | check(mtn("automate", "get_file", tsha), 0, false) 13 | -------------------------------------------------------------------------------- /botan/botan.h: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Botan Core Interface Header File * 3 | * (C) 1999-2007 Jack Lloyd * 4 | *************************************************/ 5 | 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | -------------------------------------------------------------------------------- /tests/add_and_then_drop_file_does_nothing/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("maude", "the file maude\n") 5 | check(mtn("drop", "maude"), 0, false, false) 6 | check(mtn("status"), 0, true) 7 | check(not qgrep("_file", "stdout")) 8 | 9 | addfile("liver", "the file liver\n") 10 | check(mtn("drop", "liver"), 0, false, false) 11 | check(mtn("status"), 0, true) 12 | check(not qgrep("_file", "stdout")) 13 | -------------------------------------------------------------------------------- /tests/automate_interface_version/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("automate", "interface_version"), 0, true, false) 5 | rename("stdout", "a_v") 6 | 7 | -- MinGW's wc produces " 1" as output. Arithmetic comparison works, string comparison doesn't 8 | check(numlines("a_v") == 1) 9 | -- This is really ^[0-9]+\.[0-9]+$, but m4 is obfuscatory. 10 | check(qgrep("^[0-9]+\.[0-9]+$", "a_v")) 11 | -------------------------------------------------------------------------------- /tests/db_rosterify_twice_gives_an_error_second_time/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | remove("test.db") 5 | 6 | check(get("test.db.dumped", "stdin")) 7 | check(mtn("db", "load"), 0, false, false, true) 8 | check(mtn("db", "migrate"), 0, false, false) 9 | 10 | check(mtn("db", "rosterify"), 0, false, false) 11 | 12 | check(mtn("db", "rosterify"), 1, false, true) 13 | check(qgrep("already", "stderr")) 14 | -------------------------------------------------------------------------------- /tests/drop_root/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- We should not allow dropping the root, no matter how 5 | -- we refer to it. Test that via "." in the root itself.. 6 | 7 | check(mtn("drop", "."), 1, false, false) 8 | 9 | -- ..or from a subdirectory via ".." 10 | 11 | mkdir("dir") 12 | check(mtn("add", "dir"), 0, false, false) 13 | check(indir("dir", mtn("drop", "..", "--recursive")), 1, false, false) 14 | -------------------------------------------------------------------------------- /tests/rename_with_actual_file_rename/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("file0", "file 0") 5 | addfile("file1", "file 1") 6 | 7 | check(mtn("rename", "--bookkeep-only", "file0", "newfile0"), 0, false, false) 8 | check(mtn("rename", "file1", "newfile1"), 0, false, false) 9 | 10 | check(exists("file0")) 11 | check(not exists("file1")) 12 | check(not exists("newfile0")) 13 | check(exists("newfile1")) 14 | -------------------------------------------------------------------------------- /tests/ssh_agent/id_rsa.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAr91dkMqLe+wiLLT3kOEel0KJJE6QN/1IoaIC7bbegNMiQ8+1mXF7j2kvHEAh3hTv3pjdo4sa3JuZPB8pcFNMYqQ1vC8u53nXkWGBFfw4D/EuMgfVdAxKR4IH+AAgkrcpfaZC9FBzweiPPExnXPh4ZOcQ9nhCDZfPYgjqfu+XkXCMg7F9gmgnTaw37NyVXbEvBSKx17B2ghJJLhLfV0l/hrfpPRnRWATmeAPGCYrVP477USYcDOZfk1MY6TBj0qrI5XMSsZtAo5ixZFtGtCiNkrr0q2o6GKfld5G95b64yjtuVpwb/3ie1uVMg2QwxNdgaI5gTME95shmgkUBFceSCQ== papercrane@rrlrrll 2 | -------------------------------------------------------------------------------- /tests/ssh_agent/id_rsa2.pub: -------------------------------------------------------------------------------- 1 | ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArqH2mkRNgM4tBMiRsNOO/UcfSXPiQllPHZXFaK8hCYu/inpZyYAN+9sOLWfq+eo2GTU0es3MeNddtOgOe+r5lIp0OJqw60lIRiNwlFdpFyRao7SFhwQSjVxITReEt4TxshdAy7/v8zTdrLzsf7ggVZ26Nab2Fu3t9A8ijqNQu6E/JpUfCeUzCRMYIAV66a+adVDEQdbxsWCjyf98EPqNtc+y1WjjJogCCn27KWdk0GFgnNq6PHVUalOS3rcifAtq4//9ozaFZIyeDn9PmaLUo9q4O21Y2I4HdeQiFMwJCwSGCkwXWg2bs27ep2Q5YhDuANMx8b7NygUNkbdR04stcQ== papercrane@rrlrrll 2 | -------------------------------------------------------------------------------- /tests/invalid__MTN_options/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | check(mtn("st"), 0, false, false) 4 | 5 | writefile("_MTN/options", 'database "test.db"\nbranch "x"\n') 6 | check(mtn("st"), 0, false, false) 7 | 8 | writefile("_MTN/options", 'database "test.db\nbranch "x"\n') 9 | check(mtn("st"), 1, false, false) 10 | 11 | writefile("_MTN/options", 'database "test.db\nbranch "0"\n') 12 | check(mtn("st"), 1, false, false) 13 | -------------------------------------------------------------------------------- /tests/checkout_in_windows_root/__driver__.lua: -------------------------------------------------------------------------------- 1 | -- mtn 0.4 had problems when checking out into the Windows root directory 2 | 3 | skip_if(ostype ~= "Windows") 4 | 5 | mtn_setup() 6 | 7 | addfile("testfile", "foo") 8 | commit() 9 | 10 | root = os.tmpname() 11 | check(indir(os.getenv("HOMEDRIVE").."/", mtn_outside_ws("--branch=testbranch", "checkout", root)), 0, false, nil) 12 | remove(root) 13 | 14 | -- end of file 15 | 16 | -------------------------------------------------------------------------------- /tests/common/selectors.lua: -------------------------------------------------------------------------------- 1 | function selmap(sel, revs, sort) 2 | check(raw_mtn("automate", "select", sel), 0, true, false) 3 | if sort ~= false then table.sort(revs) end 4 | check(samelines("stdout", revs)) 5 | end 6 | 7 | function selmap_xfail(sel, revs, sort) 8 | check(raw_mtn("automate", "select", sel), 0, true, false) 9 | if sort ~= false then table.sort(revs) end 10 | xfail(samelines("stdout", revs)) 11 | end 12 | -------------------------------------------------------------------------------- /tests/default_command_options/default_options.lua: -------------------------------------------------------------------------------- 1 | 2 | function get_default_command_options(command) 3 | local default_opts = {} 4 | if (command[1] == "version") then 5 | table.insert(default_opts, "--full") 6 | end 7 | -- should trigger an invalid option error 8 | if (command[1] == "status") then 9 | table.insert(default_opts, "--foobarbaz") 10 | end 11 | return default_opts 12 | end 13 | -------------------------------------------------------------------------------- /tests/automate_commands_are_not_completed/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- No completion 5 | check(mtn("automate", "leaves"), 0, false, false) 6 | 7 | -- Complete subcommand 8 | check(mtn("automate", "lea"), 1, false, false) 9 | 10 | -- Complete "automate" 11 | check(mtn("automat", "leaves"), 1, false, false) 12 | 13 | -- Alias for people who like using automate manually 14 | check(mtn("au", "leaves"), 0, false, false) 15 | -------------------------------------------------------------------------------- /tests/merge_into_workspace_files_added/expected-revision: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [1ad9c86d349f3f4af96ddd1147f6da0e3d52a234] 4 | 5 | old_revision [a140446fe05fa24bd367c57ea9b572dc264188cb] 6 | 7 | add_file "left" 8 | content [0ffe36a4ca2169de7543a67f92134ea93636b246] 9 | 10 | old_revision [c77393b91d1abd3f4306465ca468b2f87494c910] 11 | 12 | add_file "right" 13 | content [7478fc33b2476515959ea9be9306295a36a22d64] 14 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-directory-loop.stdout: -------------------------------------------------------------------------------- 1 | left [be04cb44902df12f3b36bf0efabba784547ccd34] 2 | right [7cd48d9599eee2a67e8c510112659c0d313fb1df] 3 | ancestor [08ccbb14523a09d342568ce27a1b9f631d42aa9c] 4 | 5 | conflict directory_loop 6 | left_type "renamed directory" 7 | ancestor_name "foo" 8 | left_name "bar/foo" 9 | right_type "renamed directory" 10 | ancestor_name "bar" 11 | right_name "foo/bar" 12 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-orphaned-add.stdout: -------------------------------------------------------------------------------- 1 | left [140a1d712e5e7368dc88766144e0975746f27b9a] 2 | right [872259407b5e1445c6b463768243ddaf531bd73a] 3 | ancestor [cce148761e33b0abbaa1c072ee913dcc23d7bfc3] 4 | 5 | conflict orphaned_file 6 | right_type "deleted directory" 7 | ancestor_name "foo" 8 | left_type "added file" 9 | left_name "foo/baz" 10 | left_file_id [f5122a7f896cb2dd7ecaa84be89c94ab09c15101] 11 | -------------------------------------------------------------------------------- /tests/commit_validation_lua_hook/commit_validate.lua: -------------------------------------------------------------------------------- 1 | function validate_commit_message(message, info, branchname) 2 | if (not string.find(info, "input.txt")) then 3 | return false, "Wrong info message" 4 | end 5 | if (message == "denyme\n") then 6 | return false, "input.txt" 7 | end 8 | if (not string.find(branchname, "testbranch")) then 9 | return false, "Wrong branch name" 10 | end 11 | return true, "" 12 | end 13 | -------------------------------------------------------------------------------- /tests/drop_a_public_key/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("pubkey.txt", "stdin")) 5 | 6 | check(mtn("read"), 0, false, false, true) 7 | 8 | check(mtn("pubkey", "john@doe.com"), 0, true, false) 9 | 10 | check(qgrep('john@doe.com', "stdout")) 11 | 12 | check(mtn("dropkey", "john@doe.com"), 0, false, false) 13 | 14 | check(mtn("pubkey", "john@doe.com"), 1, false, true) 15 | 16 | check(qgrep('does not exist', "stderr")) 17 | -------------------------------------------------------------------------------- /tests/p_selector/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("common/selectors.lua") 3 | mtn_setup() 4 | 5 | addfile("testfile", "blah blah") 6 | commit() 7 | REV1=base_revision() 8 | 9 | writefile("testfile", "stuff stuff") 10 | commit() 11 | REV2=base_revision() 12 | 13 | -- empty parent selector 14 | selmap("p:", {REV1}) 15 | -- standard selection 16 | selmap("p:" .. REV2, {REV1}) 17 | -- parent of a root revision 18 | selmap("p:" .. REV1, {}) 19 | 20 | -------------------------------------------------------------------------------- /tests/diff_restriction_renamed_parent/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | mkdir("parent1") 4 | addfile("parent1/file1", "something") 5 | commit() 6 | orig = base_revision() 7 | 8 | -- rename the parent 9 | check(mtn("rename", "parent1", "parent2"), 0, true, true) 10 | commit() 11 | 12 | -- alter the file 13 | writefile("parent2/file1", "something else") 14 | commit() 15 | 16 | xfail(mtn("diff", "-r", orig, "parent2/file1"), 0, true, true) 17 | -------------------------------------------------------------------------------- /tests/disapproving_with_message/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "foo") 5 | commit() 6 | 7 | writefile("testfile", "bar") 8 | commit() 9 | r_sha = base_revision() 10 | 11 | check(mtn("disapprove","-m","line1","-m","line2", r_sha), 0, false, false) 12 | check(mtn("update"), 0, false, false) 13 | check(mtn("log","--last=1"), 0, true, false) 14 | 15 | check(qgrep("line1","stdout")) 16 | check(qgrep("line2","stdout")) 17 | -------------------------------------------------------------------------------- /tests/log_--diffs/expect_restrict: -------------------------------------------------------------------------------- 1 | --- foo 5527e63e7193ef5fadbc8fd40cc8092d742602e7 2 | +++ foo2 6d0789008812dd091f3e0c97d6606bf427cf82e4 3 | --- quux f3d9ae4aeea6946a8668445395ba10b7399523a0 4 | +++ quux f3d9ae4aeea6946a8668445395ba10b7399523a0 5 | --- foo f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 6 | +++ foo 5527e63e7193ef5fadbc8fd40cc8092d742602e7 7 | --- foo f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 8 | +++ foo f1d2d2f924e986ac86fdf7b36c94bcdf32beec15 9 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/missing-root_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 2 conflicts with no supported resolutions. 2 | mtn: conflict: missing root directory 3 | mtn: directory 'foo' pivoted to root on the left 4 | mtn: directory 'foo' deleted on the right 5 | mtn: conflict: orphaned directory '' from revision ead03530f5fefe50c9010157c42c0ebe18086559 6 | mtn: parent directory '' was deleted on the right 7 | mtn: directory 'bar' was renamed from '' on the left 8 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/missing-root_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 2 conflicts with no supported resolutions. 2 | mtn: conflict: missing root directory 3 | mtn: directory 'foo' deleted on the left 4 | mtn: directory 'foo' pivoted to root on the right 5 | mtn: conflict: orphaned directory '' from revision ead03530f5fefe50c9010157c42c0ebe18086559 6 | mtn: parent directory '' was deleted on the left 7 | mtn: directory 'bar' was renamed from '' on the right 8 | -------------------------------------------------------------------------------- /tests/log_--last=N_FILENAME/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo", "foo") 5 | commit("testbranch", "Addition of foo.") 6 | 7 | addfile("bar", "bar") 8 | commit("testbranch", "Addition of bar.") 9 | 10 | addfile("baz", "baz") 11 | commit("testbranch", "Addition of baz.") 12 | 13 | check(mtn("log", "--last=1", "foo"), 0, true, false) 14 | check(grep("^[\\| ]+Revision:", "stdout"), 0, true, false) 15 | check(numlines("stdout") == 1) 16 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-multiple-name-plus-directory-loop.stdout: -------------------------------------------------------------------------------- 1 | left [4e25e44deef167f640248e542916736b649e3044] 2 | right [0b37ed4689ee191cdd4bd26e5233511329b17032] 3 | ancestor [27169065f28ccfb64678ac168b3805796bd9e5ae] 4 | 5 | conflict multiple_names 6 | left_type "renamed directory" 7 | ancestor_name "foo" 8 | left_name "a/foo" 9 | right_type "renamed directory" 10 | ancestor_name "foo" 11 | right_name "b/foo" 12 | -------------------------------------------------------------------------------- /tests/diff_against_empty_file/expected.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [010297e01bc32090e5a7de8f5bd1c4c69d72f532] 3 | # 4 | # patch "foo" 5 | # from [83f5a5c359f3dc8317519240e32f1f51f68bc051] 6 | # to [da39a3ee5e6b4b0d3255bfef95601890afd80709] 7 | # 8 | ============================================================ 9 | --- foo 83f5a5c359f3dc8317519240e32f1f51f68bc051 10 | +++ foo da39a3ee5e6b4b0d3255bfef95601890afd80709 11 | @@ -1,2 +0,0 @@ 12 | -1 13 | -2 14 | -------------------------------------------------------------------------------- /tests/first_extent_normalization_pass/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("left")) 5 | check(get("right")) 6 | 7 | copy("left", "stdin") 8 | check(mtn("fload"), 0, false, false, true) 9 | copy("right", "stdin") 10 | check(mtn("fload"), 0, false, false, true) 11 | left = sha1("left") 12 | right = sha1("right") 13 | check(mtn("fmerge", left, left, right), 0, true, false) 14 | canonicalize("stdout") 15 | check(samefile("right", "stdout")) 16 | -------------------------------------------------------------------------------- /tests/ls_tags_with_ambiguous_tags/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | R1=base_revision() 7 | 8 | writefile("testfile", "foo foo") 9 | commit() 10 | R2=base_revision() 11 | 12 | check(mtn("tag", R1, "ambig_tag"), 0, false, false) 13 | check(mtn("tag", R2, "ambig_tag"), 0, false, false) 14 | 15 | check(mtn("ls", "tags"), 0, true, false) 16 | check(qgrep(R1, "stdout")) 17 | check(qgrep(R2, "stdout")) 18 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_propagate/propagate-1: -------------------------------------------------------------------------------- 1 | mtn: propagating abe_branch -> beth_branch 2 | mtn: [left] 1337cb1059c4bc3e376b14381b43e9383c654da1 3 | mtn: [right] d5f1dd136c86b5bbd5e71b0c3365667e328af492 4 | mtn: dropping checkout.sh 5 | mtn: replacing content of checkout.sh with checkout.sh 6 | mtn: renaming thermostat.c to thermostat-westinghouse.c 7 | mtn: renaming thermostat.c to thermostat-honeywell.c 8 | mtn: [merged] a74c964afba9c299c81ec404e5233ad6faffadc1 9 | -------------------------------------------------------------------------------- /tests/delete_work_file_on_checkout/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile0", "version 0 of first test file\n") 5 | writefile("testfile1", "version 1 of second test file\n") 6 | commit() 7 | v1 = base_revision() 8 | addfile("testfile1") 9 | check(qgrep("add_file","_MTN/revision")) 10 | remove("_MTN") 11 | remove("testfile0") 12 | check(mtn("checkout", "--revision", v1, "."), 0, false, false) 13 | check(not qgrep("add_file","_MTN/revision")) 14 | -------------------------------------------------------------------------------- /tests/creating_a_bad_criss-cross_merge/bob.lua: -------------------------------------------------------------------------------- 1 | function merge3(anc_path, left_path, right_path, merged_path, ancestor, left, right) 2 | return left 3 | end 4 | 5 | function get_passphrase(key) return "bob" end 6 | 7 | function get_author(branch) return "bob" end 8 | 9 | function get_revision_cert_trust(signers, id, name, val) 10 | for k,v in pairs(signers) do 11 | if (v ~= "alice") then return true end 12 | end 13 | return false 14 | end 15 | -------------------------------------------------------------------------------- /tests/fail_cleanly_when__MTN_format_corrupt/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | addfile("foo", "blah blah") 4 | commit() 5 | 6 | remove("_MTN/format") 7 | check(raw_mtn("status"), 1, false, false) 8 | 9 | writefile("_MTN/format", "") 10 | check(raw_mtn("status"), 1, false, false) 11 | 12 | writefile("_MTN/format", "asdf") 13 | check(raw_mtn("status"), 1, false, false) 14 | 15 | writefile("_MTN/format", "1 2 3") 16 | check(raw_mtn("status"), 1, false, false) 17 | -------------------------------------------------------------------------------- /tests/update_updates_inodeprints/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | r0 = base_revision() 7 | 8 | writefile("testfile", "stuff stuff") 9 | commit() 10 | r1 = base_revision() 11 | 12 | check(mtn("checkout", "--branch=testbranch", "--revision", r0, "td"), 0, false, true) 13 | writefile("td/_MTN/inodeprints") 14 | check(indir("td", mtn("update")), 0, false, false) 15 | check(fsize("td/_MTN/inodeprints") ~= 0) 16 | -------------------------------------------------------------------------------- /tests/creating_a_bad_criss-cross_merge/alice.lua: -------------------------------------------------------------------------------- 1 | function merge3(anc_path, left_path, right_path, merged_path, ancestor, left, right) 2 | return right 3 | end 4 | 5 | function get_passphrase(key) return "alice" end 6 | 7 | function get_author(branch) return "alice" end 8 | 9 | function get_revision_cert_trust(signers, id, name, val) 10 | for k,v in pairs(signers) do 11 | if (v ~= "bob") then return true end 12 | end 13 | return false 14 | end 15 | -------------------------------------------------------------------------------- /tests/importing_cvs_small_real_repo/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("test.manifest")) 5 | 6 | check(get("cvs-repository")) 7 | 8 | check(mtn("--branch=foo.bar", "cvs_import", "cvs-repository"), 0, false, false) 9 | check(mtn("--branch=foo.bar.disasm-branch", "checkout"), 0, true, true) 10 | check(indir("foo.bar.disasm-branch", mtn("automate", "get_manifest_of")), 0, true) 11 | canonicalize("stdout") 12 | check(samefile("test.manifest", "stdout")) 13 | -------------------------------------------------------------------------------- /tests/syntax_errors_in_.mtn-ignore/mtn-ignore: -------------------------------------------------------------------------------- 1 | ^ignoreme$ 2 | \ 3 | \c 4 | x{3,1} 5 | x{99999} 6 | [abc 7 | [z-a] 8 | * 9 | (?h) 10 | [:alpha:] 11 | (abc 12 | abc\3 13 | (?#abc 14 | ) 15 | (?x) 31 | (?P) 32 | \777 33 | ^ignoremetoo$ 34 | -------------------------------------------------------------------------------- /tests/attr_set_attr_get/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "foo bar") 5 | check(mtn("attr", "set", "testfile", "test:unique_key", "unique_value"), 0, false, false) 6 | check(mtn("attr", "get", "testfile"), 0, true, false) 7 | check(qgrep("test:unique_key", "stdout")) 8 | check(qgrep("unique_value", "stdout")) 9 | check(mtn("attr", "get", "testfile", "test:unique_key"), 0, true, false) 10 | check(qgrep("unique_value", "stdout")) 11 | 12 | commit() 13 | -------------------------------------------------------------------------------- /tests/drop_removes_attributes/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "foo bar") 5 | check(mtn("attr", "set", "testfile", "some_key", "some_value"), 0, false, false) 6 | check(mtn("attr", "get", "testfile"), 0, true, false) 7 | check(qgrep("some_key", "stdout")) 8 | check(qgrep("some_value", "stdout")) 9 | 10 | commit() 11 | 12 | check(mtn("drop", "--bookkeep-only", "testfile"), 0, false, false) 13 | check(mtn("attr", "get", "testfile"), 1, true, false) 14 | -------------------------------------------------------------------------------- /tests/pull_a_netsync_branch_which_has_a_parent_from_another_branch/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("/common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | addfile("testfile", "blah stuff") 7 | commit() 8 | ver0 = base_revision() 9 | 10 | addfile("testfile2", "some more data") 11 | commit("otherbranch") 12 | ver1 = base_revision() 13 | 14 | netsync.pull("otherbranch") 15 | 16 | check_same_stdout(mtn("ls", "certs", ver1), 17 | mtn2("ls", "certs", ver1)) 18 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_left: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name 2 | mtn: warning: 2 conflicts with no supported resolutions. 3 | mtn: conflict: missing root directory 4 | mtn: directory 'foo' pivoted to root on the left 5 | mtn: directory 'bar' pivoted to root on the right 6 | mtn: conflict: multiple names for directory '' from revision 5bc669f00cf90b76dd38077827565b624d823756 7 | mtn: renamed to 'aaa' on the left 8 | mtn: renamed to 'bbb' on the right 9 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/duplicate-name-multiple-name-missing-root_right: -------------------------------------------------------------------------------- 1 | mtn: duplicate_name 2 | mtn: warning: 2 conflicts with no supported resolutions. 3 | mtn: conflict: missing root directory 4 | mtn: directory 'bar' pivoted to root on the left 5 | mtn: directory 'foo' pivoted to root on the right 6 | mtn: conflict: multiple names for directory '' from revision 5bc669f00cf90b76dd38077827565b624d823756 7 | mtn: renamed to 'bbb' on the left 8 | mtn: renamed to 'aaa' on the right 9 | -------------------------------------------------------------------------------- /tests/_MTN_revision_is_required/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo", "blah blah") 5 | addfile("bar", "blah blah") 6 | remove("foo") 7 | check(mtn("ls", "missing"), 0, false, false) 8 | check(mtn("drop", "--bookkeep-only", "foo"), 0, false, false) 9 | check(mtn("ls", "missing"), 0, false, false) 10 | commit() 11 | 12 | remove("bar") 13 | check(mtn("ls", "missing"), 0, false, false) 14 | 15 | remove("_MTN/revision") 16 | check(mtn("ls", "missing"), 1, false, false) 17 | -------------------------------------------------------------------------------- /tests/lua_function_existsonpath/test.lua: -------------------------------------------------------------------------------- 1 | -- Need a way to break into the lua interpreter; our strategy is to 2 | -- redefine the use_inodeprints function to run our code, and then 3 | -- create a new workspace. 4 | 5 | function use_inodeprints() 6 | if (existsonpath("ls") == 0 or existsonpath("xcopy") == 0) then 7 | io.write("asdfghjkl\n") 8 | end 9 | if (existsonpath("weaohriosfaoisd") ~= 0) then 10 | io.write("qwertyuiop\n") 11 | end 12 | return false 13 | end 14 | -------------------------------------------------------------------------------- /i18n.h: -------------------------------------------------------------------------------- 1 | #ifndef __I18N_H__ 2 | #define __I18N_H__ 3 | 4 | // copyright (C) 2005 nathaniel smith 5 | // all rights reserved. 6 | // licensed to the public under the terms of the GNU GPL (>= 2) 7 | // see the file COPYING for details 8 | 9 | // monotone-specific i18n goo 10 | // include this instead of gettext.h 11 | 12 | #include "gettext.h" 13 | 14 | #define _(str) gettext(str) 15 | #define N_(str) gettext_noop(str) 16 | 17 | void localize_monotone(); 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /tests/importing_cvs_file_dead_on_head_and_branch/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("cvs-repository")) 5 | 6 | -- the contents from which we created the test module 7 | writefile("cvsfile", "this is a line of text.\n") 8 | 9 | tsha = sha1("cvsfile") 10 | 11 | -- import into monotone and check presence of files 12 | 13 | check(mtn("--branch=testbranch", "cvs_import", "cvs-repository/test"), 0, false, false) 14 | 15 | check(mtn("automate", "get_file", tsha), 0, false) 16 | -------------------------------------------------------------------------------- /tests/restrictions_when_pwd_is_mixed_case/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- This is trivial on case-sensitive filesystems, but a little trickier 5 | -- on case-preserving ones. 6 | 7 | mkdir("FooBar") 8 | addfile("FooBar/testfile", "blah blah") 9 | commit() 10 | 11 | writefile("FooBar/testfile", "stuff stuff") 12 | 13 | check(indir("FooBar", mtn("commit", ".", "-mfoo")), 0, false, false) 14 | 15 | check(mtn("diff"), 0, true, false) 16 | check(qgrep("no changes", "stdout")) 17 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-duplicate-adds.stdout: -------------------------------------------------------------------------------- 1 | left [36e62406e9792ad64f7af73c5192d2e4e53306c8] 2 | right [2b96f8e6ed2bb566c22ebcbdd06d34d1043c237f] 3 | ancestor [56cafb3485be6d40923bacaddcd19cde63433028] 4 | 5 | conflict duplicate_name 6 | left_type "added file" 7 | left_name "bar" 8 | left_file_id [ba4637112ee3e55a6106d647d6c4e04a6643f8eb] 9 | right_type "added file" 10 | right_name "bar" 11 | right_file_id [fe6d523f607e2f2fc0f0defad3bda0351a95a337] 12 | -------------------------------------------------------------------------------- /tests/branch-based_checkout/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("foo.testbranch", "this is the testbranch version") 5 | writefile("foo.otherbranch", "this version goes in otherbranch") 6 | 7 | copy("foo.testbranch", "foo") 8 | check(mtn("add", "foo"), 0, false, false) 9 | commit() 10 | 11 | copy("foo.otherbranch", "foo") 12 | commit("otherbranch") 13 | 14 | check(mtn("--branch=testbranch", "checkout"), 0, false, false) 15 | check(samefile("testbranch/foo", "foo.testbranch")) 16 | -------------------------------------------------------------------------------- /tests/failed_checkout_is_a_no-op/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- If a checkout fails, no target directory should be created, and if 5 | -- the checkout directory already exists, no _MTN/ directory should be 6 | -- created. 7 | 8 | check(mtn("checkout", "--revision=bogus-id", "outdir"), 1, false, false) 9 | check(not exists("outdir")) 10 | mkdir("outdir") 11 | check(indir("outdir", mtn("checkout", "--revision=bogus-id", ".")), 1, false, false) 12 | check(not exists("outdir/_MTN")) 13 | -------------------------------------------------------------------------------- /debian/monotone-server.monotone.default: -------------------------------------------------------------------------------- 1 | # init.d config file for monotone 2 | 3 | # this must be set to 1 for monotone to start 4 | START=0 5 | 6 | # the address and or port (ADDRESS[:PORT]) monotone should listen on 7 | #ADDRESS=0.0.0.0 8 | 9 | # the database to use 10 | #MTN_DB=/var/lib/monotone/default.mtn 11 | 12 | # Various other options, don't touch unless you know what you are doing. 13 | #MTN_HOME=/var/lib/monotone 14 | #MTN_CONFDIR=/etc/monotone 15 | #MTN_KEYDIR=$MTN_HOME/keys 16 | 17 | -------------------------------------------------------------------------------- /do-editor-vars.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | for file in $(ls *cc *hh unix/*cc unix/*hh win32/*cc win32/*hh 2>/dev/null | sort); do 4 | if ! grep -q 'Local Variables' $file; then 5 | echo "Adding vars block to $file" 6 | cat <> $file 7 | 8 | 9 | // Local Variables: 10 | // mode: C++ 11 | // fill-column: 76 12 | // c-file-style: "gnu" 13 | // indent-tabs-mode: nil 14 | // End: 15 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 16 | 17 | EOF 18 | fi; 19 | done 20 | -------------------------------------------------------------------------------- /tests/mtn_up/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- People expect 'mtn up' to run update. 5 | -- Make sure it does. 6 | 7 | addfile("testfile", "blah blah") 8 | commit() 9 | rev0 = base_revision() 10 | 11 | writefile("testfile", "other stuff") 12 | commit() 13 | rev1 = base_revision() 14 | 15 | check(mtn("checkout", "--branch=testbranch", "--revision", rev0, "codir"), 0, false, false) 16 | check(indir("codir", mtn("up")), 0, false, false) 17 | check(samefile("testfile", "codir/testfile")) 18 | -------------------------------------------------------------------------------- /tests/(minor)_update_cleans_emptied_directories/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("testdir") 5 | addfile("testdir/foo", "blah blah blah") 6 | commit() 7 | base = base_revision() 8 | 9 | remove("testdir") 10 | check(mtn("drop", "--bookkeep-only", "testdir/foo", "testdir"), 0, false, false) 11 | commit() 12 | 13 | revert_to(base) 14 | 15 | check(exists("testdir")) 16 | check(mtn("update"), 0, false, false) 17 | 18 | check(base ~= base_revision()) 19 | 20 | check(not exists("testdir")) 21 | -------------------------------------------------------------------------------- /tests/keydir_defaults_to_under_confdir/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | mkdir("foo/keys") 6 | 7 | check(raw_mtn("ls", "keys", "--confdir=foo", "--keydir=foo/keys"), 0, true, false) 8 | 9 | copy("stdout", "good") 10 | 11 | check(raw_mtn("ls", "keys", "--confdir=foo"), 0, {"good"}, false) 12 | 13 | check(raw_mtn("ls", "keys", "--keydir=foo/keys", "--confdir=."), 0, {"good"}, false) 14 | 15 | check(raw_mtn("ls", "keys", "--confdir=.", "--keydir=foo/keys"), 0, {"good"}, false) 16 | -------------------------------------------------------------------------------- /tests/merge_with_conflicting_name_and_renamed_dir/expected.stdout: -------------------------------------------------------------------------------- 1 | left [3e5ae9c2084d1ab530cd9690bac5e45ee6db7ade] 2 | right [e7d401d9de91696feaf17569337d10ed6e02a9b5] 3 | ancestor [51ccdc67277ec1461e1140df66fd00d56db3e7b5] 4 | 5 | conflict duplicate_name 6 | left_type "added file" 7 | left_name "foo/x" 8 | left_file_id [75e12a4830b87d440b8ecadbdbcdf20842278d30] 9 | right_type "added file" 10 | right_name "bar/x" 11 | right_file_id [53059abba1a72c7aff34a3eaf7fef10ed65541ce] 12 | -------------------------------------------------------------------------------- /tests/workspace_migration/basic-2/_MTN/revision: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [9296adf6738af28160271dc44c77c4e3927e17b6] 4 | 5 | old_revision [c2cdede98d20694daf470055a100bf74fdd8e615] 6 | 7 | rename "testfile2" 8 | to "renamed-testfile2" 9 | 10 | add_dir "newdir" 11 | 12 | add_file "newdir/file3" 13 | content [6cae7599afc389125f786f1d703ef2a9eea08424] 14 | 15 | clear "testfile1" 16 | attr "test:attr" 17 | 18 | set "renamed-testfile2" 19 | attr "test:attr2" 20 | value "asdf" 21 | -------------------------------------------------------------------------------- /tests/annotate_with_human_output/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | revs = {} 4 | 5 | addfile("foo", "a\nb\nc\nd\n") 6 | commit() 7 | rev1 = base_revision() 8 | 9 | writefile("foo", "a\nB\nc\nD\n") 10 | commit() 11 | rev2 = base_revision() 12 | 13 | rev1_line = string.format("%s.. by tester", rev1:sub(0, 8)) 14 | rev2_line = string.format("%s.. by tester", rev2:sub(0, 8)) 15 | 16 | check(mtn("annotate", "foo"), 0, true, false) 17 | check(greplines("stdout", {rev1_line, rev2_line, rev1_line, rev2_line})) 18 | -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file13.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [40ea110392539e19c2d251569a3610c0051e0c64] 3 | # 4 | # patch "file1" 5 | # from [a43dc27b1c92cccc533ceb3a27035128e26e5b07] 6 | # to [8aa9b19b304a24ebcd71cfc4a27efc95f8ad8e11] 7 | # 8 | ============================================================ 9 | --- file1 a43dc27b1c92cccc533ceb3a27035128e26e5b07 10 | +++ file1 8aa9b19b304a24ebcd71cfc4a27efc95f8ad8e11 11 | @@ -1,3 +1,4 @@ quux 12 | foo 13 | bar 14 | quux 15 | +baz 16 | -------------------------------------------------------------------------------- /tests/netsync_with_suspended_branch/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("/common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | addfile("testfile", "blah stuff") 7 | commit() 8 | ver0 = base_revision() 9 | 10 | addfile("testfile2", "some more data") 11 | commit("otherbranch") 12 | ver1 = base_revision() 13 | check(mtn("suspend", "-b", "otherbranch", ver1), 0, false, false) 14 | 15 | netsync.pull("*") 16 | 17 | check_same_stdout(mtn("ls", "certs", ver1), 18 | mtn2("ls", "certs", ver1)) 19 | -------------------------------------------------------------------------------- /tests/workspace_migration/inodeprints-2/_MTN/revision: -------------------------------------------------------------------------------- 1 | format_version "1" 2 | 3 | new_manifest [9296adf6738af28160271dc44c77c4e3927e17b6] 4 | 5 | old_revision [c2cdede98d20694daf470055a100bf74fdd8e615] 6 | 7 | rename "testfile2" 8 | to "renamed-testfile2" 9 | 10 | add_dir "newdir" 11 | 12 | add_file "newdir/file3" 13 | content [6cae7599afc389125f786f1d703ef2a9eea08424] 14 | 15 | clear "testfile1" 16 | attr "test:attr" 17 | 18 | set "renamed-testfile2" 19 | attr "test:attr2" 20 | value "asdf" 21 | -------------------------------------------------------------------------------- /tests/add_ignores__MTN/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("subdir") 5 | writefile("subdir/file1", "111") 6 | 7 | -- make sure this works too, since it has failed in the past 8 | check(mtn("add", "-R", "."), 0, false, false) 9 | 10 | -- simulate shell glob of "*" from workspace root dir 11 | check(mtn("add", "-R", "_MTN", "subdir"), 0, false, false) 12 | 13 | -- simulate shell glob of "../*" from workspace subdir 14 | check(indir("subdir", mtn("add", "-R", "../_MTN", "../subdir")), 0, false, false) 15 | -------------------------------------------------------------------------------- /tests/importing_cvs_problematic_repo/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- This test imports a rcs file which fails according to the mailing list 5 | -- reporter: Carl Christian Kanne "Bug? in CVS import monotone 0.18" 6 | -- Date: Fri, 15 Apr 2005 12:53:13 +0200 7 | 8 | -- This test is a bug report. 9 | 10 | -- This rcs file fails to be imported correctly by monotone 11 | check(get("cvs-repository")) 12 | 13 | xfail_if(true, mtn("--branch=test", "cvs_import", "cvs-repository/test"), 0, ignore, ignore) 14 | -------------------------------------------------------------------------------- /tests/checkout_fails_with_multiple_heads/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "foo") 5 | commit() 6 | REV1=base_revision() 7 | 8 | addfile("file2", "bar") 9 | commit() 10 | REV2=base_revision() 11 | 12 | check(mtn("update", "-r", REV1), 0, false, false) 13 | addfile("otherfile", "splork") 14 | commit() 15 | REV3=base_revision() 16 | 17 | check(mtn("--branch=testbranch", "checkout", "test_dir1"), 18 | 1, false, true) 19 | check(qgrep(REV2, "stderr")) 20 | check(qgrep(REV3, "stderr")) 21 | -------------------------------------------------------------------------------- /tests/importing_cvs_file_added_on_a_branch/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- See makerepo.sh on how this repository was created. 5 | check(get("cvs-repository")) 6 | 7 | -- This tests the case where a file was added on a branch in CVS; CVS 8 | -- records this in a strange way (with a delete of the non-existent 9 | -- file on mainline, followed by an add of the file on the branch). 10 | -- Make sure we handle it correct. 11 | 12 | check(mtn("--branch=test", "cvs_import", "cvs-repository"), 0, false, false) 13 | -------------------------------------------------------------------------------- /tests/automate_inventory_ignore_dirs/local_hooks.lua: -------------------------------------------------------------------------------- 1 | function ignore_file(name) 2 | local result = false; 3 | io.stderr:write("ignore_file: '" .. name .. "':") 4 | 5 | if (name == "source/ignored_dir") then result = true end 6 | if (name == "source/ignored_dir/oops") then result = true end 7 | if (name == "source/ignored_1") then result = true end 8 | 9 | if result then 10 | io.stderr:write(" true\n") 11 | else 12 | io.stderr:write(" false\n") 13 | end 14 | return result 15 | end 16 | -------------------------------------------------------------------------------- /tests/automate_read_packets/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | check(mtn("automate", "genkey", "foo@bar.com", "foopass"), 0, false, false) 4 | check(mtn("pubkey", "foo@bar.com"), 0, true) 5 | rename("stdout", "key_packet") 6 | check(mtn("dropkey", "foo@bar.com"), 0, false, false) 7 | 8 | check(mtn("ls", "keys"), 0, true) 9 | check(not qgrep("foo@bar.com", "stdout")) 10 | 11 | check(mtn("automate", "read_packets", readfile("key_packet")), 0) 12 | check(mtn("ls", "keys"), 0, true) 13 | check(qgrep("foo@bar.com", "stdout")) 14 | -------------------------------------------------------------------------------- /tests/exchanging_work_via_netsync,_with_notes/testnotes2.test: -------------------------------------------------------------------------------- 1 | start --------------------------------------------------- 2 | start: sync_type = pull 3 | start: remote_keyname = tester@test.net 4 | start: includes = testbranch 5 | start: excludes = 6 | cert: rev_id = REV1 7 | cert: name = tag 8 | cert: value = testtag 9 | cert: key = tester@test.net 10 | end: status = 200 11 | end: certs in/out = 1/0 12 | end: revs in/out = 0/0 13 | end: keys in/out = 0/0 14 | end ----------------------------------------------------- 15 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/attribute-attached_left: -------------------------------------------------------------------------------- 1 | mtn: warning: 2 conflicts with no supported resolutions. 2 | mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 3 | mtn: set to 'valueX' on left file 'foo' 4 | mtn: set to 'valueZ' on right file 'foo' 5 | mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 6 | mtn: set to 'valueY' on left file 'foo' 7 | mtn: deleted from right file 'foo' 8 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_read_all/attribute-attached_right: -------------------------------------------------------------------------------- 1 | mtn: warning: 2 conflicts with no supported resolutions. 2 | mtn: conflict: multiple values for attribute 'attr1' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 3 | mtn: set to 'valueZ' on left file 'foo' 4 | mtn: set to 'valueX' on right file 'foo' 5 | mtn: conflict: multiple values for attribute 'attr2' on file 'foo' from revision c79cbcfb99f7a5e547815669b150dd3d9a28a598 6 | mtn: deleted from left file 'foo' 7 | mtn: set to 'valueY' on right file 'foo' 8 | -------------------------------------------------------------------------------- /tests/netsync_largish_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("/common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | -- Check that we can netsync a 32MB file. 7 | 8 | write_large_file("largish", 32) 9 | 10 | check(mtn("add", "largish"), 0, false, false) 11 | commit() 12 | file = sha1("largish") 13 | 14 | srv = netsync.start() 15 | 16 | srv:pull("testbranch") 17 | 18 | srv:stop() 19 | 20 | check(mtn("--db=test2.db", "--branch=testbranch", "checkout", "other"), 0, false, false) 21 | check(file == sha1("other/largish")) 22 | -------------------------------------------------------------------------------- /po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /tests/merge((rename_a_b),_(rename_a_c))/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- Should cause a merge conflict. 5 | 6 | addfile("a", "blah blah") 7 | commit() 8 | base = base_revision() 9 | 10 | rename("a", "b") 11 | check(mtn("rename", "--bookkeep-only", "a", "b"), 0, false, false) 12 | commit() 13 | 14 | rename("b", "a") 15 | revert_to(base) 16 | 17 | rename("a", "c") 18 | check(mtn("rename", "--bookkeep-only", "a", "c"), 0, false, false) 19 | commit() 20 | 21 | check(mtn("merge", "--branch=testbranch"), 1, false, false) 22 | -------------------------------------------------------------------------------- /tests/merge_update_part_of_file/after.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [4ccc559f3c16f31c41ac4cb2357a1d9b51ee51f4] 3 | # 4 | # patch "testfile" 5 | # from [471a577db9d77994fad74d428645753de962b908] 6 | # to [5fa4faad2ca837dee66a3052efcd72353f554056] 7 | # 8 | ============================================================ 9 | --- testfile 471a577db9d77994fad74d428645753de962b908 10 | +++ testfile 5fa4faad2ca837dee66a3052efcd72353f554056 11 | @@ -13,4 +13,4 @@ chunks 12 | two 13 | chunks 14 | 15 | -line to be changed 16 | +line changed 17 | -------------------------------------------------------------------------------- /contrib/color-logs.conf: -------------------------------------------------------------------------------- 1 | # 2 | # this is a colorization config for reading the output of "monotone log" 3 | # or "monotone diff", or best of all "monotone log --no-merges --diffs". 4 | # 5 | # use with the "colorize" script in this dir, or color-logs.sh 6 | # 7 | 8 | /^\#/ bold red 9 | /^\-{30}/ bold red 10 | /^\w[\w\s]+:/ bold red 11 | /^(\-{3}|\+{3})/ black on_cyan 12 | /^\-/ dark magenta 13 | /^\+/ dark cyan 14 | /^\@/ dark yellow 15 | -------------------------------------------------------------------------------- /tests/commit_validation_lua_hook/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("commit_validate.lua")) 5 | 6 | writefile("input.txt", "version 0 of the file") 7 | 8 | check(mtn("add", "input.txt"), 0, false, false) 9 | check(get("errmsg")) 10 | check(mtn("--branch=testbranch", "--rcfile=commit_validate.lua", "commit", "-m", "denyme"), 1, false, true) 11 | canonicalize("stderr") 12 | check(samefile("errmsg", "stderr")) 13 | check(mtn("--branch=testbranch", "--rcfile=commit_validate.lua", "commit", "-m", "allowme"), 0, false, false) 14 | -------------------------------------------------------------------------------- /tests/check_same_db_contents_macro/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- this test just tests that the testsuite macro CHECK_SAME_DB_CONTENTS works, 5 | -- because other tests depend on that. 6 | 7 | addfile("testfile", "blah") 8 | commit("testbranch1") 9 | 10 | addfile("testfile2", "foo") 11 | commit("testbranch2") 12 | 13 | copy("test.db", "test2.db") 14 | check_same_db_contents("test.db", "test2.db") 15 | 16 | addfile("testfile3", "pizza") 17 | commit() 18 | 19 | check(not pcall(check_same_db_contents, "test.db", "test2.db")) 20 | -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file14.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [40ea110392539e19c2d251569a3610c0051e0c64] 3 | # 4 | # patch "file1" 5 | # from [a43dc27b1c92cccc533ceb3a27035128e26e5b07] 6 | # to [400b49625ecf4bb7d2d7096ba86801bddb05bb9f] 7 | # 8 | ============================================================ 9 | --- file1 a43dc27b1c92cccc533ceb3a27035128e26e5b07 10 | +++ file1 400b49625ecf4bb7d2d7096ba86801bddb05bb9f 11 | @@ -1,3 +1,4 @@ quux 12 | foo 13 | bar 14 | quux 15 | +baz 16 | \ No newline at end of file 17 | -------------------------------------------------------------------------------- /tests/duplicate_key_id/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | remove("test.db") 4 | check(mtn("db", "init"), 0, false, false) 5 | 6 | check(get("bad_test_key", "stdin")) 7 | check(mtn("read"), 0, false, false, true) 8 | 9 | addfile("testfile", "version 0 of test file") 10 | check(mtn("commit", "-m", "try to commit with bad key in DB"), 1, false, true) 11 | check(qgrep("The key 'tester@test.net' stored in your database", "stderr")) 12 | 13 | check(mtn("ls", "keys"), 0, false, true) 14 | check(qgrep("Mismatched Key: tester@test.net", "stderr")) 15 | -------------------------------------------------------------------------------- /tests/exchanging_work_via_netsync_sent_notes/testnotes2.test: -------------------------------------------------------------------------------- 1 | start --------------------------------------------------- 2 | start: sync_type = push 3 | start: remote_keyname = tester@test.net 4 | start: includes = testbranch 5 | start: excludes = 6 | sent cert: rev_id = REV1 7 | sent cert: name = tag 8 | sent cert: value = testtag 9 | sent cert: key = tester@test.net 10 | end: status = 200 11 | end: certs in/out = 0/1 12 | end: revs in/out = 0/0 13 | end: keys in/out = 0/0 14 | end ----------------------------------------------------- 15 | -------------------------------------------------------------------------------- /quick_alloc.hh: -------------------------------------------------------------------------------- 1 | #ifndef __QUICK_ALLOC__ 2 | #define __QUICK_ALLOC__ 3 | 4 | #if defined(__GNUC__) && __GNUC__ < 3 || (__GNUC__ == 3 && __GNUC_MINOR__ < 4) 5 | # define QA(T) std::__allocator< T, std::__single_client_alloc > 6 | # define QA_SUPPORTED 7 | #else 8 | # define QA(T) std::allocator< T > 9 | #endif 10 | 11 | // Local Variables: 12 | // mode: C++ 13 | // fill-column: 76 14 | // c-file-style: "gnu" 15 | // indent-tabs-mode: nil 16 | // End: 17 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 18 | 19 | #endif 20 | -------------------------------------------------------------------------------- /tests/ls_unknown_in_subdir/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | mkdir("foo") 4 | writefile("bar", "bar") 5 | writefile("foo/a", "aaa") 6 | writefile("foo/b", "bbb") 7 | 8 | check(mtn("ls", "unknown", "foo"), 0, true, false) 9 | check(qgrep('foo$', "stdout"), 0, false, false) 10 | check(not qgrep('foo/a$', "stdout")) 11 | check(not qgrep('foo/b$', "stdout")) 12 | 13 | check(indir("foo", mtn("ls", "unknown")), 0, true, false) 14 | check(qgrep('foo$', "stdout")) 15 | check(not qgrep('foo/a$', "stdout")) 16 | check(not qgrep('foo/b$', "stdout")) 17 | 18 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-invalid-rename.stdout: -------------------------------------------------------------------------------- 1 | left [2bf9335ed387a7f1f082b0bc5ecdffa303d8393f] 2 | right [459c32f4c7b4676d47e23aff2bd67c1e2eae5f09] 3 | ancestor [e7f711a68627ccae4aded5907fc80516ea1215fd] 4 | 5 | conflict invalid_name 6 | left_type "pivoted root" 7 | ancestor_name "foo" 8 | right_type "renamed file" 9 | ancestor_name "bad/_MTN" 10 | ancestor_file_id [629d9e5d254241abf4b46f108fb53189e314e41d] 11 | right_name "foo/_MTN" 12 | right_file_id [629d9e5d254241abf4b46f108fb53189e314e41d] 13 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-orphaned-rename.stdout: -------------------------------------------------------------------------------- 1 | left [4ceae2a74d9d0d7341d2cd01a71c9e84eb1fefa7] 2 | right [16a19ace8ec26cd2ed13c7e727a3021e82a2204f] 3 | ancestor [b5f52dbc0dc530adffbdd140a7de5b129cf74f29] 4 | 5 | conflict orphaned_file 6 | right_type "deleted directory" 7 | ancestor_name "foo" 8 | left_type "renamed file" 9 | ancestor_name "bar" 10 | ancestor_file_id [ac4c6d06436632e017bb7d3ea241734e8899f8ce] 11 | left_name "foo/baz" 12 | left_file_id [ac4c6d06436632e017bb7d3ea241734e8899f8ce] 13 | -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file23.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [40ea110392539e19c2d251569a3610c0051e0c64] 3 | # 4 | # patch "file2" 5 | # from [4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1] 6 | # to [8aa9b19b304a24ebcd71cfc4a27efc95f8ad8e11] 7 | # 8 | ============================================================ 9 | --- file2 4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1 10 | +++ file2 8aa9b19b304a24ebcd71cfc4a27efc95f8ad8e11 11 | @@ -1,3 +1,4 @@ bar 12 | foo 13 | bar 14 | -quux 15 | \ No newline at end of file 16 | +quux 17 | +baz 18 | -------------------------------------------------------------------------------- /tests/diffing_with_explicit_rev_same_as_wc_rev/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("foo1", "foo file 1") 5 | 6 | check(mtn("add", "foo1"), 0, false, false) 7 | commit() 8 | parent = base_revision() 9 | 10 | -- should return 'no changes' (i.e. same as diff without --revision=) 11 | check_same_stdout(mtn("diff"), mtn("diff", "--revision", parent)) 12 | 13 | writefile("foo1", "foo changed file") 14 | 15 | -- should show local changes against wc's base rev 16 | check_same_stdout(mtn("diff"), mtn("diff", "--revision", parent)) 17 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_content/merge-1: -------------------------------------------------------------------------------- 1 | mtn: 2 heads on branch 'testbranch' 2 | mtn: merge 1 / 1: 3 | mtn: calculating best pair of heads to merge next 4 | mtn: [left] 36cfb5960784df07636cc9d119617326fe87c3f6 5 | mtn: [right] be155249f011e658f913c109bafd743b1bfea0fe 6 | mtn: merged files/bar, files/bar 7 | mtn: replacing content of files/baz, files/baz with _MTN/result/baz 8 | mtn: replacing content of files/foo, files/foo with files/foo 9 | mtn: [merged] d18cecd65445fa5b10732c6ca8a8bbdac2a6610a 10 | mtn: note: your workspaces have not been updated 11 | -------------------------------------------------------------------------------- /win32/make_io_binary.cc: -------------------------------------------------------------------------------- 1 | #define WIN32_LEAN_AND_MEAN 2 | #include "base.hh" 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include "platform.hh" 9 | 10 | void make_io_binary() 11 | { 12 | _setmode(_fileno(stdin), _O_BINARY); 13 | _setmode(_fileno(stdout), _O_BINARY); 14 | } 15 | 16 | // Local Variables: 17 | // mode: C++ 18 | // fill-column: 76 19 | // c-file-style: "gnu" 20 | // indent-tabs-mode: nil 21 | // End: 22 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 23 | -------------------------------------------------------------------------------- /tests/add_inside__MTN_/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("testfile1", "blah blah") 5 | writefile("_MTN/testfile2", "blah blah") 6 | writefile("testfile3", "blah blah BLAH") 7 | 8 | check(indir("_MTN", mtn("add", "testfile2")), 1, false, true) 9 | check(qgrep("ignored.*testfile2", "stderr")) 10 | check(indir("_MTN", mtn("add", "../testfile1")), 0, false, false) 11 | check(indir("_MTN", mtn("add", "testfile2", "../testfile3")), 0, false, true) 12 | check(qgrep("ignored.*testfile2", "stderr")) 13 | check(qgrep("adding.*testfile3", "stderr")) 14 | -------------------------------------------------------------------------------- /tests/calculation_of_other_unidiffs/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- I don't get it. This seems to work, but WTF is that qgrep looking for? 5 | 6 | -- decode first file and commit to db 7 | check(get("firstfile", "testfile")) 8 | addfile("testfile") 9 | commit() 10 | rename("testfile", "firstfile") 11 | 12 | -- calculate diff to second file using monotone 13 | check(get("secondfile", "testfile")) 14 | check(mtn("diff"), 0, true) 15 | rename("stdout", "monodiff") 16 | 17 | -- look for a meaningless change 18 | check(not qgrep("^-$", "monodiff")) 19 | -------------------------------------------------------------------------------- /tests/mtn_read_FILE/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("db", "init", "--db=foo.mtn"), 0, false, false) 5 | mkdir("foo") 6 | check(mtn("--db=foo.mtn", "--keydir=foo", "genkey", "foo"), 0, false, false, string.rep("foo\n", 2)) 7 | 8 | check(mtn("--db=foo.mtn", "--keydir=foo", "pubkey", "foo"), 0, true, false) 9 | rename("stdout", "foo.keyfile") 10 | check(mtn("read", "nonexistent"), 1, false, false) 11 | check(mtn("read", "foo.keyfile"), 0, false, false) 12 | 13 | check(mtn("ls", "keys"), 0, true, false) 14 | check(qgrep("foo", "stdout")) 15 | -------------------------------------------------------------------------------- /tests/renaming_a_directory_and_then_adding_a_new_with_the_old_name/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- add 'foo/test' file 5 | mkdir("foo") 6 | writefile("foo/test", "test file in foo dir") 7 | check(mtn("add", "foo"), 0, false, false) 8 | commit() 9 | 10 | -- rename 'foo' dir to 'bar' 11 | check(mtn("rename", "--bookkeep-only", "foo", "bar"), 0, false, false) 12 | rename("foo", "bar") 13 | 14 | -- add new 'foo' dir 15 | mkdir("foo") 16 | writefile("foo/test", "test file in new foo dir") 17 | check(mtn("add", "foo"), 0, false, false) 18 | commit() 19 | -------------------------------------------------------------------------------- /tests/add_unknown_recursive/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("adddir") 5 | writefile("adddir/test.txt", "A test file that won't be added unless --recursive is used\n") 6 | 7 | check(mtn("add", "--unknown"), 0, false, false) 8 | check(mtn("ls", "known"), 0, true, false) 9 | check(not qgrep("adddir/test.txt", "stdout")) 10 | check(mtn("drop", "--bookkeep-only", "adddir"), 0, true, false) 11 | check(mtn("add", "--unknown", "--recursive"), 0, false, false) 12 | check(mtn("ls", "known"), 0, true, false) 13 | check(qgrep("adddir/test.txt", "stdout")) 14 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-missing-root.stdout: -------------------------------------------------------------------------------- 1 | left [532ab5011ea9e64aa212d4ea52363b1b8133d5ba] 2 | right [b94a03a922c2c281a88d8988db64e76a32edb6a1] 3 | ancestor [ead03530f5fefe50c9010157c42c0ebe18086559] 4 | 5 | conflict missing_root 6 | left_type "pivoted root" 7 | ancestor_name "foo" 8 | right_type "deleted directory" 9 | ancestor_name "foo" 10 | 11 | conflict orphaned_directory 12 | right_type "deleted directory" 13 | ancestor_name "" 14 | left_type "renamed directory" 15 | ancestor_name "" 16 | left_name "bar" 17 | -------------------------------------------------------------------------------- /tests/b_and_h_selectors/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("common/selectors.lua") 3 | mtn_setup() 4 | 5 | addfile("testfile", "blah blah") 6 | commit() 7 | REV1=base_revision() 8 | 9 | writefile("testfile", "stuff stuff") 10 | commit() 11 | REV2=base_revision() 12 | 13 | writefile("testfile", "chew chew") 14 | commit("otherbranch") 15 | REV3=base_revision() 16 | 17 | selmap("b:testbranch", {REV1, REV2}) 18 | selmap("b:otherbranch", {REV3}) 19 | selmap("b:", {REV3}) 20 | selmap("h:testbranch", {REV2}) 21 | selmap("h:otherbranch", {REV3}) 22 | selmap("h:", {REV3}) 23 | -------------------------------------------------------------------------------- /tests/automate_certs/expected: -------------------------------------------------------------------------------- 1 | key "tester@test.net" 2 | signature "ok" 3 | name "author" 4 | value "tester@test.net" 5 | trust "trusted" 6 | 7 | key "tester@test.net" 8 | signature "ok" 9 | name "branch" 10 | value "testbranch" 11 | trust "trusted" 12 | 13 | key "tester@test.net" 14 | signature "ok" 15 | name "changelog" 16 | value "blah-blah 17 | " 18 | trust "trusted" 19 | 20 | key "tester@test.net" 21 | signature "ok" 22 | name "date" 23 | value "2005-05-21T12:30:51" 24 | trust "trusted" 25 | -------------------------------------------------------------------------------- /tests/drop_a_public_and_private_key/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("genkey", "john@doe.com"), 0, false, false, string.rep("john@doe.com\n", 2)) 5 | 6 | check(mtn("privkey", "john@doe.com"), 0, true, false) 7 | 8 | check(qgrep('john@doe.com', "stdout")) 9 | 10 | check(mtn("dropkey", "john@doe.com"), 0, false, false) 11 | 12 | check(mtn("privkey", "john@doe.com"), 1, false, true) 13 | 14 | check(qgrep('do not exist', "stderr")) 15 | 16 | check(mtn("pubkey", "john@doe.com"), 1, false, true) 17 | 18 | check(qgrep('does not exist', "stderr")) 19 | -------------------------------------------------------------------------------- /tests/reallyquiet_turns_off_tickers_and_warnings/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | addfile("input.txt", "version 0 of the file") 7 | commit() 8 | 9 | -- check that tickers are quiet 10 | srv = netsync.start() 11 | 12 | check(mtn2("--rcfile=netsync.lua", "pull", srv.address, "testbranch", "--reallyquiet")) 13 | 14 | srv:stop() 15 | 16 | -- check that warnings aren't... 17 | -- (list keys with a pattern that doesn't match anything generates a warning) 18 | check(mtn("--reallyquiet", "list", "keys", "foo")) 19 | -------------------------------------------------------------------------------- /m4/pch.m4: -------------------------------------------------------------------------------- 1 | # check for precompiled headers option 2 | AC_DEFUN([AC_PROG_CXX_PCH], 3 | [AC_ARG_ENABLE(pch, 4 | AS_HELP_STRING([--enable-pch], 5 | [use precompiled boost headers])) 6 | AM_CONDITIONAL(BUILD_PCH, false) 7 | if test x"${enable_pch}" = x"yes" 8 | then 9 | AC_MSG_CHECKING(for gcc with precompiled header support) 10 | gxx_version=`${CXX} -dumpversion` 11 | case $gxx_version in 12 | 4.*) 13 | AC_MSG_RESULT(found) 14 | AM_CONDITIONAL(BUILD_PCH, true) 15 | ;; 16 | *) 17 | AC_MSG_RESULT(not found) 18 | ;; 19 | esac 20 | fi]) 21 | -------------------------------------------------------------------------------- /tests/_--author,_--date/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "floooooo") 5 | check(mtn("commit", "--author=the_author", "--date=1999-12-31T12:00:00", "--branch=foo", "--message=foo"), 0, false, false) 6 | rev = base_revision() 7 | check(mtn("log", "--from", rev), 0, true, false) 8 | 9 | check(qgrep('^[\\| ]+Author: the_author', "stdout")) 10 | check(qgrep('^[\\| ]+Date: 1999-12-31T12:00:00', "stdout")) 11 | 12 | writefile("testfile", "oovel") 13 | check(mtn("commit", "--date=1999-12-31T12:00foo", "--branch=foo", "--message=foo"), 1, false, false) 14 | -------------------------------------------------------------------------------- /tests/checkout_creates__MTN_log/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("commit_log.lua")) 5 | 6 | writefile("_MTN/log", "Log entry") 7 | 8 | writefile("input.txt", "version 0 of the file") 9 | 10 | check(mtn("add", "input.txt"), 0, false, false) 11 | 12 | check(mtn("--branch=testbranch", "--rcfile=commit_log.lua", "commit"), 0, false, false) 13 | 14 | check(mtn("--branch=testbranch", "checkout", "testbranch"), 0, false, true) 15 | 16 | check(exists("testbranch/_MTN/log")) 17 | check(fsize("_MTN/log") == 0) 18 | check(fsize("testbranch/_MTN/log") == 0) 19 | -------------------------------------------------------------------------------- /tests/locked_workspace/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | addfile("base", "base") 4 | commit() 5 | base = base_revision() 6 | 7 | addfile("next", "next") 8 | commit() 9 | 10 | check(mtn("checkout", "--revision", base, "test")) 11 | 12 | mkdir("test/_MTN/detached") 13 | check(indir("test", mtn("update")), 1, false, true) 14 | 15 | writefile("test/_MTN/detached/123") 16 | check(indir("test", mtn("update")), 1, false, true) 17 | 18 | remove("test/_MTN/detached") 19 | check(indir("test", mtn("update")), 0, false, true) 20 | 21 | check(not exists("test/_MTN/detached")) 22 | -------------------------------------------------------------------------------- /tests/update_-b_switches_branches_even_when_noop/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile", "blah blah") 5 | commit() 6 | 7 | RID1=base_revision() 8 | 9 | check(mtn("cert", RID1, "branch", "otherbranch"), 0, false, false) 10 | 11 | check(qgrep("testbranch", "_MTN/options")) 12 | check(not qgrep("otherbranch", "_MTN/options")) 13 | 14 | check(mtn("update", "-b", "otherbranch"), 0, false, false) 15 | RID2=base_revision() 16 | check(RID1 == RID2) 17 | 18 | check(not qgrep("testbranch", "_MTN/options")) 19 | check(qgrep("otherbranch", "_MTN/options")) 20 | -------------------------------------------------------------------------------- /tests/_--db_with_parent_dir/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | chdir("foo") 6 | check(mtn("--db=../new.db", "db", "init"), 0, false, false) 7 | check(mtn("--db=../new.db", "ls", "branches"), 0, false, false) 8 | chdir("..") 9 | 10 | -- paths in _MTN/options should be absolute and not contain .. 11 | 12 | mkdir("bar") 13 | chdir("bar") 14 | check(mtn("--db=../new.db", "--branch=testbranch", "setup", "."), 0, false, false) 15 | chdir("..") 16 | check(grep("new.db", "bar/_MTN/options"), 0, true) 17 | check(grep("-v", "\\.\\.", "stdout"), 0, false, false) 18 | -------------------------------------------------------------------------------- /tests/automate_inventory_ignore_dirs/expected.stdout: -------------------------------------------------------------------------------- 1 | path "source" 2 | new_type "directory" 3 | fs_type "directory" 4 | status "added" "known" 5 | 6 | path "source/ignored_1" 7 | fs_type "file" 8 | status "ignored" 9 | 10 | path "source/ignored_dir" 11 | fs_type "directory" 12 | status "ignored" 13 | 14 | path "source/source_1" 15 | new_type "file" 16 | fs_type "file" 17 | status "added" "known" 18 | changes "content" 19 | 20 | path "source/source_2" 21 | new_type "file" 22 | fs_type "file" 23 | status "added" "known" 24 | changes "content" 25 | -------------------------------------------------------------------------------- /tests/invalid_--root_settings/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | 6 | check(mtn("status"), 0, false, false) 7 | check(mtn("status", "--root", "."), 0, false, false) 8 | 9 | check(indir("foo", mtn("status", "--root", "..")), 0, false, false) 10 | check(indir("foo", mtn("status", "--root", ".")), 1, false, false) 11 | 12 | -- workspace outside of root 13 | tmpdir = make_temp_dir() 14 | check(mtn("status", "--root", tmpdir), 1, false, false) 15 | remove(tmpdir) 16 | 17 | -- root below workspace 18 | check(mtn("status", "--root", "foo"), 1, false, false) 19 | -------------------------------------------------------------------------------- /m4/localeworks.m4: -------------------------------------------------------------------------------- 1 | AC_DEFUN([AC_FUNC_LOCALE_WORKS], 2 | [AC_CACHE_CHECK([if setlocale() and nl_langinfo() works], 3 | ac_cv_locale_works, [ 4 | AC_TRY_RUN([ 5 | #include 6 | #include 7 | int main () 8 | { 9 | char* cs; 10 | setlocale(LC_CTYPE, ""); 11 | cs = nl_langinfo(CODESET); 12 | return !cs; 13 | } 14 | ], 15 | ac_cv_locale_works=yes, 16 | ac_cv_locale_works=no, 17 | ac_cv_locale_works=no) 18 | ]) 19 | if test "$ac_cv_locale_works" = "yes"; then 20 | AC_DEFINE(LOCALE_WORKS, 1, [Define if setlocale() and nl_langinfo() work.]) 21 | fi]) 22 | -------------------------------------------------------------------------------- /tests/do_not_log_the_result_of_hook_get_passphrase/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("input.txt", "version 0 of the file") 5 | 6 | -- can't use passphrase == keyname here, because 7 | -- it's OK for the keyname to be logged. 8 | check(get("hook.lua")) 9 | pass = "xyzzypassphrasexyzzy" 10 | check(mtn("genkey", "quux"), 0, false, false, string.rep(pass.."\n", 2)) 11 | 12 | check(mtn("--branch=testbranch", "--debug", "commit", "-m", "foo", 13 | "--rcfile=hook.lua", "-k", "quux"), 0, false, true) 14 | 15 | check(not qgrep("xyzzypassphrasexyzzy", "stderr")) 16 | -------------------------------------------------------------------------------- /tests/normalized_filenames/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("foo", "blah blah") 5 | -- The UI used to fix these, while later code did not, so let's check 6 | -- the inner code directly. 7 | append("_MTN/revision", '\nadd_dir "."\n') 8 | check(mtn("automate", "get_manifest_of"), 3, false, false) 9 | 10 | append("_MTN/revision", '\nadd_dir "./bar"\n') 11 | 12 | check(mtn("automate", "get_manifest_of"), 3, false, false) 13 | check(mtn("automate", "get_current_revision"), 3, false, false) 14 | check(mtn("commit", "--message=foo", "--branch=foo"), 3, false, false) 15 | -------------------------------------------------------------------------------- /tests/server_initiated_sync/server1.rc: -------------------------------------------------------------------------------- 1 | function note_netsync_start(session_id, my_role, sync_type, remote_host, 2 | remote_keyname, includes, excludes) 3 | if netsync_info == nil then netsync_info = {} end 4 | netsync_info[session_id] = remote_host 5 | end 6 | 7 | function note_netsync_end(session_id, status, bytes_in, bytes_out, certs_in, 8 | certs_out, revs_in, revs_out, keys_in, keys_out) 9 | if netsync_info[session_id] ~= "localhost:12345" then 10 | server_request_sync("push", "localhost:12345", "*", "") 11 | end 12 | end -------------------------------------------------------------------------------- /tests/updating_from_a_merge_which_adds_a_file/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | writefile("a") 5 | 6 | check(mtn("add", "a"), 0, false, false) 7 | commit() 8 | 9 | root_r_sha = base_revision() 10 | root_f_sha = sha1("a") 11 | 12 | mkdir("b") 13 | writefile("b/c") 14 | 15 | check(mtn("add", "b"), 0, false, false) 16 | commit() 17 | 18 | probe_node("a", root_r_sha, root_f_sha) 19 | 20 | remove("b") 21 | writefile("d") 22 | 23 | check(mtn("add", "d"), 0, false, false) 24 | commit() 25 | 26 | check(mtn("merge"), 0, false, false) 27 | check(mtn("update"), 0, false, false) 28 | -------------------------------------------------------------------------------- /unix/cputime.cc: -------------------------------------------------------------------------------- 1 | // copyright (C) 2006 Nathaniel Smith 2 | // all rights reserved. 3 | // licensed to the public under the terms of the GNU GPL (>= 2) 4 | // see the file COPYING for details 5 | 6 | #include "base.hh" 7 | #include 8 | 9 | double 10 | cpu_now() 11 | { 12 | return static_cast(clock()) / CLOCKS_PER_SEC; 13 | } 14 | 15 | // Local Variables: 16 | // mode: C++ 17 | // fill-column: 76 18 | // c-file-style: "gnu" 19 | // indent-tabs-mode: nil 20 | // End: 21 | // vim: et:sw=2:sts=2:ts=2:cino=>2s,{s,\:s,+s,t0,g0,^-2,e-2,n-2,p2s,(0,=s: 22 | -------------------------------------------------------------------------------- /tests/diff_--external/testhook.lua: -------------------------------------------------------------------------------- 1 | function external_diff(file_path, data_old, data_new, is_binary, diff_args, rev_old, rev_new) 2 | io.write("file_path: " .. file_path .. "\n") 3 | f = io.open("old_version", "w") 4 | f:write(data_old) 5 | io.close(f) 6 | f = io.open("new_version", "w") 7 | f:write(data_new) 8 | io.close(f) 9 | if diff_args == nil then 10 | io.write("diff_args is NIL\n") 11 | else 12 | io.write("diff_args: " .. diff_args .. "\n") 13 | end 14 | io.write("rev_old: " .. rev_old .. "\n") 15 | io.write("rev_new: " .. rev_new .. "\n") 16 | end 17 | -------------------------------------------------------------------------------- /tests/diff_on_missing_trailing_newline_at_end_of_file/file24.diff: -------------------------------------------------------------------------------- 1 | # 2 | # old_revision [40ea110392539e19c2d251569a3610c0051e0c64] 3 | # 4 | # patch "file2" 5 | # from [4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1] 6 | # to [400b49625ecf4bb7d2d7096ba86801bddb05bb9f] 7 | # 8 | ============================================================ 9 | --- file2 4f8091d2fa31b0598dd0ff6dc936f8d0b47b59d1 10 | +++ file2 400b49625ecf4bb7d2d7096ba86801bddb05bb9f 11 | @@ -1,3 +1,4 @@ bar 12 | foo 13 | bar 14 | -quux 15 | \ No newline at end of file 16 | +quux 17 | +baz 18 | \ No newline at end of file 19 | -------------------------------------------------------------------------------- /tests/filenames_in_diff_after_rename/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- If a file is renamed from "testfile" to "otherfile" and has changes, 5 | -- then 'mtn diff' should display: 6 | -- --- testfile 7 | -- +++ otherfile 8 | 9 | addfile("testfile", "blah blah") 10 | commit() 11 | 12 | writefile("testfile", "stuff stuff") 13 | check(mtn("rename", "testfile", "otherfile"), 0, false, false) 14 | 15 | check(exists("otherfile")) 16 | 17 | check(mtn("diff"), 0, true, false) 18 | 19 | check(qgrep("--- testfile", "stdout")) 20 | check(qgrep("\\+\\+\\+ otherfile", "stdout")) 21 | -------------------------------------------------------------------------------- /tests/attr_init_functions/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("hook.lua")) 5 | 6 | writefile("testfile", "foo") 7 | check(mtn("--rcfile=hook.lua", "add", "testfile"), 0, false, false) 8 | writefile("magic", "stuff") 9 | check(mtn("--rcfile=hook.lua", "add", "magic"), 0, false, false) 10 | 11 | check(mtn("attr", "get", "testfile"), 0, true, false) 12 | check(not qgrep("test:test_attr", "stdout")) 13 | check(not qgrep("bob", "stdout")) 14 | 15 | check(mtn("attr", "get", "magic"), 0, true, false) 16 | check(qgrep("test:test_attr", "stdout")) 17 | check(qgrep("bob", "stdout")) 18 | -------------------------------------------------------------------------------- /tests/checkout_-r_no_dir/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | addfile("foo", "blah blah") 4 | commit("mybranch") 5 | 6 | -- this should first guess the branch to be 'mybranch', and then use that as 7 | -- the default checkout directory name 8 | check(mtn("checkout", "-r", "h:mybranch"), 0, false, false) 9 | check(exists("mybranch")) 10 | check(readfile("foo") == readfile("mybranch/foo")) 11 | 12 | -- but now that that directory exists, it should fail 13 | check(mtn("checkout", "-r", "h:mybranch"), 1, false, false) 14 | check(mtn("checkout", "-r", "h:mybranch", "otherdir"), 0, false, false) 15 | -------------------------------------------------------------------------------- /tests/netsync_client_absorbs_server_key/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("/common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | addfile("testfile", "foo bar") 7 | commit() 8 | 9 | check(mtn("genkey", "foo@bar"), 0, false, false, "foo@bar\nfoo@bar\n") 10 | check(mtn("pubkey", "foo@bar"), 0, true, false) 11 | canonicalize("stdout") 12 | copy("stdout", "foo_public") 13 | 14 | srv = netsync.start({"--key=foo@bar"}) 15 | srv:pull("testbranch") 16 | srv:stop() 17 | 18 | check(mtn2("pubkey", "foo@bar"), 0, true, false) 19 | canonicalize("stdout") 20 | check(samefile("foo_public", "stdout")) 21 | -------------------------------------------------------------------------------- /tests/use_restrictions_with_--exclude_and_inodeprints/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | writefile("file1", "x") 6 | writefile("foo/bar", "y") 7 | 8 | check(mtn("add", "file1"), 0, false, false) 9 | check(mtn("add", "foo/bar"), 0, false, false) 10 | check(mtn("ci", "-m", "x"), 0, false, false) 11 | 12 | check(mtn("refresh_inodeprints")) 13 | append("file1", "a") 14 | append("foo/bar", "b") 15 | check(mtn("ci", "--exclude", "foo", "-m", 'x'), 0, false, false) 16 | check(mtn("status"), 0, true) 17 | check(qgrep("foo/bar", "stdout")) 18 | check(not qgrep("file1", "stdout")) 19 | -------------------------------------------------------------------------------- /botan/selftest.h: -------------------------------------------------------------------------------- 1 | /************************************************* 2 | * Startup Self Test Header File * 3 | * (C) 1999-2007 Jack Lloyd * 4 | *************************************************/ 5 | 6 | #ifndef BOTAN_SELF_TEST_H__ 7 | #define BOTAN_SELF_TEST_H__ 8 | 9 | #include 10 | 11 | namespace Botan { 12 | 13 | /************************************************* 14 | * Self Tests * 15 | *************************************************/ 16 | BOTAN_DLL bool passes_self_tests(); 17 | 18 | } 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /tests/db_load_must_create_a_new_db/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("foo", "stuff") 5 | commit() 6 | 7 | check(mtn("db", "dump"), 0, true, false) 8 | canonicalize("stdout") 9 | rename("stdout", "dump") 10 | copy("dump", "stdin") 11 | check(mtn("--db=test2.db", "db", "load"), 0, false, false, true) 12 | 13 | mkdir("test3.db") 14 | copy("dump", "stdin") 15 | check(mtn("--db=test3.db", "db", "load"), 1, false, false, true) 16 | 17 | check(mtn("--db=test4.db", "db", "init"), 0, false, false) 18 | copy("dump", "stdin") 19 | check(mtn("--db=test4.db", "db", "load"), 1, false, false, true) 20 | -------------------------------------------------------------------------------- /tests/escaped_selectors/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("common/selectors.lua") 3 | mtn_setup() 4 | 5 | addfile("testfile", "blah blah") 6 | commit("test/branch") 7 | REV1=base_revision() 8 | 9 | writefile("testfile", "stuff stuff") 10 | commit("test/branch") 11 | REV2=base_revision() 12 | 13 | writefile("testfile", "chew chew") 14 | commit("other/branch") 15 | REV3=base_revision() 16 | 17 | selmap("b:test\\/branch", {REV1, REV2}) 18 | selmap("b:other\\/branch", {REV3}) 19 | selmap("b:", {REV3}) 20 | selmap("h:test\\/branch", {REV2}) 21 | selmap("h:other\\/branch", {REV3}) 22 | selmap("h:", {REV3}) 23 | -------------------------------------------------------------------------------- /tests/importing_cvs_file_with_one_version/makerepo.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CVSROOT=`pwd`/cvs-repository 4 | export CVSROOT 5 | 6 | # deleting the existing cvs-repository 7 | rm -vrf $CVSROOT 8 | 9 | # initializing a new repository 10 | cvs init 11 | 12 | # add a file 'foo' 13 | mkdir full_checkout 14 | cd full_checkout 15 | cvs co . 16 | mkdir test 17 | echo "version 0 of test file foo" > test/foo 18 | cvs add test 19 | cvs add test/foo 20 | cvs commit -m "commit 0" test/foo 21 | cd .. 22 | rm -rf full_checkout 23 | 24 | # clean up the CVS repository bookkeeping dir 25 | rm -rf cvs-repository/CVSROOT 26 | -------------------------------------------------------------------------------- /tests/resolve_conflicts_duplicate_name/merge-1: -------------------------------------------------------------------------------- 1 | mtn: 2 heads on branch 'testbranch' 2 | mtn: merge 1 / 1: 3 | mtn: calculating best pair of heads to merge next 4 | mtn: [left] 1337cb1059c4bc3e376b14381b43e9383c654da1 5 | mtn: [right] d5f1dd136c86b5bbd5e71b0c3365667e328af492 6 | mtn: dropping checkout.sh 7 | mtn: replacing content of checkout.sh with _MTN/resolutions/checkout.sh 8 | mtn: renaming thermostat.c to thermostat-westinghouse.c 9 | mtn: renaming thermostat.c to thermostat-honeywell.c 10 | mtn: [merged] 14964233a7361ada1ba962f7863d4fee12f30df7 11 | mtn: note: your workspaces have not been updated 12 | -------------------------------------------------------------------------------- /tests/automate_show_conflicts/expected-duplicate-add-rename.stdout: -------------------------------------------------------------------------------- 1 | left [446ea80c3f78fca1cfdb84aad55939f4e635ddc0] 2 | right [367cb265f641ead9834f497ff3cbcb2b85ffe1fa] 3 | ancestor [d9ff68aa530d581731b0e5739b3494963cd89e91] 4 | 5 | conflict duplicate_name 6 | left_type "renamed file" 7 | ancestor_name "foo" 8 | ancestor_file_id [c6864a8456855c48afe83488a47501fe8b94bd57] 9 | left_name "bar" 10 | left_file_id [c6864a8456855c48afe83488a47501fe8b94bd57] 11 | right_type "added file" 12 | right_name "bar" 13 | right_file_id [c809d71002ec57a2f1d10221f05993012a491436] 14 | -------------------------------------------------------------------------------- /tests/importing_cvs_tricky_repo_with_tags/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("test.manifest")) 5 | 6 | check(get("test.tags")) 7 | 8 | check(get("cvs-repository")) 9 | 10 | check(mtn("--branch=foo.bar", "cvs_import", "cvs-repository"), 0, false, false) 11 | check(mtn("--branch=foo.bar", "checkout"), 0, false, true) 12 | check(indir("foo.bar", mtn("automate", "get_manifest_of")), 0, true) 13 | canonicalize("stdout") 14 | check(samefile("test.manifest", "stdout")) 15 | check(indir("foo.bar", mtn("list", "tags")), 0, true) 16 | canonicalize("stdout") 17 | check(samefile("test.tags", "stdout")) 18 | -------------------------------------------------------------------------------- /tests/merge_rev_with_ancestor/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- The idea here is that if we have, say, A -> B -> C, then merging A 5 | -- and C should not be possible, because it creates a weird graph with 6 | -- no clear meaning. 7 | 8 | addfile("testfile", "0") 9 | commit() 10 | r0 = base_revision() 11 | 12 | writefile("testfile", "1") 13 | commit() 14 | r1 = base_revision() 15 | 16 | writefile("testfile", "2") 17 | commit() 18 | r2 = base_revision() 19 | 20 | check(mtn("explicit_merge", r0, r1, "testbranch"), 1, false, false) 21 | check(mtn("explicit_merge", r1, r0, "testbranch"), 1, false, false) 22 | -------------------------------------------------------------------------------- /tests/scanning_trees/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("foo") 5 | mkdir("foo/bar") 6 | writefile("testfile0", "version 0 of first test file\n") 7 | writefile("foo/testfile1", "version 0 of second test file\n") 8 | writefile("foo/bar/testfile2", "version 0 of third test file\n") 9 | check(get("manifest")) 10 | canonicalize("manifest") 11 | 12 | check(mtn("add", "testfile0", "foo"), 0, false, false) 13 | commit() 14 | check(mtn("add", "-R", "foo"), 0, false, false) 15 | commit() 16 | check(mtn("automate", "get_manifest_of"), 0, true) 17 | canonicalize("stdout") 18 | check(samefile("stdout", "manifest")) 19 | -------------------------------------------------------------------------------- /tests/ssh_agent/id_dsa.pub: -------------------------------------------------------------------------------- 1 | ssh-dss AAAAB3NzaC1kc3MAAACBAJ16/vZXKI5OJlyga+5FU36jGXn+LtaezzbRBgkfvvyY8POmI3f9rCgI+cRyAmu90lpPMJQ2wboC5Iz9W8DyxHokVLTxhtRUj+yNcUtJj5wgtC9xzhtL8T3ExABjp1d71zM/3JL82jnRzc0ewp5haNyGnKX74sli5WM1HyvwCnGhAAAAFQCx0YG813m5mYQhog8DYFKsUjtckwAAAIA5TTNdvLI4NS24b9PFdNRRmJLQWm97PiN2qlfCrqN08hSVHlv557adPcS8lKdxdO6wwPvi+ufdX/8VOwiAgn+C8pkzdiMOeUYjigbiKnauBoLCEBwea4iXM1zWuZHf2lChfGujS3jyKEpC+Orpfv0T8iWnU9rbt/Anrdj1pu4O3wAAAIBXB0Hg/ruNlHuRmbFkmGmHGAba/WvFRef0+RvDtF7pb8ImFMLsL/4+Jt6mkVRwwxmVDIkycKG/b1+UkBzWIET521sbql6TdaKDULwwqBkoggVxTO/b3/nDesgO/ixOSUK2ldp6sf9HwlkhXn1kndqK4DP8GIts9Iheu7LnSeDZLg== papercrane@rrlrrll 2 | -------------------------------------------------------------------------------- /tests/ls_duplicates_with_duplicates/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(mtn("ls", "duplicates", "bla"), 2, false, false); 5 | 6 | addfile("unique", "unique") 7 | commit() 8 | 9 | addfile("testfile", "blah blah") 10 | commit() 11 | 12 | writefile("testfile", "foo foo") 13 | commit() 14 | 15 | addfile("testfile2", "blah blah") 16 | commit() 17 | 18 | writefile("testfile2", "foo foo") 19 | commit() 20 | R=base_revision() 21 | 22 | check(mtn("ls", "duplicates","-r", R), 0, true, false) 23 | check(qgrep("testfile", "stdout")) 24 | check(qgrep("testfile2", "stdout")) 25 | check(not qgrep("unique", "stdout")) 26 | -------------------------------------------------------------------------------- /tests/add_executable/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | skip_if(ostype == "Windows") 3 | skip_if(not existsonpath("chmod")) 4 | skip_if(not existsonpath("test")) 5 | mtn_setup() 6 | 7 | 8 | writefile("foo", "blah blah") 9 | check({"chmod", "755", "foo"}) 10 | -- Have to use RAW_MTN, because we're testing the standard hooks... 11 | check(raw_mtn("--rcfile=test_hooks.lua", "add", "foo"), 0, false, false) 12 | commit() 13 | 14 | -- Have to use RAW_MTN, because we're testing the standard hooks... 15 | check(raw_mtn("--rcfile=test_hooks.lua", "checkout", "--branch=testbranch", "codir"), 0, false, false) 16 | check({"test", "-x", "codir/foo"}) 17 | -------------------------------------------------------------------------------- /tests/server_initiated_sync/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | include("common/netsync.lua") 3 | mtn_setup() 4 | netsync.setup() 5 | 6 | addfile("a", "b") 7 | check(mtn2("commit", "-m", "foo"), 0, false, false) 8 | 9 | 10 | srv2 = netsync.start(3) 11 | 12 | get("server1.rc") 13 | rcdata = readfile("server1.rc") 14 | rcdata = string.gsub(rcdata, "localhost:12345", srv2.address) 15 | writefile("server1.rc", rcdata) 16 | 17 | srv1 = netsync.start({"--rcfile=server1.rc"}) 18 | 19 | srv1:push({"*"}) 20 | 21 | sleep(20) 22 | 23 | srv1:stop() 24 | srv2:stop() 25 | 26 | -- should now exist in mtn3 27 | check(mtn3("update"), 0, false, false) 28 | -------------------------------------------------------------------------------- /tests/merging_data_in_unrelated_revisions/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- This test relies on file-suturing 5 | 6 | check(get("left", "testfile")) 7 | addfile("testfile") 8 | commit() 9 | left = base_revision() 10 | 11 | remove("_MTN") 12 | check(mtn("setup", "--branch=testbranch", "."), 0, false, false) 13 | 14 | check(get("right", "testfile")) 15 | addfile("testfile") 16 | commit() 17 | right = base_revision() 18 | 19 | xfail_if(true, mtn("--branch=testbranch", "merge"), 0, false, false) 20 | AT_CHECK(mtn("update"), 0, false, false) 21 | 22 | check(samefile("left", "testfile") or samefile("right", "testfile")) 23 | -------------------------------------------------------------------------------- /tests/revert_file_blocked_by_unversioned_directory/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- this test is a bug report 5 | -- 6 | -- reverting a file that has been replaced by a (non-versioned) directory 7 | -- should do something sensible. I'm not sure what that is though. 8 | -- this is almost a working copy conflict but it seems silly that revert 9 | -- would ever encounter a conflict. 10 | 11 | addfile("foo", "foo") 12 | 13 | commit() 14 | 15 | check(mtn("mv", "foo", "bar"), 0, false, false) 16 | 17 | -- create directory blocking revert of foo 18 | mkdir("foo") 19 | 20 | xfail_if(true, mtn("revert", "."), 0, false, false) 21 | -------------------------------------------------------------------------------- /tests/status_with_missing_files/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | addfile("testfile1", "foo") 5 | addfile("testfile2", "bar") 6 | commit() 7 | 8 | remove("testfile1") 9 | remove("testfile2") 10 | 11 | -- status should successfully report on the status of things regardless 12 | -- of the status of those things -- i.e. it should report missing files 13 | -- as such rather than failing on them. 14 | 15 | -- status should list all missing files before failing 16 | -- if/when there are missing files 17 | 18 | check(mtn("status"), 1, false, true) 19 | check(qgrep("testfile1", "stderr")) 20 | check(qgrep("testfile2", "stderr")) 21 | -------------------------------------------------------------------------------- /tests/automate_get_content_changed/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("expected")) 5 | 6 | -- trivial case; a single file, with no history (it should be marked itself) 7 | addfile("foo", "blah\n") 8 | check(mtn("commit", "--date=2005-05-21T12:30:51", 9 | "--branch=testbranch", "--message=blah-blah"), 0, false, false) 10 | rev = base_revision() 11 | 12 | -- check that a correct usage produces correctly formatted output 13 | check(mtn("automate", "get_content_changed", rev, "foo"), 0, true, false) 14 | canonicalize("stdout") 15 | check(samefile("expected", "stdout")) 16 | 17 | -- TODO: accidental clean merge test 18 | -------------------------------------------------------------------------------- /tests/revert_directories/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- reverting files deeper in the directory tree with only some leading 5 | -- components of their relative path specified 6 | 7 | mkdir("abc") mkdir("abc/def") mkdir("abc/def/ghi") 8 | writefile("abc/def/ghi/file", "deep deep snow") 9 | check(mtn("add", "abc/def/ghi/file"), 0, false, false) 10 | commit() 11 | writefile("abc/def/ghi/file", "deep deep mud") 12 | check(mtn("status"), 0, true) 13 | check(qgrep("abc/def/ghi/file", "stdout")) 14 | check(mtn("revert", "abc/def"), 0, false, false) 15 | check(mtn("status"), 0, true) 16 | check(not qgrep("abc/def/ghi/file", "stdout")) 17 | -------------------------------------------------------------------------------- /tests/add_in_subdir/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | mkdir("subdir") 5 | mkdir("subdir/anotherdir") 6 | writefile("subdir/foo", "data data") 7 | writefile("subdir/anotherdir/bar", "more data") 8 | 9 | -- Add a file 10 | chdir("subdir") 11 | check(mtn("add", "foo"), 0, false, false) 12 | -- Add a directory 13 | check(mtn("add", "-R", "anotherdir"), 0, false, false) 14 | chdir("..") 15 | 16 | commit() 17 | rev = base_revision() 18 | 19 | check(mtn("checkout", "--revision", rev, "codir"), 0, false, false) 20 | check(samefile("subdir/foo", "codir/subdir/foo")) 21 | check(samefile("subdir/anotherdir/bar", "codir/subdir/anotherdir/bar")) 22 | -------------------------------------------------------------------------------- /tests/automate_get_current_revision_id/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | function chk() 5 | check(mtn("automate", "get_current_revision_id"), 0, true, false) 6 | rename("stdout", "current") 7 | check(mtn("automate", "get_current_revision"), 0, true) 8 | check(mtn("identify"), 0, true, nil, {"stdout"}) 9 | check(trim(readfile("current")) == trim(readfile("stdout"))) 10 | end 11 | 12 | -- check pending changes against an empty base 13 | 14 | addfile("foo", "this is file foo") 15 | 16 | chk() 17 | 18 | commit() 19 | 20 | -- check changes against a non-empty base 21 | 22 | addfile("bar", "this is file bar") 23 | 24 | chk() 25 | -------------------------------------------------------------------------------- /tests/persistence_of_passphrase/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | check(get("persist.lua")) 5 | 6 | writefile("input.txt", "version 0 of the file\n") 7 | 8 | check(mtn("add", "input.txt"), 0, false, false) 9 | 10 | writefile("input.txt", "version 1 of the file\n") 11 | 12 | check(mtn("--branch=testbranch", "--rcfile=persist.lua", "--message=blah-blah", "commit"), 0, false, false, "tester@test.net\n") 13 | 14 | tsha = base_revision() 15 | 16 | check(mtn("ls", "certs", tsha), 0, true) 17 | rename("stdout", "certs") 18 | 19 | for i,name in pairs{"branch", "author", "date", "changelog"} do 20 | check(qgrep(name, "certs")) 21 | end 22 | -------------------------------------------------------------------------------- /tests/update_with_pending_add/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- This test relies on file-suturing 5 | 6 | addfile("file", "file") 7 | 8 | commit() 9 | 10 | check(mtn("--branch", "testbranch", "co", "codir"), 0, false, false) 11 | 12 | addfile("file2", "file2") 13 | 14 | commit() 15 | 16 | writefile("codir/file2", "file2") 17 | check(indir("codir", mtn("add", "file2")), 0, false, false) 18 | xfail_if(true, indir("codir", mtn("update")), 0, false, false) 19 | 20 | -- make sure there are no changes in the workspace 21 | 22 | check(indir("codir", mtn("diff")), 0, true, false) 23 | check(grep('no changes', "stdout"), 0, false, false) 24 | -------------------------------------------------------------------------------- /tests/usage_output_streams/__driver__.lua: -------------------------------------------------------------------------------- 1 | mtn_setup() 2 | 3 | -- --help output goes to stdout 4 | check(mtn("--help"), 0, true, true) 5 | check(qgrep("Usage:", "stdout")) 6 | check(not qgrep("Usage:", "stderr")) 7 | 8 | check(mtn("status", "--help"), 0, true, true) 9 | check(qgrep("Usage:", "stdout")) 10 | check(not qgrep("Usage:", "stderr")) 11 | 12 | -- but usage errors go to stderr 13 | check(mtn(), 2, true, true) 14 | check(not qgrep("Usage:", "stdout")) 15 | check(qgrep("Usage:", "stderr")) 16 | 17 | check(mtn("db"), 1, true, true) 18 | check(not qgrep("no subcommand specified", "stdout")) 19 | check(qgrep("no subcommand specified", "stderr")) 20 | -------------------------------------------------------------------------------- /tests/invoke_toplevel_group/__driver__.lua: -------------------------------------------------------------------------------- 1 | 2 | mtn_setup() 3 | 4 | -- Invoking a group fails with an appropriate error message. 5 | check(mtn("review"), 1, "", true) 6 | output = readfile("stderr") 7 | check(string.find(output, "is invalid; it is a group") ~= nil) 8 | 9 | -- Invoking an empty group fails with an appropriate error message. 10 | check(mtn("user"), 1, "", true) 11 | output = readfile("stderr") 12 | check(string.find(output, "is invalid; it is a group") ~= nil) 13 | 14 | -- Command completion does not work on groups. 15 | check(mtn("revie"), 1, "", true) 16 | output = readfile("stderr") 17 | check(string.find(output, "unknown command") ~= nil) 18 | --------------------------------------------------------------------------------