view tests/test-default-push @ 5980:dcda0c90125c

mq: pop/refresh: avoid losing revisions not managed by mq We already disallow committing on top of an mq revision exactly to avoid losing this new revision during a qpop/qrefresh, so this can be seen as an additional safety check. If this is not enough to fix issue844, it should at least prevent it from happening.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 03 Feb 2008 21:03:46 -0200
parents 6dbb8ae0a0b3
children
line wrap: on
line source

#!/bin/sh

hg init a
echo a > a/a
hg --cwd a ci -Ama

hg clone a c

hg clone a b
echo b >> b/a
hg --cwd b ci -mb

echo % push should push to default when default-push not set
hg --cwd b push | sed 's/pushing to.*/pushing/'

echo % push should push to default-push when set
echo 'default-push = ../c' >> b/.hg/hgrc
hg --cwd b push | sed 's/pushing to.*/pushing/'