[Bug 5731] New: origbackuppath backups for files over symlink-to-directory fails

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Fri Nov 3 08:20:39 EDT 2017


            Bug ID: 5731
           Summary: origbackuppath backups for files over
                    symlink-to-directory fails
           Product: Mercurial
           Version: 4.4
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: bug
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: mbthomas at fb.com
                CC: mercurial-devel at mercurial-scm.org

I recently updated scmutil.origpath, so that when ui.origbackuppath is
configured,  we better handle the cases of path conflicts (file replaced with
directories and vice-versa).  I missed one of the cases: where the old backup
is a symlink to a directory that exists, and the new backup is a file or

This is because vfs.isdir() follows symlinks, so we try to call vfs.rmtree on
the symlink, which fails.

I have a test and fix coming.

You are receiving this mail because:
You are on the CC list for the bug.

More information about the Mercurial-devel mailing list