Mercurial > hgrepos > DevTools > mercurial-extensions
changeset 269:1e375da37f2e
First part of testing the a merge with yields conflicts (with tool ":merge3")
| author | Franz Glasner <hg@dom66.de> |
|---|---|
| date | Fri, 04 Jan 2019 17:09:30 +0100 |
| parents | bdb0cbc4c515 |
| children | 89ce8d4b55cf |
| files | tests/lib-test-timestamps.sh tests/test-timestamps.t |
| diffstat | 2 files changed, 51 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/lib-test-timestamps.sh Fri Jan 04 16:58:46 2019 +0100 +++ b/tests/lib-test-timestamps.sh Fri Jan 04 17:09:30 2019 +0100 @@ -91,8 +91,12 @@ cat >>files/test2.txt <<EOF CHANGED in the 2nd line of code EOF - touch -d 2017-12-01T07:08:09Z files/test2.txt + touch -d 2017-12-01T07:08:09Z files/test2.txt hg ci -m 'Changed a file in the 2nd code line (file2)' + if [ "$SHOW_OUTPUT" = "1" ]; then + echo "# Check the current local revision id 7" + hg id -n + fi # # Back to the first line @@ -101,6 +105,11 @@ cat >>files/test2.txt <<EOF This is a conflicting change in the first line of code when merging EOF - touch -d 2017-12-01T08:09:10Z files/test2.txt + touch -d 2017-12-01T08:09:10Z files/test2.txt hg ci -m 'Conflicting change of the content of a file in the first line of code (file2.txt)' + if [ "$SHOW_OUTPUT" = "1" ]; then + echo "# Check the current local revision id 8" + hg id -n + fi + cd .. }
--- a/tests/test-timestamps.t Fri Jan 04 16:58:46 2019 +0100 +++ b/tests/test-timestamps.t Fri Jan 04 17:09:30 2019 +0100 @@ -1,6 +1,12 @@ -Setup +1. Setup +======== $ . $TESTDIR/lib-test-timestamps.sh + + +2. Create a test repository with output check +============================================= + $ prepare_repo "ts1" "1" # Check that .hgtimestamps.db is created and included automatically .hgtimestamps @@ -39,3 +45,36 @@ files/test1.txt,2017-12-01T02:03:04Z files/test2.txt,2017-12-01T04:05:06Z files/test4-2.txt,2017-12-01T06:07:08Z + # Check the current local revision id 7 + 7 + # Check the current local revision id 8 + 8 + + +3. Test a failing merge +======================= + + $ prepare_repo "ts2" + $ cd ts2 + $ hg merge -r7 --tool=:merge3 + merging .hgtimestamps.db + merging files/test2.txt + warning: conflicts while merging .hgtimestamps.db! (edit, then use 'hg resolve --mark') + warning: conflicts while merging files/test2.txt! (edit, then use 'hg resolve --mark') + 1 files updated, 0 files merged, 0 files removed, 2 files unresolved + use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon + [1] + $ cat .hgtimestamps.db + version=1 + encoding=binary + files/test1.txt,2017-12-01T02:03:04Z + <<<<<<< working copy: * (glob) + files/test2.txt,2017-12-01T08:09:10Z + files/test3.txt,2017-12-01T05:06:07Z + ||||||| base + files/test2.txt,2017-12-01T04:05:06Z + ======= + files/test2.txt,2017-12-01T07:08:09Z + files/test4-2.txt,2017-12-01T06:07:08Z + >>>>>>> merge rev: * (glob) + $ cd ..
