Mercurial > hg
view tests/test-issue322.t @ 13174:be7e8e9bc5e5
mq: update .hgsubstate if subrepos are clean (issue2499)
This patch prevents MQ from creating an inconsistent subrepo state. If
the .hgsub file has been changed, and none of the subrepos have
uncommitted changes, creating or updating a patch (using qnew, qrefresh,
or qrecord) will update .hgsubstate accordingly.
If any subrepos _do_ have uncommitted changes, qnew/qrefresh/qrecord
will abort.
Thanks to pmezard for proposing this solution.
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Tue, 07 Dec 2010 22:14:43 -0600 |
parents | b63f6422d2a7 |
children |
line wrap: on
line source
http://mercurial.selenic.com/bts/issue322 File replaced with directory: $ hg init a $ cd a $ echo a > a $ hg commit -Ama adding a $ rm a $ mkdir a $ echo a > a/a Should fail - would corrupt dirstate: $ hg add a/a abort: file 'a' in dirstate clashes with 'a/a' [255] $ cd .. Directory replaced with file: $ hg init c $ cd c $ mkdir a $ echo a > a/a $ hg commit -Ama adding a/a $ rm -r a $ echo a > a Should fail - would corrupt dirstate: $ hg add a abort: directory 'a' already in dirstate [255] $ cd .. Directory replaced with file: $ hg init d $ cd d $ mkdir b $ mkdir b/c $ echo a > b/c/d $ hg commit -Ama adding b/c/d $ rm -r b $ echo a > b Should fail - would corrupt dirstate: $ hg add b abort: directory 'b' already in dirstate [255]