[PATCH 0 of 1] Fix for subrepo.dirty() check - warning on missing revision instead of abort

Friedrich Kastner-Masilko face at snoopie.at
Thu May 12 13:32:50 CDT 2011


Hello crew,

This patch fixes a minor annoyance I have together with history rewriting in subrepo projects: the abort-message "abort: unknown revision 'rev'!"

If you have e.g. a superrepo referencing the tip revision of a subrepo, and you strip away the tip in the subrepo, your superrepo is basically stuck. You can't "hg update" away from it, not even with "-C". You'd have to manually edit .hgsubstate to be able to go to another revision, something I frown upon, to be honest.

IMHO, the expected behaviour would be to have "hg update -C" pull the subrepo again if it suddenly fails to find the referenced revision. It is prohibited by the dirty detection in subrepo throwing an exception, though.

This is fixing this by means of issuing a warning instead. Additionally, a
subrepo with unknown revision referenced is returned as being dirty.

regards,
Fritz


More information about the Mercurial-devel mailing list