tests/test-bookmarks-pushpull.t
branchstable
changeset 35811 e35320ce8043
parent 35792 1d118f9f4f57
child 35815 b5df7fcf5d80
equal deleted inserted replaced
35810:113a30b87716 35811:e35320ce8043
  1171 
  1171 
  1172 #endif
  1172 #endif
  1173 
  1173 
  1174   $ hg -R ../issue4455-dest/ bookmarks
  1174   $ hg -R ../issue4455-dest/ bookmarks
  1175   no bookmarks set
  1175   no bookmarks set
       
  1176 
       
  1177   $ cd ..
       
  1178 
       
  1179 Test that pre-pushkey compat for bookmark works as expected (issue5777)
       
  1180 
       
  1181   $ cat << EOF >> $HGRCPATH
       
  1182   > [ui]
       
  1183   > ssh="$PYTHON" "$TESTDIR/dummyssh"
       
  1184   > [server]
       
  1185   > bookmarks-pushkey-compat = yes
       
  1186   > EOF
       
  1187 
       
  1188   $ hg init server
       
  1189   $ echo foo > server/a
       
  1190   $ hg -R server book foo
       
  1191   $ hg -R server commit -Am a
       
  1192   adding a
       
  1193   $ hg clone ssh://user@dummy/server client
       
  1194   requesting all changes
       
  1195   adding changesets
       
  1196   adding manifests
       
  1197   adding file changes
       
  1198   added 1 changesets with 1 changes to 1 files
       
  1199   new changesets 79513d0d7716
       
  1200   updating to branch default
       
  1201   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
       
  1202 
       
  1203 Forbid bookmark move on the server
       
  1204 
       
  1205   $ cat << EOF >> server/.hg/hgrc
       
  1206   > [hooks]
       
  1207   > prepushkey.no-bm-move= echo \$HG_NAMESPACE | grep -v bookmarks
       
  1208   > EOF
       
  1209 
       
  1210 pushing changeset is okay
       
  1211 
       
  1212   $ echo bar >> client/a
       
  1213   $ hg -R client commit -m b
       
  1214   $ hg -R client push
       
  1215   pushing to ssh://user@dummy/server
       
  1216   searching for changes
       
  1217   remote: adding changesets
       
  1218   remote: adding manifests
       
  1219   remote: adding file changes
       
  1220   remote: added 1 changesets with 1 changes to 1 files
       
  1221 
       
  1222 attempt to move the bookmark is rejected
       
  1223 
       
  1224   $ hg -R client book foo -r .
       
  1225   moving bookmark 'foo' forward from 79513d0d7716
       
  1226 
       
  1227 #if b2-pushkey
       
  1228   $ hg -R client push
       
  1229   pushing to ssh://user@dummy/server
       
  1230   searching for changes
       
  1231   no changes found
       
  1232   remote: pushkey-abort: prepushkey.no-bm-move hook exited with status 1
       
  1233   abort: updating bookmark foo failed!
       
  1234   [255]
       
  1235 #endif
       
  1236 #if b2-binary
       
  1237   $ hg -R client push
       
  1238   pushing to ssh://user@dummy/server
       
  1239   searching for changes
       
  1240   no changes found
       
  1241   remote: prepushkey.no-bm-move hook exited with status 1
       
  1242   abort: push failed on remote
       
  1243   [255]
       
  1244 #endif