Mercurial > hg
diff tests/test-default-push.t @ 46721:e3f15c553522
paths: add a `*` special path to define default sub option
Differential Revision: https://phab.mercurial-scm.org/D10163
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 11 Mar 2021 11:22:54 +0100 |
parents | 95c4cca641f6 |
children | 56d441256e82 |
line wrap: on
line diff
--- a/tests/test-default-push.t Thu Mar 11 17:26:49 2021 +0100 +++ b/tests/test-default-push.t Thu Mar 11 11:22:54 2021 +0100 @@ -146,4 +146,40 @@ ^ here) [10] +default :pushrev is taking in account + + $ echo babar > foo + $ hg ci -m 'extra commit' + $ hg up '.^' + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ echo celeste > foo + $ hg ci -m 'extra other commit' + created new head + $ cat >> .hg/hgrc << EOF + > [paths] + > other = file://$WD/../pushurldest + > *:pushrev = . + > EOF + $ hg push other + pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 1 changes to 1 files + $ hg push file://$WD/../pushurldest + pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) + searching for changes + no changes found + [1] + +for comparison, pushing everything would give different result + + $ hg push file://$WD/../pushurldest --rev 'all()' + pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) + searching for changes + abort: push creates new remote head 1616ce7cecc8 + (merge or see 'hg help push' for details about pushing new heads) + [20] + $ cd ..