comparison tests/test-mq-safety @ 12378:ab237534d800 stable

mq: always require --force when pushing patches (issue2363) --force was not necessary when passing --rev since 55578a8d7e84, but this behaviour is usually harmful when branch names are passed instead of explicit revisions.
author Patrick Mezard <pmezard@gmail.com>
date Wed, 22 Sep 2010 23:51:10 +0200
parents 2e3ec7ef5349
children
comparison
equal deleted inserted replaced
12360:4ae3e5dffa60 12378:ab237534d800
60 hg merge default 60 hg merge default
61 hg ci -mmerge 61 hg ci -mmerge
62 hg up default 62 hg up default
63 hg log 63 hg log
64 hg qpush 64 hg qpush
65 cd ..
66
67 echo '% testing applied patches, push and --force'
68 hg init forcepush
69 cd forcepush
70 echo a > a
71 hg ci -Am adda
72 echo a >> a
73 hg ci -m changea
74 hg up 0
75 hg branch branch
76 echo b > b
77 hg ci -Am addb
78 hg up 0
79 hg --cwd .. clone -r 0 forcepush forcepush2
80 echo a >> a
81 hg qnew patch
82 echo '% pushing applied patch with --rev without --force'
83 hg push -r default ../forcepush2
84 echo '% pushing applied patch with branchhash, without --force'
85 hg push ../forcepush2#default
86 echo '% pushing revs excluding applied patch'
87 hg push --new-branch -r branch -r 2 ../forcepush2
88 echo '% pushing applied patch with --force'
89 hg push --force -r default ../forcepush2
90 cd ..