Show More
@@ -826,8 +826,13 b' class localrepository(repo.repository):' | |||
|
826 | 826 | removedsubs.discard(s) |
|
827 | 827 | if match(s) and wctx.sub(s).dirty(): |
|
828 | 828 | subs.append(s) |
|
829 |
if (subs or removedsubs) |
|
|
830 | changes[0].insert(0, '.hgsubstate') | |
|
829 | if (subs or removedsubs): | |
|
830 | # is hgsub modified and not included? | |
|
831 | if (not match('.hgsub') and | |
|
832 | '.hgsub' in (wctx.modified() + wctx.added())): | |
|
833 | raise util.Abort("can't commit subrepos without .hgsub") | |
|
834 | if '.hgsubstate' not in changes[0]: | |
|
835 | changes[0].insert(0, '.hgsubstate') | |
|
831 | 836 | |
|
832 | 837 | # make sure all explicit patterns are matched |
|
833 | 838 | if not force and match.files(): |
@@ -15,12 +15,15 b' echo s = s > .hgsub' | |||
|
15 | 15 | hg add .hgsub |
|
16 | 16 | hg init s |
|
17 | 17 | echo a > s/a |
|
18 | ||
|
19 | # issue2232 - committing a subrepo without .hgsub | |
|
20 | hg ci -mbad s | |
|
21 | ||
|
18 | 22 | hg -R s ci -Ams0 |
|
19 | 23 | hg sum |
|
20 | 24 | hg ci -m1 |
|
21 | 25 | |
|
22 | 26 | # issue 2022 - update -C |
|
23 | ||
|
24 | 27 | echo b > s/a |
|
25 | 28 | hg sum |
|
26 | 29 | hg co -C 1 |
General Comments 0
You need to be logged in to leave comments.
Login now