# HG changeset patch # User Matt Harbison # Date 2018-08-19 03:39:26 # Node ID 7a111168659ebdad63f19f5c9d6e3ec6ec7ba98e # Parent d39b1f7e5dcf854a6a18f32043bd2da2c538a459 tests: stabilize test-merge-tools.t on Windows More fun with `hg import --bypass` to work around Windows limitations. The diffs were generated on Linux, and had a tab to terminate the `+++b/...` lines. But check-code complained about trailing whitespace, and it seems to run without them. diff --git a/tests/test-merge-tools.t b/tests/test-merge-tools.t --- a/tests/test-merge-tools.t +++ b/tests/test-merge-tools.t @@ -1701,6 +1701,35 @@ for Unix-like permission) 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ hg update -C 1 > /dev/null + +#else + +Match the non-portable filename commits above for test stability + + $ hg import --bypass -q - << EOF + > # HG changeset patch + > revision 5 + > + > diff --git a/"; exit 1; echo " b/"; exit 1; echo " + > new file mode 100644 + > --- /dev/null + > +++ b/"; exit 1; echo " + > @@ -0,0 +1,1 @@ + > +revision 5 + > EOF + + $ hg import --bypass -q - << EOF + > # HG changeset patch + > revision 6 + > + > diff --git a/"; exit 1; echo " b/"; exit 1; echo " + > new file mode 100644 + > --- /dev/null + > +++ b/"; exit 1; echo " + > @@ -0,0 +1,1 @@ + > +revision 6 + > EOF + #endif Merge post-processing @@ -1760,14 +1789,41 @@ missingbinary is a merge-tool that doesn 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) -#if symlink + $ hg update -q -C 1 + $ rm f internal merge cannot handle symlinks and shouldn't try: - $ hg update -q -C 1 - $ rm f +#if symlink + $ ln -s symlink f $ hg commit -qm 'f is symlink' + +#else + + $ hg import --bypass -q - << EOF + > # HG changeset patch + > f is symlink + > + > diff --git a/f b/f + > old mode 100644 + > new mode 120000 + > --- a/f + > +++ b/f + > @@ -1,2 +1,1 @@ + > -revision 1 + > -space + > +symlink + > \ No newline at end of file + > EOF + +Resolve 'other [destination] changed f which local [working copy] deleted' prompt + $ hg up -q -C --config ui.interactive=True << EOF + > c + > EOF + +#endif + $ hg merge -r 2 --tool internal:merge merging f warning: internal :merge cannot merge symlinks for f @@ -1776,8 +1832,6 @@ internal merge cannot handle symlinks an use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon [1] -#endif - Verify naming of temporary files and that extension is preserved: $ hg update -q -C 1