Hey all, Please review: 6742650 cdm restore error could be more useful for insufficiently updated destination
Webrev: http://cr.opensolaris.org/~richlowe/onnv_6742650 This expands upon the error you receive when attempting to restore from cdm backups into a workspace which is insufficiently up-to-date, or is not related to the workspace from which the backup was taken. (these cases are indistinguishable, to us). This has been a source of questions for us (from two or three people, but that's still a reasonable percentage of the questions I've seen on IRC). Prior to these changes (such as with the present tools), you get an error like so: adding changesets transaction abort! rollback completed abort: 00changelog.i at 4bc1ca7b6767: unknown parent! With these changes, you get some extra text indicating the likely cause of this issue: adding changesets transaction abort! rollback completed abort: Error restoring workspace: couldn't restore committed changes: 00changelog.i at 4bc1ca7b6767: unknown parent Your workspace is either not sufficiently up to date, or is unrelated to the workspace from which the backup was taken Workspace may be partially restored We can't provide more information about the node we were missing (as we don't have it to look at...), only indicate likely reasons that it is missing. It is possible that we catch too much in the way of error here, in concept you may fail a node lookup in something other than the changelog (indicating a far larger problem). The only we could differentiate in this case would be to parse the '00changelog...' message, which is a string including verbatim in the exception raised by Mercurial. That seems rather brittle to me, so I chose not to do so. I will do so if advised. (I would add that, to the best of my knowledge, if you receive this error about something other than the changelog, the chances are that your workspace is corrupt, and nothing we can say would help you.) Testing: Attempted to restore backup into an unrelated workspace (this workspace into an scmtest workspace). Attempted to restore into an artificially down-rev workspace. Both cases worked as I expected, and gave me the new message as above. pbchk: pbchk -q is silent. Thanks, -- Rich