Mercurial > hg-stable
changeset 52110:3e7b9357bbb8
tests: add coverage to for `HGCB_BUNDLE_BASENAME` with special characters
Per request on IRC, to show the behavior of dropping the quoting of
`HGCB_BUNDLE_BASENAME` in the next commit. This current failure is basically
the same error and output that currently happens on Windows with any path (even
without the embedded quote). The only difference is Windows doesn't print the
`cp: cannot stat ...` line.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Mon, 21 Oct 2024 15:24:55 -0400 |
parents | 87faafd6ea83 |
children | 93484d43be22 |
files | tests/test-clonebundles-autogen.t |
diffstat | 1 files changed, 28 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-clonebundles-autogen.t Tue Oct 15 18:58:47 2024 -0400 +++ b/tests/test-clonebundles-autogen.t Mon Oct 21 15:24:55 2024 -0400 @@ -58,6 +58,34 @@ $ hg -q commit -A -m 'add foo' $ touch bar $ hg -q commit -A -m 'add bar' + +Test that the HGCB_BUNDLE_BASENAME variable behaves as expected when unquoted. +#if no-windows + $ hg clone ../server '../embed-"-name/server' + updating to branch default + 0 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ cp ../server/.hg/hgrc '../embed-"-name/server/.hg/hgrc' + + $ mv ../final-upload/ ../final-upload.bak/ + $ mkdir ../final-upload/ + + $ hg push --config paths.default='../embed-"-name/server' + pushing to $TESTTMP/embed-"-name/server + searching for changes + adding changesets + adding manifests + adding file changes + 2 changesets found + cp: cannot stat ''\''$TESTTMP/embed-"-name/server/.hg/tmp-bundles/full-bzip2-v2-2_revs-aaff8d2ffbbf_tip-*_txn.hg'\''': $ENOENT$ (glob) + abort: command returned status 1: cp "$HGCB_BUNDLE_PATH" "$TESTTMP"/final-upload/ + added 2 changesets with 2 changes to 2 files + clone-bundles: starting bundle generation: bzip2-v2 + +Restore the original upload directory for windows test consistency + $ rm -r ../final-upload/ + $ mv ../final-upload.bak/ ../final-upload/ +#endif + $ hg push pushing to $TESTTMP/server searching for changes