##// END OF EJS Templates
Do not allow merging with uncommitted changes in a subrepo
Oleg Stepanov -
r13437:6169493a stable
parent child Browse files
Show More
@@ -0,0 +1,25 b''
1 $ hg init
2
3 $ echo a > a
4 $ hg ci -qAm 'add a'
5
6 $ hg init subrepo
7 $ echo 'subrepo = http://example.net/libfoo' > .hgsub
8 $ hg ci -qAm 'added subrepo'
9
10 $ hg up -qC 0
11 $ echo ax > a
12 $ hg ci -m 'changed a'
13 created new head
14
15 $ hg up -qC 1
16 $ cd subrepo
17 $ echo b > b
18 $ hg add b
19 $ cd ..
20
21 Should fail, since there are added files to subrepo:
22
23 $ hg merge
24 abort: outstanding uncommitted changes in subrepository 'subrepo'
25 [255]
@@ -508,6 +508,11 b' def update(repo, node, branchmerge, forc'
508 if not force and (wc.files() or wc.deleted()):
508 if not force and (wc.files() or wc.deleted()):
509 raise util.Abort(_("outstanding uncommitted changes "
509 raise util.Abort(_("outstanding uncommitted changes "
510 "(use 'hg status' to list changes)"))
510 "(use 'hg status' to list changes)"))
511 for s in wc.substate:
512 if wc.sub(s).dirty():
513 raise util.Abort(_("outstanding uncommitted changes in "
514 "subrepository '%s'") % s)
515
511 elif not overwrite:
516 elif not overwrite:
512 if pa == p1 or pa == p2: # linear
517 if pa == p1 or pa == p2: # linear
513 pass # all good
518 pass # all good
General Comments 0
You need to be logged in to leave comments. Login now