Mercurial > hg
comparison tests/test-merge-tools.t @ 39266:82555d7186d0
filemerge: make capability check for internal tools ignore merge-tools section
This is follow up of 4d7b11877dd0.
Before this patch, capability check of internal merge tools falls back
to _toolbool(), which examines configurations in "merge-tools" section.
But "hg help config" explicitly says that "merge-tools" section
configures external merge tools.
Therefore, this patch makes capability check for internal tools in
hascapability() always ignore configurations in merge-tools section.
In this patch, command line configurations below are added at tests in
tests/test-merge-tools.t, in order to confirm that explicit
configuration is intentionally ignored at tool selection.
--config merge-tools.:INTERNAL_TOOL.CAPABILITY=true
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 22 Aug 2018 13:57:01 +0900 |
parents | 7a111168659e |
children | 5abc47d4ca6b |
comparison
equal
deleted
inserted
replaced
39265:f98d3c57906f | 39266:82555d7186d0 |
---|---|
1895 $ hg merge --abort -q | 1895 $ hg merge --abort -q |
1896 | 1896 |
1897 (for ui.merge, ignored unintentionally) | 1897 (for ui.merge, ignored unintentionally) |
1898 | 1898 |
1899 $ hg merge 9 \ | 1899 $ hg merge 9 \ |
1900 > --config merge-tools.:other.binary=true \ | |
1900 > --config ui.merge=:other | 1901 > --config ui.merge=:other |
1901 tool :other (for pattern b) can't handle binary | 1902 tool :other (for pattern b) can't handle binary |
1902 tool true can't handle binary | 1903 tool true can't handle binary |
1904 tool :other can't handle binary | |
1903 tool false can't handle binary | 1905 tool false can't handle binary |
1904 no tool found to merge b | 1906 no tool found to merge b |
1905 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for b? u | 1907 keep (l)ocal [working copy], take (o)ther [merge rev], or leave (u)nresolved for b? u |
1906 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 1908 0 files updated, 0 files merged, 0 files removed, 1 files unresolved |
1907 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | 1909 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon |
1916 0000: 03 02 01 00 |....| | 1918 0000: 03 02 01 00 |....| |
1917 | 1919 |
1918 (for merge-patterns) | 1920 (for merge-patterns) |
1919 | 1921 |
1920 $ hg merge 9 --config merge.strict-capability-check=true \ | 1922 $ hg merge 9 --config merge.strict-capability-check=true \ |
1923 > --config merge-tools.:merge-other.binary=true \ | |
1921 > --config merge-patterns.b=:merge-other \ | 1924 > --config merge-patterns.b=:merge-other \ |
1922 > --config merge-patterns.re:[a-z]=:other | 1925 > --config merge-patterns.re:[a-z]=:other |
1923 tool :merge-other (for pattern b) can't handle binary | 1926 tool :merge-other (for pattern b) can't handle binary |
1924 0 files updated, 1 files merged, 0 files removed, 0 files unresolved | 1927 0 files updated, 1 files merged, 0 files removed, 0 files unresolved |
1925 (branch merge, don't forget to commit) | 1928 (branch merge, don't forget to commit) |
1985 (by default, it is assumed that no internal merge tools has symlinks | 1988 (by default, it is assumed that no internal merge tools has symlinks |
1986 capability) | 1989 capability) |
1987 | 1990 |
1988 $ hg debugpickmergetool \ | 1991 $ hg debugpickmergetool \ |
1989 > -r 6d00b3726f6e \ | 1992 > -r 6d00b3726f6e \ |
1993 > --config merge-tools.:merge-other.symlink=true \ | |
1990 > --config merge-patterns.f=:merge-other \ | 1994 > --config merge-patterns.f=:merge-other \ |
1991 > --config merge-patterns.re:[f]=:merge-local \ | 1995 > --config merge-patterns.re:[f]=:merge-local \ |
1992 > --config merge-patterns.re:[a-z]=:other | 1996 > --config merge-patterns.re:[a-z]=:other |
1993 f = :prompt | 1997 f = :prompt |
1994 | 1998 |
1995 $ hg debugpickmergetool \ | 1999 $ hg debugpickmergetool \ |
1996 > -r 6d00b3726f6e \ | 2000 > -r 6d00b3726f6e \ |
2001 > --config merge-tools.:other.symlink=true \ | |
1997 > --config ui.merge=:other | 2002 > --config ui.merge=:other |
1998 f = :prompt | 2003 f = :prompt |
1999 | 2004 |
2000 (with strict-capability-check=true, actual symlink capabilities are | 2005 (with strict-capability-check=true, actual symlink capabilities are |
2001 checked striclty) | 2006 checked striclty) |
2002 | 2007 |
2003 $ hg debugpickmergetool --config merge.strict-capability-check=true \ | 2008 $ hg debugpickmergetool --config merge.strict-capability-check=true \ |
2004 > -r 6d00b3726f6e \ | 2009 > -r 6d00b3726f6e \ |
2010 > --config merge-tools.:merge-other.symlink=true \ | |
2005 > --config merge-patterns.f=:merge-other \ | 2011 > --config merge-patterns.f=:merge-other \ |
2006 > --config merge-patterns.re:[f]=:merge-local \ | 2012 > --config merge-patterns.re:[f]=:merge-local \ |
2007 > --config merge-patterns.re:[a-z]=:other | 2013 > --config merge-patterns.re:[a-z]=:other |
2008 f = :other | 2014 f = :other |
2009 | 2015 |
2010 $ hg debugpickmergetool --config merge.strict-capability-check=true \ | 2016 $ hg debugpickmergetool --config merge.strict-capability-check=true \ |
2011 > -r 6d00b3726f6e \ | 2017 > -r 6d00b3726f6e \ |
2012 > --config ui.merge=:other | 2018 > --config ui.merge=:other |
2013 f = :other | 2019 f = :other |
2014 | 2020 |
2021 $ hg debugpickmergetool --config merge.strict-capability-check=true \ | |
2022 > -r 6d00b3726f6e \ | |
2023 > --config merge-tools.:merge-other.symlink=true \ | |
2024 > --config ui.merge=:merge-other | |
2025 f = :prompt | |
2026 | |
2015 #endif | 2027 #endif |
2016 | 2028 |
2017 (--verbose shows some configurations) | 2029 (--verbose shows some configurations) |
2018 | 2030 |
2019 $ hg debugpickmergetool --tool foobar -v | 2031 $ hg debugpickmergetool --tool foobar -v |