comparison tests/test-bundle-r.t @ 51280:c17cf2d51ff4 stable

bundle: do not detect --base argument that match nothing as lack of argument With the previous version of the code, if --base did not match anything, it will be handled as if no --base was provided and will fallback to using discovery with the default path. This has two issues : - The resulting bundle won't match what the user requested, - if not default path is configured, it will crash. We now properly distinct between the two cases and if the --base query does not find any changeset, we will assume that everything under --rev needs to be sent.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 27 Dec 2023 18:02:26 +0100
parents 51021612aea7
children
comparison
equal deleted inserted replaced
51279:51021612aea7 51280:c17cf2d51ff4
139 6 changesets found 139 6 changesets found
140 $ hg -R test bundle --base 2 --all test-bundle-all-2.hg 140 $ hg -R test bundle --base 2 --all test-bundle-all-2.hg
141 ignoring --base because --all was specified 141 ignoring --base because --all was specified
142 9 changesets found 142 9 changesets found
143 $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-with-dest.hg --config paths.default=$TESTTMP/test-3 143 $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-with-dest.hg --config paths.default=$TESTTMP/test-3
144 searching for changes (known-bad-output !) 144 5 changesets found
145 1 changesets found (known-bad-output !)
146 5 changesets found (missing-correct-output !)
147 $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-no-dest.hg 145 $ hg -R test bundle --base 3-3 -r tip test-base-match-nothing-no-dest.hg
148 config error: default repository not configured! (known-bad-output !) 146 5 changesets found
149 (see 'hg help config.paths') (known-bad-output !)
150 5 changesets found (missing-correct-output !)
151 [30]
152 $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg 147 $ hg -R test bundle --base 3 -r tip test-bundle-should-fail.hg
153 1 changesets found 148 1 changesets found
154 149
155 empty bundle 150 empty bundle
156 151