scmutil: handle conflicting files and dirs in origbackuppath
When ui.origbackuppath is set, .orig files are stored outside of the working
copy. However conflicts can occur when files or directories end up having the
same name. These conflicts cause Mercurial to abort, even if they've been
created as a result of different backups.
Make sure we always replace files or directories in the origbackuppath if
they conflict with another file or directory.
Test Plan:
Add new unit test for conflicting paths.
Differential Revision: https://phab.mercurial-scm.org/D680
extdata: show debug message if external command exits with non-zero status
This isn't fatal because it's quite common for grep to exit with 1. Thanks to
Foozy for spotting this.
templatekw: allow accessing to nested namespace item by its template name
Since we have the dot operator, it makes more sense to write
{namespaces.tags % "{tag}"}
instead of
{namespaces.tags % "{name}"}
templatekw: rename peerpaths to peerurls per naming convention (BC)
Since each element is called as "url", the template keyword should be named
as "<whatever>urls".
{peerurls} is now stabilized.
templatekw: make experimental {peerpaths} return a single-level dict (BC)
This was planned as in
c0d8de2724ce, "{peerpaths.default.pushurl} will be
translated to peerpaths['default'].makemap()['pushurl'], which means
{peerpaths} should be a single-level dict and sub-options should be
makemap()-ed."
templatekw: fix scope of peerpath url bound to generator
I had to explicitly bind 'd' to the generator. Otherwise, the last 'd' would
be used.