[issue3291] Error message about .hgsubstate is misleading

Wes Garland bugs at mercurial.selenic.com
Tue Feb 28 09:44:28 CST 2012


New submission from Wes Garland <wes at page.ca>:

I am on 1.9.1 but believe this applies to tip as well.

When merging a master repo that has a sub-repo with no changes but a newer
rev, you get an error like:
 "abort: outstanding uncommitted changes in subrepository 'web/htdocs'"

when in fact the error should say something like:
  "abort: outstanding uncommitted change of subrepository revision for
'web/htdocs'"

There's a subtle difference there, and it confuses users here regularly.
Users not aware of this bad error message cd to the subrepository and try to
check in changes only to discover that there are none. Then they wind up
making useless changes and randomly checking crap in until "magically" hg
lets them merge.

Here's a log of me using hg in my day-to-day activities which illustrates
the provenance of the buggy error message clearly:

[~/hg/chiptic/processors] wes:wes# hg status
M processors/chipCount
[~/hg/chiptic/processors] wes:wes# cd ..
[~/hg/chiptic] wes:wes# hg ci -m "chipCount processor - correct log message"
processors/chipCount
[~/hg/chiptic] wes:wes# cd web
[~/hg/chiptic/web] wes:wes# cd htdocs
[~/hg/chiptic/web/htdocs] wes:wes# hg status
? Makefile.orig
? test.html
[~/hg/chiptic/web/htdocs] wes:wes# hg pull
pulling from ssh://bitbucket.org/wesgarland/chiptic_htdocs
searching for changes
adding changesets
adding manifests
adding file changes
added 29 changesets with 45 changes to 22 files
(run 'hg update' to get a working copy)
[~/hg/chiptic/web/htdocs] wes:wes# hg update
22 files updated, 0 files merged, 0 files removed, 0 files unresolved
[~/hg/chiptic/web/htdocs] wes:wes# cd ..
[~/hg/chiptic/web] wes:wes# cd ..
[~/hg/chiptic] wes:wes# hg pull
pulling from ssh://bitbucket.org/wesgarland/chiptic
searching for changes
adding changesets
adding manifests
adding file changes
added 27 changesets with 35 changes to 15 files (+1 heads)
(run 'hg heads' to see heads, 'hg merge' to merge)
[~/hg/chiptic] wes:wes# hg merge
abort: outstanding uncommitted changes in subrepository 'web/htdocs'
[~/hg/chiptic] wes:wes# hg ci -m 'subrepo' web/htdocs
committing subrepository web/htdocs
[~/hg/chiptic] wes:wes# hg merge
14 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
[~/hg/chiptic] wes:wes#

----------
messages: 19198
nosy: wesgarland
priority: bug
status: unread
title: Error message about .hgsubstate is misleading

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


More information about the Mercurial-devel mailing list