"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 Join to answer
Community showcase
Jason Wong
Published Tuesday in Agility Beta

Welcome to agility

Every team in the world is unique, and so   Atlassian believes   that each and every team's best way of working  needs to  be molded to their unique circumstances  – ...

418 views 6 16
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot