"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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

65 views 0 11
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