##// END OF EJS Templates
cmdutil.bailifchanged: abort for dirty subrepos
Eric Roshan Eisner -
r15231:cd6f10dc default
parent child Browse files
Show More
@@ -75,6 +75,10 b' def bailifchanged(repo):'
75 modified, added, removed, deleted = repo.status()[:4]
75 modified, added, removed, deleted = repo.status()[:4]
76 if modified or added or removed or deleted:
76 if modified or added or removed or deleted:
77 raise util.Abort(_("outstanding uncommitted changes"))
77 raise util.Abort(_("outstanding uncommitted changes"))
78 ctx = repo[None]
79 for s in ctx.substate:
80 if ctx.sub(s).dirty():
81 raise util.Abort(_("uncommitted changes in subrepo %s") % s)
78
82
79 def logmessage(ui, opts):
83 def logmessage(ui, opts):
80 """ get the log message according to -m and -l option """
84 """ get the log message according to -m and -l option """
@@ -52,6 +52,14 b' Issue2022: update -C'
52 commit: (clean)
52 commit: (clean)
53 update: (current)
53 update: (current)
54
54
55 commands that require a clean repo should respect subrepos
56
57 $ echo b >> s/a
58 $ hg backout tip
59 abort: uncommitted changes in subrepo s
60 [255]
61 $ hg revert -C -R s s/a
62
55 add sub sub
63 add sub sub
56
64
57 $ echo ss = ss > s/.hgsub
65 $ echo ss = ss > s/.hgsub
General Comments 0
You need to be logged in to leave comments. Login now