git-cvsexportcommit can't commit files which have been removed from CVS
If a file X is removed from CVS, it goes into the Attic directory, and CVS reports it as 'no file X' but with status 'Up-to-date'. cvsexportcommit misinterprets this as an existing file and tries to commit a file with the same name. Correctly identify these files, so that new files with the same name can be committed. Add a test to t9200-git-cvsexportcommit.sh, which tests that we can re-commit a removed filename which remains in CVS's attic. This adds a file 'attic_gremlin' in CVS, then "removes" it, then tries to commit a file with the same name from git. Signed-off-by: Nick Woolley <git.wu-lee@noodlefactory.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
e57cb01582
commit
54d5cc0e12
@ -317,4 +317,22 @@ test_expect_success 'use the same checkout for Git and CVS' '
|
||||
|
||||
'
|
||||
|
||||
test_expect_success 're-commit a removed filename which remains in CVS attic' '
|
||||
|
||||
(cd "$CVSWORK" &&
|
||||
echo >attic_gremlin &&
|
||||
cvs -Q add attic_gremlin &&
|
||||
cvs -Q ci -m "added attic_gremlin" &&
|
||||
rm attic_gremlin &&
|
||||
cvs -Q rm attic_gremlin &&
|
||||
cvs -Q ci -m "removed attic_gremlin") &&
|
||||
|
||||
echo > attic_gremlin &&
|
||||
git add attic_gremlin &&
|
||||
git commit -m "Added attic_gremlin" &&
|
||||
git cvsexportcommit -w "$CVSWORK" -c HEAD &&
|
||||
(cd "$CVSWORK"; cvs -Q update -d) &&
|
||||
test -f "$CVSWORK/attic_gremlin"
|
||||
'
|
||||
|
||||
test_done
|
||||
|
Reference in New Issue
Block a user