[issue1771] pull fails hard if subrepo rev is missing

Bryan O'Sullivan mercurial-bugs at selenic.com
Tue Jul 28 17:26:17 CDT 2009


New submission from Bryan O'Sullivan <bos at serpentine.com>:

I've been repeatedly bitten by a kind of UI problem with the new subrepo
support.

It seems to be quite easy for a user to commit a change to a subrepo that
they then fail to push. This will result in a .hgsubstate file containing a
rev that nobody else has, which will cause "hg pull -u" to fail with a
mysterious and scary error message:

$ hg pull -u
pulling from ssh://hg.example.com/api
searching for changes
adding changesets
adding manifests
adding file changes
added 11 changesets with 27 changes to 19 files
pulling subrepo api
real URL is http://hg.example.org/frob
searching for changes
adding changesets
adding manifests
adding file changes
added 4 changesets with 5 changes to 4 files
abort: unknown revision '8bc7d7869066c9feda4dd8503a4b437e4bb82f7d'!

To a user who doesn't understand the implementation of subrepos, this error
message is confusing. There is no indication of why it occurs or what to do
about it, and people flounder until a local expert comes along to clean up.

In this case, a developer updated the .hgsub file to point one subrepo at a
new URL, but he didn't know that he also needed to update the contained
subrepo to be a clone of that URL, and that he needed to update the
.hgsubstate file to refer to a valid changeset in that repo. It's rather too
easy to make these mistakes :-(

----------
assignedto: mpm
messages: 10237
nosy: bos, mpm
priority: urgent
status: unread
title: pull fails hard if subrepo rev is missing

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://mercurial.selenic.com/bts/issue1771>
____________________________________________________



More information about the Mercurial-devel mailing list