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