Show More
@@ -1235,9 +1235,9 b' class localrepository(object):' | |||
|
1235 | 1235 | raise util.Abort(_('cannot partially commit a merge ' |
|
1236 | 1236 | '(do not specify files or patterns)')) |
|
1237 | 1237 | |
|
1238 |
|
|
|
1238 | status = self.status(match=match, clean=force) | |
|
1239 | 1239 | if force: |
|
1240 |
|
|
|
1240 | status.modified.extend(status.clean) # mq may commit clean files | |
|
1241 | 1241 | |
|
1242 | 1242 | # check subrepos |
|
1243 | 1243 | subs = [] |
@@ -1246,7 +1246,7 b' class localrepository(object):' | |||
|
1246 | 1246 | # only manage subrepos and .hgsubstate if .hgsub is present |
|
1247 | 1247 | if '.hgsub' in wctx: |
|
1248 | 1248 | # we'll decide whether to track this ourselves, thanks |
|
1249 | for c in changes[:3]: | |
|
1249 | for c in status.modified, status.added, status.removed: | |
|
1250 | 1250 | if '.hgsubstate' in c: |
|
1251 | 1251 | c.remove('.hgsubstate') |
|
1252 | 1252 | |
@@ -1284,23 +1284,24 b' class localrepository(object):' | |||
|
1284 | 1284 | '.hgsub' in (wctx.modified() + wctx.added())): |
|
1285 | 1285 | raise util.Abort( |
|
1286 | 1286 | _("can't commit subrepos without .hgsub")) |
|
1287 |
|
|
|
1287 | status.modified.insert(0, '.hgsubstate') | |
|
1288 | 1288 | |
|
1289 |
elif '.hgsub' in |
|
|
1289 | elif '.hgsub' in status.removed: | |
|
1290 | 1290 | # clean up .hgsubstate when .hgsub is removed |
|
1291 | 1291 | if ('.hgsubstate' in wctx and |
|
1292 |
'.hgsubstate' not in |
|
|
1293 | changes[2].insert(0, '.hgsubstate') | |
|
1292 | '.hgsubstate' not in (status.modified + status.added + | |
|
1293 | status.removed)): | |
|
1294 | status.removed.insert(0, '.hgsubstate') | |
|
1294 | 1295 | |
|
1295 | 1296 | # make sure all explicit patterns are matched |
|
1296 | 1297 | if not force and match.files(): |
|
1297 | matched = set(changes[0] + changes[1] + changes[2]) | |
|
1298 | matched = set(status.modified + status.added + status.removed) | |
|
1298 | 1299 | |
|
1299 | 1300 | for f in match.files(): |
|
1300 | 1301 | f = self.dirstate.normalize(f) |
|
1301 | 1302 | if f == '.' or f in matched or f in wctx.substate: |
|
1302 | 1303 | continue |
|
1303 |
if f in |
|
|
1304 | if f in status.deleted: | |
|
1304 | 1305 | fail(f, _('file not found!')) |
|
1305 | 1306 | if f in vdirs: # visited directory |
|
1306 | 1307 | d = f + '/' |
@@ -1312,7 +1313,7 b' class localrepository(object):' | |||
|
1312 | 1313 | elif f not in self.dirstate: |
|
1313 | 1314 | fail(f, _("file not tracked!")) |
|
1314 | 1315 | |
|
1315 |
cctx = context.workingctx(self, text, user, date, extra, |
|
|
1316 | cctx = context.workingctx(self, text, user, date, extra, status) | |
|
1316 | 1317 | |
|
1317 | 1318 | if (not force and not extra.get("close") and not merge |
|
1318 | 1319 | and not cctx.files() |
@@ -1323,7 +1324,7 b' class localrepository(object):' | |||
|
1323 | 1324 | raise util.Abort(_("cannot commit merge with missing files")) |
|
1324 | 1325 | |
|
1325 | 1326 | ms = mergemod.mergestate(self) |
|
1326 |
for f in |
|
|
1327 | for f in status.modified: | |
|
1327 | 1328 | if f in ms and ms[f] == 'u': |
|
1328 | 1329 | raise util.Abort(_("unresolved merge conflicts " |
|
1329 | 1330 | "(see hg help resolve)")) |
General Comments 0
You need to be logged in to leave comments.
Login now