D7233: hghave: disallow symlinks on Windows

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Tue Nov 5 22:43:05 EST 2019


mharbison72 added a comment.


  In D7233#106184 <https://phab.mercurial-scm.org/D7233#106184>, @indygreg wrote:
  
  > Shouldn't we be making this change in the core product as well? Otherwise Mercurial may attempt to use symlinks on Windows and we could blow up due to not having any test coverage?
  
  This should be what's disabling it in core, via `util.checklink()`:
  
  https://www.mercurial-scm.org/repo/hg/file/5.2/mercurial/windows.py#l276
  
  Just for fun, I enabled that and ran the tests in an admin window.  What I learned is that `ln -s` doesn't make symlinks, so I had to substitute a `os.symlink()` snippet, but there are more than a couple of these.  I figure when we want to enable it, we can patch in a shell alias in MSYS like is done for `pwd`[1], and point it to a *.py implementation.  And then I hit a test where a symlink without a target is `tar`d and then extracted... and MSYS `tar` didn't like that.  I set it aside at that point, but there may be other issues.
  
  [1] https://www.mercurial-scm.org/repo/hg/file/5.2/tests/run-tests.py#l1726

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7233/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7233

To: mharbison72, #hg-reviewers
Cc: indygreg, mercurial-devel


More information about the Mercurial-devel mailing list