906 abort: fail after finalization |
906 abort: fail after finalization |
907 [255] |
907 [255] |
908 *** runcommand log |
908 *** runcommand log |
909 0 bar (bar) |
909 0 bar (bar) |
910 *** runcommand verify -q |
910 *** runcommand verify -q |
|
911 |
|
912 $ cd .. |
|
913 |
|
914 Test symlink traversal over cached audited paths: |
|
915 ------------------------------------------------- |
|
916 |
|
917 #if symlink |
|
918 |
|
919 set up symlink hell |
|
920 |
|
921 $ mkdir merge-symlink-out |
|
922 $ hg init merge-symlink |
|
923 $ cd merge-symlink |
|
924 $ touch base |
|
925 $ hg commit -qAm base |
|
926 $ ln -s ../merge-symlink-out a |
|
927 $ hg commit -qAm 'symlink a -> ../merge-symlink-out' |
|
928 $ hg up -q 0 |
|
929 $ mkdir a |
|
930 $ touch a/poisoned |
|
931 $ hg commit -qAm 'file a/poisoned' |
|
932 $ hg log -G -T '{rev}: {desc}\n' |
|
933 @ 2: file a/poisoned |
|
934 | |
|
935 | o 1: symlink a -> ../merge-symlink-out |
|
936 |/ |
|
937 o 0: base |
|
938 |
|
939 |
|
940 try trivial merge after update: cache of audited paths should be discarded, |
|
941 and the merge should fail (issue5628) |
|
942 |
|
943 $ hg up -q null |
|
944 >>> from hgclient import readchannel, runcommand, check |
|
945 >>> @check |
|
946 ... def merge(server): |
|
947 ... readchannel(server) |
|
948 ... # audit a/poisoned as a good path |
|
949 ... runcommand(server, ['up', '-qC', '2']) |
|
950 ... runcommand(server, ['up', '-qC', '1']) |
|
951 ... # here a is a symlink, so a/poisoned is bad |
|
952 ... runcommand(server, ['merge', '2']) |
|
953 *** runcommand up -qC 2 |
|
954 *** runcommand up -qC 1 |
|
955 *** runcommand merge 2 |
|
956 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
957 (branch merge, don't forget to commit) |
|
958 $ ls ../merge-symlink-out |
|
959 poisoned |
|
960 |
|
961 cache of repo.auditor should be discarded, so matcher would never traverse |
|
962 symlinks: |
|
963 |
|
964 $ hg up -qC 0 |
|
965 $ touch ../merge-symlink-out/poisoned |
|
966 >>> from hgclient import readchannel, runcommand, check |
|
967 >>> @check |
|
968 ... def files(server): |
|
969 ... readchannel(server) |
|
970 ... runcommand(server, ['up', '-qC', '2']) |
|
971 ... # audit a/poisoned as a good path |
|
972 ... runcommand(server, ['files', 'a/poisoned']) |
|
973 ... runcommand(server, ['up', '-qC', '0']) |
|
974 ... runcommand(server, ['up', '-qC', '1']) |
|
975 ... # here 'a' is a symlink, so a/poisoned should be warned |
|
976 ... runcommand(server, ['files', 'a/poisoned']) |
|
977 *** runcommand up -qC 2 |
|
978 *** runcommand files a/poisoned |
|
979 a/poisoned |
|
980 *** runcommand up -qC 0 |
|
981 *** runcommand up -qC 1 |
|
982 *** runcommand files a/poisoned |
|
983 [1] |
|
984 |
|
985 $ cd .. |
|
986 |
|
987 #endif |