Show More
@@ -144,7 +144,21 b' except KeyError:' | |||||
144 | stripext = extensions.load(dummyui(), 'strip', '') |
|
144 | stripext = extensions.load(dummyui(), 'strip', '') | |
145 |
|
145 | |||
146 | strip = stripext.strip |
|
146 | strip = stripext.strip | |
147 | checksubstate = stripext.checksubstate |
|
147 | ||
|
148 | def checksubstate(repo, baserev=None): | |||
|
149 | '''return list of subrepos at a different revision than substate. | |||
|
150 | Abort if any subrepos have uncommitted changes.''' | |||
|
151 | inclsubs = [] | |||
|
152 | wctx = repo[None] | |||
|
153 | if baserev: | |||
|
154 | bctx = repo[baserev] | |||
|
155 | else: | |||
|
156 | bctx = wctx.p1() | |||
|
157 | for s in sorted(wctx.substate): | |||
|
158 | wctx.sub(s).bailifchanged(True) | |||
|
159 | if s not in bctx.substate or bctx.sub(s).dirty(): | |||
|
160 | inclsubs.append(s) | |||
|
161 | return inclsubs | |||
148 |
|
162 | |||
149 | # Patch names looks like unix-file names. |
|
163 | # Patch names looks like unix-file names. | |
150 | # They must be joinable with queue directory and result in the patch path. |
|
164 | # They must be joinable with queue directory and result in the patch path. |
@@ -31,21 +31,6 b' command = registrar.command(cmdtable)' | |||||
31 | # leave the attribute unspecified. |
|
31 | # leave the attribute unspecified. | |
32 | testedwith = 'ships-with-hg-core' |
|
32 | testedwith = 'ships-with-hg-core' | |
33 |
|
33 | |||
34 | def checksubstate(repo, baserev=None): |
|
|||
35 | '''return list of subrepos at a different revision than substate. |
|
|||
36 | Abort if any subrepos have uncommitted changes.''' |
|
|||
37 | inclsubs = [] |
|
|||
38 | wctx = repo[None] |
|
|||
39 | if baserev: |
|
|||
40 | bctx = repo[baserev] |
|
|||
41 | else: |
|
|||
42 | bctx = wctx.p1() |
|
|||
43 | for s in sorted(wctx.substate): |
|
|||
44 | wctx.sub(s).bailifchanged(True) |
|
|||
45 | if s not in bctx.substate or bctx.sub(s).dirty(): |
|
|||
46 | inclsubs.append(s) |
|
|||
47 | return inclsubs |
|
|||
48 |
|
||||
49 | def checklocalchanges(repo, force=False): |
|
34 | def checklocalchanges(repo, force=False): | |
50 | cmdutil.checkunfinished(repo) |
|
35 | cmdutil.checkunfinished(repo) | |
51 | s = repo.status() |
|
36 | s = repo.status() |
General Comments 0
You need to be logged in to leave comments.
Login now