Search code examples
mergemercurialabort

Merging an already (locally) deleted folder


I'm using Mercurial and ran into an issue I'm not sure how to resolve. The issue I'm facing at the moment is as follows:

  • We had a project (folder) that was initially called A and pushed that to a remote repository.
  • I renamed Project A to B and pushed it to the remote repository. While doing so, I also locally renamed Project A to B.
  • Project A was removed from the remote repository.
  • I tried to pull those changes but Mercurial seems to get confused as the files (or paths to files) do not exist locally anymore.

If I'm invoking 'hg merge', the following output is produced: "Abort: outstanding uncommitted changes, ..." If I then invoke 'hg status', all the files which were in the initial version of Project A are listed - which now are not locally available anymore because the paths have changed from A/.../... to B/.../...

Can anybody give me a hint or tip on how to resolve this issue?


Solution

  • Are the listed files listed as "deleted" (R I think)?

    If yes, just commit this change (about the deleted files), then merge. Mercurial have to know about all the changes, including the files moved or removed.