Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
46720:66fb04552122 | 46721:e3f15c553522 |
---|---|
144 hg: parse error at 1: not a prefix: end | 144 hg: parse error at 1: not a prefix: end |
145 (( | 145 (( |
146 ^ here) | 146 ^ here) |
147 [10] | 147 [10] |
148 | 148 |
149 default :pushrev is taking in account | |
150 | |
151 $ echo babar > foo | |
152 $ hg ci -m 'extra commit' | |
153 $ hg up '.^' | |
154 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
155 $ echo celeste > foo | |
156 $ hg ci -m 'extra other commit' | |
157 created new head | |
158 $ cat >> .hg/hgrc << EOF | |
159 > [paths] | |
160 > other = file://$WD/../pushurldest | |
161 > *:pushrev = . | |
162 > EOF | |
163 $ hg push other | |
164 pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) | |
165 searching for changes | |
166 adding changesets | |
167 adding manifests | |
168 adding file changes | |
169 added 1 changesets with 1 changes to 1 files | |
170 $ hg push file://$WD/../pushurldest | |
171 pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) | |
172 searching for changes | |
173 no changes found | |
174 [1] | |
175 | |
176 for comparison, pushing everything would give different result | |
177 | |
178 $ hg push file://$WD/../pushurldest --rev 'all()' | |
179 pushing to file:/*/$TESTTMP/pushurlsource/../pushurldest (glob) | |
180 searching for changes | |
181 abort: push creates new remote head 1616ce7cecc8 | |
182 (merge or see 'hg help push' for details about pushing new heads) | |
183 [20] | |
184 | |
149 $ cd .. | 185 $ cd .. |