365 $ mkdir thisdir |
365 $ mkdir thisdir |
366 $ hg init thisdir/orig |
366 $ hg init thisdir/orig |
367 $ hg share -U thisdir/orig thisdir/abs |
367 $ hg share -U thisdir/orig thisdir/abs |
368 $ hg share -U --relative thisdir/abs thisdir/rel |
368 $ hg share -U --relative thisdir/abs thisdir/rel |
369 $ cat thisdir/rel/.hg/sharedpath |
369 $ cat thisdir/rel/.hg/sharedpath |
370 ../../orig/.hg (no-eol) |
370 ../../orig/.hg (no-eol) (glob) |
371 $ grep shared thisdir/*/.hg/requires |
371 $ grep shared thisdir/*/.hg/requires |
372 thisdir/abs/.hg/requires:shared |
372 thisdir/abs/.hg/requires:shared |
373 thisdir/rel/.hg/requires:shared |
373 thisdir/rel/.hg/requires:shared |
374 thisdir/rel/.hg/requires:relshared |
374 thisdir/rel/.hg/requires:relshared |
375 |
375 |
376 test that relative shared paths aren't relative to $PWD |
376 test that relative shared paths aren't relative to $PWD |
377 |
377 |
378 $ cd thisdir |
378 $ cd thisdir |
379 $ hg -R rel root |
379 $ hg -R rel root |
380 $TESTTMP/thisdir/rel |
380 $TESTTMP/thisdir/rel (glob) |
381 $ cd .. |
381 $ cd .. |
382 |
382 |
383 now test that relative paths really are relative, survive across |
383 now test that relative paths really are relative, survive across |
384 renames and changes of PWD |
384 renames and changes of PWD |
385 |
385 |
386 $ hg -R thisdir/abs root |
386 $ hg -R thisdir/abs root |
387 $TESTTMP/thisdir/abs |
387 $TESTTMP/thisdir/abs (glob) |
388 $ hg -R thisdir/rel root |
388 $ hg -R thisdir/rel root |
389 $TESTTMP/thisdir/rel |
389 $TESTTMP/thisdir/rel (glob) |
390 $ mv thisdir thatdir |
390 $ mv thisdir thatdir |
391 $ hg -R thatdir/abs root |
391 $ hg -R thatdir/abs root |
392 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/thisdir/orig/.hg! |
392 abort: .hg/sharedpath points to nonexistent directory $TESTTMP/thisdir/orig/.hg! (glob) |
393 [255] |
393 [255] |
394 $ hg -R thatdir/rel root |
394 $ hg -R thatdir/rel root |
395 $TESTTMP/thatdir/rel |
395 $TESTTMP/thatdir/rel (glob) |
396 |
396 |
397 test unshare relshared repo |
397 test unshare relshared repo |
398 |
398 |
399 $ cd thatdir/rel |
399 $ cd thatdir/rel |
400 $ hg unshare |
400 $ hg unshare |