Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce diffs between script implementations #362

Merged
merged 1 commit into from
Sep 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,14 @@ If `make small-test` fails in a branch that you wish to merge into the main
branch, run `make small-test` in the main branch (which should succeed) and also
in your branch, and investigate the differences.

#### Updating the goal files

If you make a change to the mergers that changes merge results, you need to
update the goal files or else reproducibility checks will fail.
Copy certain files from `results/small/` to `test/small-goal-files/`.

To update the reproducibility tests, run `make run-all`.

### Load the stored cache

To decompress the cache run `make decompress-cache`. This is done automatically in `run_combined.sh` if `cache/` does not exist.
Expand Down Expand Up @@ -238,6 +246,8 @@ To investigate differences between two mergers:
* Set `DELETE_WORKDIRS` to `false` in `src/python/variables.py`.
* run `src/python/replay_merge.py --idx INDEX` (maybe add `-test`) for the index of the merge you are interested in.

If the merge is in the small test, you may need to add `--merges_csv ./test/small-goal-files/result.csv`.

## Overwriting results manually

In some cases it might be worth to overwrite the computed results. To do that you should modify the `results/manual_override.csv` file. In that file for the merge you want to overwrite a result of you should include at least the information `repository,merge,left,right` and a new column for the result you want to overwrite. You can overwrite anything you want but if there is a column you don't want to overwrite either do not include that column or leave the entry blanck i.e. `,,`. See the file for an example.
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/adjacent.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./adjacent.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/adjacent_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./adjacent_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/adjacent_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./adjacent.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/git_hires_merge.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./git_hires_merge.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

set -o nounset

Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/git_hires_merge_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./git_hires_merge_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_ort.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_ort.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_ort_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_ort_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_histogram.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_histogram.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_histogram_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_DIR="$(dirname "$0")"
clone_dir=$1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_ignorespace_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_minimal.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_minimal.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_minimal_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_minimal_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_myers.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_myers.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_myers_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_myers_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_recursive_patience.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_patience.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_recursive_patience_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_resolve.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# usage: ./gitmerge_resolve.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/gitmerge_resolve_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./gitmerge_resolve_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/imports.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./imports.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/imports_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./imports_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/intellimerge.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./intellimerge.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>
# <clone_dir> must contain a clone of a repository.
# Merges branch2 into branch1, in <clone_dir>.
# Return code is 0 for merge success, 1 for merge failure, 2 for script failure.
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/intellimerge_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./intellimerge_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/ivn.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./ivn.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/ivn_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./ivn_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/spork.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./spork.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>
# <clone_dir> must contain a clone of a repository.
# Merges branch2 into branch1, in <clone_dir>.
# Return code is 0 for merge success, 1 for merge failure, 2 for script failure.
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/spork_plus.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./spork_plus.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/version_numbers.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./version_numbers.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/merge_tools/version_numbers_ignorespace.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env sh

# usage: ./version_numbers_ignorespace.sh <clone_dir> <branch-1> <branch-2>
# usage: <scriptname> <clone_dir> <branch-1> <branch-2>

MERGE_SCRIPTS_DIR="$(cd "$(dirname "$0")" && pwd -P)"
clone_dir=$1
Expand Down