bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: After removing and (re)adding file is deleted without warning


From: AndreasReifschneider
Subject: Re: After removing and (re)adding file is deleted without warning
Date: Sun, 9 Nov 2003 02:03:22 +0100
User-agent: KMail/1.5.1

Derek Robert Price wrote:
> Could you produce a sanity.sh test case for this failure?

Only partially, since one has to think about what cvs should print in case
we recreated the file that should be re-added. But it shows the main problem,
namely that file that we wanted to add isn't added and removed in 'cvs 
commit'.

          # Shows the wished behaviour that allows re-adding even after
          # cvs remove -f file2; touch file2; cvs add file2
          # According to info page it works for
          # rm file1; cvs remove file2; cvs add file2
          # But this only works if file2 didn't reappear between remove and 
add
          echo 'initial contents file2' >file2
          echo 'future contents file2' >futurefile2
          dotest rmadd2-8a "${testcvs} add file2" \
"${PROG} [a-z]*: scheduling file .file2. for addition
${PROG} [a-z]*: use .${PROG} commit. to add this file permanently"
          dotest rmadd2-8b "${testcvs} -q ci -m add" \
"RCS file: ${CVSROOT_DIRNAME}/first-dir/file2,v
done
Checking in file2;
${CVSROOT_DIRNAME}/first-dir/file2,v  <--  file2
initial revision: 1\.1
done"
          dotest rmadd2-8c "${testcvs} rm -f file2" \
"${PROG} [a-z]*: scheduling .file2. for removal
${PROG} [a-z]*: use .${PROG} commit. to remove this file permanently"
          # now we recreate the file, e.g. "we store it from an editor or
          # move it there from another directory"
          mv futurefile2 file2

          ${testcvs} add file2 # instead of the following commented out test
#          dotest rmadd2-8d "${testcvs} add file2" 
# I do not know which message should be then printed, if file2 weren't
# recreated, it would be
# U file2
# cvs add: file2, version 1.1, resurrected
# But wished behaviour is to add the recreated file
# Or at least it shouldn't be silently deleted.
          dotest_fail rmadd2-8e "${testcvs} -q ci -m readd_after_recreation" \
"Removing file2;
${CVSROOT_DIRNAME}/first-dir/file2,v  <--  file2
new revision: delete; previous revision: 1\.1
done"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]