https://bz.mercurial-scm.org/show_bug.cgi?id=6666
Bug ID: 6666 Summary: hg import rejects exported changeset in which a directory is emptied and replaced by a symlink Product: Mercurial Version: 6.1 Hardware: PC OS: Linux Status: UNCONFIRMED Severity: bug Priority: wish Component: Mercurial Assignee: bugzi...@mercurial-scm.org Reporter: pus...@ulukai.org CC: mercurial-devel@mercurial-scm.org Python Version: --- I came across this bug while trying to fix a repo made from an svn mirror using hg convert. I assume that the original error was made by convert. However, when I tried to save the corrected changeset using hg export, I found that I could not import it again using hg import. The following simple test case depicts the error that the hg import gets in this case. test$ hg --version Mercurial Distributed SCM (version 6.1) (see https://mercurial-scm.org for more information) Copyright (C) 2005-2022 Olivia Mackall and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. test$ hg init . test$ mkdir dirtest test$ mkdir target test$ touch target/foo test$ touch dirtest/bar test$ hg add target/foo dirtest/bar test$ hg ci -m "initial commit" test$ hg rm dirtest/bar test$ hg rm dirtest test$ ln -s target dirtest test$ hg add dirtest test$ hg d diff --git a/dirtest b/dirtest new file mode 120000 --- /dev/null +++ b/dirtest @@ -0,0 +1,1 @@ +target \ No newline at end of file diff --git a/dirtest/bar b/dirtest/bar deleted file mode 100644 test$ hg ci -m "turn directory into symlink" test$ hg export > export test$ hg strip -r tip 1 files updated, 0 files merged, 1 files removed, 0 files unresolved saved backup bundle to [home]/test/20220311/test/.hg/strip-backup/0061a6917873-cd9c34cf-backup.hg test$ hg import export applying export abort: Is a directory: '[home]/test/20220311/test/dirtest' test$ -- You are receiving this mail because: You are on the CC list for the bug. _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel