Lines Matching defs:file

62 # The various states of the comparison of a file between two trees.
72 # For an given file, there are three different pair-wise
79 # as a file merge that results in conflicts versus one that
105 echo "foo" > $i/equal/equal/equal/file
110 # /equal/first/first: The file is missing from the test
114 echo "foo" > $i/equal/first/first/file
119 # /equal/difftype/difftype: The local file is a different
128 # /equal/difflinks/difflinks: The local file is a modified
135 # /equal/difffiles/difffiles: The local file is a modified
136 # file. Nothing should happen.
138 echo "foo" > $i/equal/difffiles/difffiles/file
140 echo "bar" > $TEST/equal/difffiles/difffiles/file
146 echo "foo" > $i/first/equal/second/file
150 echo "foo" > $i/first/equal/second/fulldir/file
153 # /first/equal/*: Cannot occur. If the file is missing from
159 echo "foo" > $OLD/first/first/equal/file
166 # /first/second/*: Cannot happen, if the file is in old for
174 # /first/difftype/*: Cannot happen since the file is missing
182 # /first/difflinks/*: Cannot happen since the file is missing
185 # /first/difffiles/second: Modified file removed. Should
187 echo "foo" > $OLD/first/difffiles/second/file
188 echo "bar" > $TEST/first/difffiles/second/file
190 # /first/difffiles/*: Cannot happen since the file is missing
193 # /second/equal/first: Added a new file that isn't present in
195 echo "bar" > $NEW/second/equal/first/file
200 echo "foo" > $NEW/second/equal/first/fulldir/file
202 # /second/equal/*: Cannot happen since the file is missing
205 # /second/first/*: Cannot happen since the file is missing
208 # /second/second/equal: Newly added file is already present in
209 # the test directory and identical to the new file. Nothing
213 echo "foo" > $i/second/second/equal/file
218 # /second/second/first: Cannot happen. The file is in dest in
221 # /second/second/second: Cannot happen. The file is in new in
224 # /second/second/difftype: Newly added file conflicts with
225 # existing file in test tree of a different type. Should
235 # /second/second/difffiles: Newly added file conflicts with
236 # existing file in test tree. Should generate a warning.
237 echo "new" > $NEW/second/second/difffiles/file
238 echo "test" > $TEST/second/second/difffiles/file
240 # /second/difftype/*: Cannot happen since the file is missing
243 # /second/difflinks/*: Cannot happen since the file is missing
246 # /second/difffiles/*: Cannot happen since the file is missing
249 # /difftype/equal/difftype: Unmodified file has changed type.
250 # File should be updated to the new file. In the 'todir' case
253 echo "foo" > $i/difftype/equal/difftype/file
257 ln -s "test" $NEW/difftype/equal/difftype/file
261 # /difftype/equal/*: Cannot happen. Since the old file is a
262 # difftype from the new file and the test file is identical to
263 # the old file, the test file must be a difftype from the new
264 # file.
266 # /difftype/first/first: A removed file has changed type.
271 # /difftype/first/*: Cannot happen. Since the new file exists
272 # and the dest file is missing, the last test must be 'first'.
274 # /difftype/second/*: Cannot happen. The old file exists in
277 # /difftype/difftype/equal: A file has changed type, but the
278 # file in the test directory already matches the new file. Do
281 mkfifo $OLD/difftype/difftype/equal/file
284 echo "bar" > $i/difftype/difftype/equal/file
287 # /difftype/difftype/first: Cannot happen. The dest file
290 # /difftype/difftype/second: Cannot happen. The new file
303 # /difftype/difftype/difflinks: A file has changed from a
311 # /difftype/difftype/difffile: A file has changed from a
312 # non-regular file to a regular file in both the new and test
314 # This should generate a new file conflict.
315 ln -s "old" $OLD/difftype/difftype/difffiles/file
316 echo "foo" > $NEW/difftype/difftype/difffiles/file
317 echo "bar" > $TEST/difftype/difftype/difffiles/file
334 # /difflinks/first/*: Cannot happen. Since the test file is
343 # changed to a different file type in the test tree. This
350 # are both links and the test file is not a link, so the third
372 # /difflinks/difffiles/*: Cannot happen. The old file is a
373 # link in the first test, so it cannot be a regular file in
376 # /difffiles/equal/difffiles: An unmodified file has been
377 # changed in new tree. The file should be updated to the new
380 echo "foo" > $i/difffiles/equal/difffiles/file
382 echo "bar" > $NEW/difffiles/equal/difffiles/file
384 # /difffiles/equal/*: Cannot happen. Since the old file is
385 # identical to the test file, the third test must be
388 # /difffiles/first/first: A removed file has been changed in
390 echo "foo" > $OLD/difffiles/first/first/file
391 echo "bar" > $NEW/difffiles/first/first/file
393 # /difffiles/first/*: Cannot happen. The new file is a
394 # regular file from the first test and the test file is
398 # /difffiles/second/*: Cannot happen. The old file is present
401 # /difffiles/difftype/difftype: An updated regular file has
402 # been changed to a different file type in the test tree.
404 echo "old" > $OLD/difffiles/difftype/difftype/file
405 echo "new" > $NEW/difffiles/difftype/difftype/file
406 mkfifo $TEST/difffiles/difftype/difftype/file
408 # /difffiles/difftype/*: Cannot happen. The new file is known
409 # to be a regular file from the first test, and the test file
410 # is known to exist as a different file type from the second
413 # /difffiles/difflink/*: Cannot happen. The old file is known
414 # to be a regular file from the first test, so it cannot be a
417 # /difffiles/difffiles/equal: An updated regular file has
418 # already been updated to match the new file in the test tree.
420 echo "foo" > $OLD/difffiles/difffiles/equal/file
422 echo "bar" > $i/difffiles/difffiles/equal/file
425 # /difffiles/difffiles/difffiles: A modified regular file was
427 # to the new file if possible. If the merge fails, a conflict
443 this is an old file
446 this is a new file
449 this is a test file
453 # tests, all three files are regular files. The test file can
454 # either be identical to the new file ('equal') or not
460 # /adddir/conflict: Add a new file in a directory that already
461 # exists as a file. This should generate two warnings.
466 # /adddir/partial: Add a new file in a directory. The
468 # different local file. The new file from the new tree should
473 echo "foo" > $NEW/adddir/partial/file
479 # /rmdir/extra: Do not remove a directory with an extra local file.
487 # remove file. This should generate a warning.
500 echo "foo" > $OLD/rmdir/partial/subdir/file
510 # file without conflicts where the test tree already has the
511 # new file. Nothing should happen.
518 # /dirchange/already/todir: Convert an unmodified file to a
527 # /dirchange/old/fromdir: Convert a directory tree to a file.
535 # /dirchange/old/todir: Convert a file to a directory tree.
536 # The old file is unmodified and should be changed to the new
542 echo "bar" > $NEW/dirchange/old/todir/file
545 # file. The test tree includes an extra file in the directory
550 echo "foo" > $i/dirchange/fromdir/extradir/file
556 # file. The test tree includes a local change that generates
565 # /dirchange/todir/difffile: Convert a file to a directory
567 # file so that the conversion fails with a warning.
570 echo "baz" > $NEW/dirchange/todir/difffile/file
574 # the conflict is due to a change in the file type.
577 echo "baz" > $NEW/dirchange/todir/difftype/file
629 # $1 - relative path to file that should be missing from TEST
637 # $1 - relative path to file that should be present in TEST
645 # $1 - relative path to file that should be a fifo in TEST
653 # $1 - relative path to file that should be a directory in TEST
661 # $1 - relative path to file that should be a symlink in TEST
677 # $1 - relative path to regular file that should be present in TEST
678 # $2 - optional string that should match file contents
680 file()
685 echo "File $1 should be a regular file"
699 # $1 - relative path to a regular file that should have a conflict
700 # $2 - optional MD5 of the conflict file contents
722 file /equal/equal/equal/file "foo"
728 missing /equal/first/first/file
733 file /equal/difftype/difftype/fifo "bar"
740 file /equal/difffiles/difffiles/file "bar"
744 missing /first/equal/second/file
751 missing /first/first/equal/file
762 file /first/difffiles/second/file "bar"
765 file /second/equal/first/file "bar"
769 file /second/equal/first/fulldir/file "foo"
773 file /second/second/equal/file "foo"
784 file /second/second/difffiles/file "test"
785 conflict /second/second/difffiles/file 4f2ee8620a251fd53f06bb6112eb6ffa
788 link /difftype/equal/difftype/file "test"
797 file /difftype/difftype/equal/file "bar"
800 file /difftype/difftype/difftype/one "foo"
807 conflict /difftype/difftype/difffiles/file \
817 file /difflinks/difftype/difftype/link "test"
826 file /difffiles/equal/difffiles/file "bar"
829 missing /difffiles/first/first/file
832 fifo /difffiles/difftype/difftype/file
835 file /difffiles/difffiles/equal/file "bar"
838 file /difffiles/difffiles/difffiles/simple "" \
840 file /difffiles/difffiles/difffiles/conflict "this is a test file"
845 file /adddir/conflict
848 file /adddir/partial/file "foo"
853 file /rmdir/extra/localfile.txt "foo"
863 file /dirchange/already/fromdir "bar"
866 file /dirchange/already/todir/somefile "blah"
869 file /dirchange/old/fromdir "bar"
872 file /dirchange/old/todir/file "bar"
875 missing /dirchange/fromdir/extradir/file
879 file /dirchange/fromdir/conflict/somefile "bar"
882 file /dirchange/todir/difffile "bar"
888 file /etc/master.passwd
889 file /etc/passwd
890 file /etc/pwd.db
891 file /etc/spwd.db
892 file /etc/login.conf "" 7774a0f9a3a372c7c109c32fd31c4b6b
893 file /etc/login.conf.db
894 file /etc/mail/aliases "" 7d598f89ec040ab56af54011bdb83337
910 D /dirchange/fromdir/extradir/file
913 D /first/equal/second/file
914 D /first/equal/second/fulldir/file
923 U /difffiles/equal/difffiles/file
925 C /difftype/difftype/difffiles/file
926 U /difftype/equal/difftype/file
933 A /adddir/partial/file
934 A /dirchange/old/todir/file
937 A /second/equal/first/file
938 A /second/equal/first/fulldir/file
940 C /second/second/difffiles/file
942 Modified regular file remains: /dirchange/fromdir/conflict/somefile
943 Modified regular file remains: /first/difffiles/second/file
949 Modified mismatch: /difffiles/difftype/difftype/file (regular file vs fifo file)
950 Removed file changed: /difffiles/first/first/file
952 Modified mismatch: /difflinks/difftype/difftype/link (symbolic link vs regular file)
955 Modified regular file changed: /difftype/difftype/difftype/one (fifo file became directory)
956 Modified symbolic link changed: /difftype/difftype/difftype/two (directory became regular file)
957 Remove mismatch: /difftype/first/first/fifo (fifo file became directory)
958 Modified directory changed: /dirchange/fromdir/conflict (directory became fifo file)
960 Modified regular file changed: /dirchange/todir/difffile (regular file became directory)
961 Modified fifo file changed: /dirchange/todir/difftype (regular file became directory)
962 New file mismatch: /adddir/conflict (directory vs regular file)
963 Directory mismatch: $TEST/adddir/conflict (regular file)
964 Directory mismatch: $TEST/dirchange/todir/difffile (regular file)
965 Directory mismatch: $TEST/dirchange/todir/difftype (fifo file)
967 New file mismatch: /second/second/difftype/dir (directory vs fifo file)