Search code examples
mercurialmercurial-subrepos

Is it possible to update back through the point of adding subrepos?


I've had a folder in my repository. Then I have made this folder a subrepository (with the very same files), commited and pushed this change. Now I can't update back through that commit. Here's the message I get:

% hg update --repository <path to repo> --config ui.merge=internal:fail --rev 1159 --clean
abort: path 'subrepo\include\header.h' is inside nested repo 'subrepo'
[command returned code 255 Wed Dec 05 11:57:45 2012]

Where subrepo is the name of that folder where subrepo now resides. Any way to defeat this and update to earlier revision?


Solution

  • Found a solution: delete the folder in question, then update with the "discard changes" option. Works like charm.