Hi,
I have a large mercurial (bitbucket) project, with a default branch and a new branch which is in some form, restructuring the existing site. This restructure has lead to a number of files being renamed and thus for version tracking we have a series of brand new files and deleted files. This restructure is still separate to the default branch however earlier today I switched from the new branch to the default to implement a fix and when I attempted to switch back to the new branch I got the following error:
hg update -y -r 1750
abort: crosses branches (merge branches or use --clean to discard changes)
Completed with errors, see above.
After cancelling the branch change I had a long list of uncommitted changes on the default branch. All the files I had renamed in the new branch have now been deleted from the default branch (except those which have had changes made to them since the creation of the new branch) and it's asking me to commit the change. Those files are now deleted but the "new files" (what I renamed the files to) are not there so it's not a merge. It feels like the switch got half way complete, deleted the necessary files, errored and returned to the default branch without restoring the deleted files.
Moving to another commit on the default branch does not solve the problem because I still have "uncommitted changes" and the files are still missing.
Should I commit the changes and THEN rollback? Or discard changes, or "Reset All" (which could mean anything tbh)
Many thanks for your help
EDIT: I can't answer anymore today because I'm new.
The last commit is definitely on the right branch.
Yes I was switching, not merging and I have not committed the deleted files.
How do I "un-stage" the current changes?
EDIT 2: So I solved this by selecting each file and using the "discard selected" action. All files are now restored and everything appears to be working. Thank you for your time Izhar