# HG changeset patch # User Martin von Zweigbergk # Date 1412827650 25200 # Node ID 41770cee3c6a3eeddce8f7cd9807f87c91c31e0b # Parent dfad19274d85eda8ab130e79bcb0cf142720dce3 test-resolve: add test resolving one of two files The tests for resolve are missing a lot of cases. Let's start by adding another file to the test repo, so we can test resolving one of two files. diff -r dfad19274d85 -r 41770cee3c6a tests/test-resolve.t --- a/tests/test-resolve.t Wed Oct 08 21:19:31 2014 -0700 +++ b/tests/test-resolve.t Wed Oct 08 21:07:30 2014 -0700 @@ -3,33 +3,37 @@ $ hg init repo $ cd repo - $ echo foo > file - $ hg commit -Am 'add file' - adding file + $ echo foo > file1 + $ echo foo > file2 + $ hg commit -Am 'add files' + adding file1 + adding file2 - $ echo bar >> file - $ hg commit -Am 'append bar' - + $ echo bar >> file1 + $ echo bar >> file2 + $ hg commit -Am 'append bar to files' create a second head $ hg up -C 0 - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ echo baz >> file - $ hg commit -Am 'append baz' + 2 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo baz >> file1 + $ echo baz >> file2 + $ hg commit -Am 'append baz to files' created new head failing merge $ hg merge --tool=internal:fail - 0 files updated, 0 files merged, 0 files removed, 1 files unresolved + 0 files updated, 0 files merged, 0 files removed, 2 files unresolved use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon [1] -resolve -l should contain an unresolved entry +resolve -l should contain unresolved entries $ hg resolve -l - U file + U file1 + U file2 resolving an unknown path should emit a warning @@ -38,8 +42,18 @@ resolve the failure - $ echo resolved > file - $ hg resolve -m file + $ echo resolved > file1 + $ hg resolve -m file1 + +resolve -l should show resolved file as resolved + + $ hg resolve -l + R file1 + U file2 + +resolve -m without paths should mark all resolved + + $ hg resolve -m (no more unresolved files) $ hg commit -m 'resolved'