"Error encountered" after setting up symlinks

I've set up a couple symlinks within a repository (for example) mapping `/src/static/scripts/` to `/src/Web/scripts/`.

This works fine within the codebase and has the desired effect.

However, this seems to have messed up SourceTree and I'm getting the error:

Error encountered
'hg status' failed with code 255:'abort: path 'src/static/scripts/<script-name>.js' traverses symbolic link 'src/static/scripts'

I don't seem to be able to run any command since this error pops up as soon as the respository explorer is opened. Is there a command I can run to solve this (I assume re-indexing the repo)? I also notice that there's no way to run such commands from "Bookmarks".

1 answer

1 accepted

It's a confusing error, probably one that could be more specific to the problem. Basically, src/static/scripts 'used' to be a directory and now isn't. So the error is correct, but not exactly helpful. I *think* the solution is to get rid of the symlink for that specific case. You should validate both paths are correct first. There's a good discussion here about it which may shed some more light on your problem in specific. The first question to ask is whether the linked directory exists and move from there based on that resource.

Many thanks Kieran, that helped clear it up! I did indeed have to remove the symlinks from the repo (temporarily) to get this to work.

Suggest an answer

Log in or Sign up to answer
Community showcase

Scrum Roles Explained: the Do's and the Don'ts

Hello Community,  Today we are going to talk about the three Scrum Roles. There is the Development Team, the Scrum Master and the Product Owner. In my opinion these three are all really impo...

131 views 2 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you