1136 self.checkpatchname(patchfn) |
1136 self.checkpatchname(patchfn) |
1137 inclsubs = checksubstate(repo) |
1137 inclsubs = checksubstate(repo) |
1138 if inclsubs: |
1138 if inclsubs: |
1139 substatestate = repo.dirstate['.hgsubstate'] |
1139 substatestate = repo.dirstate['.hgsubstate'] |
1140 if opts.get('include') or opts.get('exclude') or pats: |
1140 if opts.get('include') or opts.get('exclude') or pats: |
1141 match = scmutil.match(repo[None], pats, opts) |
|
1142 # detect missing files in pats |
1141 # detect missing files in pats |
1143 def badfn(f, msg): |
1142 def badfn(f, msg): |
1144 if f != '.hgsubstate': # .hgsubstate is auto-created |
1143 if f != '.hgsubstate': # .hgsubstate is auto-created |
1145 raise util.Abort('%s: %s' % (f, msg)) |
1144 raise util.Abort('%s: %s' % (f, msg)) |
1146 match.bad = badfn |
1145 match = scmutil.match(repo[None], pats, opts, badfn=badfn) |
1147 changes = repo.status(match=match) |
1146 changes = repo.status(match=match) |
1148 else: |
1147 else: |
1149 changes = self.checklocalchanges(repo, force=True) |
1148 changes = self.checklocalchanges(repo, force=True) |
1150 commitfiles = list(inclsubs) |
1149 commitfiles = list(inclsubs) |
1151 for files in changes[:3]: |
1150 for files in changes[:3]: |