##// END OF EJS Templates
strip: make checklocalchanges() return full status tuple...
Martin von Zweigbergk -
r22925:68df36ce default
parent child Browse files
Show More
@@ -1359,11 +1359,12 class queue(object):
1359 1359
1360 1360 tobackup = set()
1361 1361 if (not nobackup and force) or keepchanges:
1362 m, a, r, d = self.checklocalchanges(repo, force=True)
1362 status = self.checklocalchanges(repo, force=True)
1363 1363 if keepchanges:
1364 tobackup.update(m + a + r + d)
1364 tobackup.update(status.modified + status.added +
1365 status.removed + status.deleted)
1365 1366 else:
1366 tobackup.update(m + a)
1367 tobackup.update(status.modified + status.added)
1367 1368
1368 1369 s = self.series[start:end]
1369 1370 all_files = set()
@@ -1447,13 +1448,13 class queue(object):
1447 1448
1448 1449 tobackup = set()
1449 1450 if update:
1450 m, a, r, d = self.checklocalchanges(
1451 repo, force=force or keepchanges)
1451 s = self.checklocalchanges(repo, force=force or keepchanges)
1452 1452 if force:
1453 1453 if not nobackup:
1454 tobackup.update(m + a)
1454 tobackup.update(s.modified + s.added)
1455 1455 elif keepchanges:
1456 tobackup.update(m + a + r + d)
1456 tobackup.update(s.modified + s.added +
1457 s.removed + s.deleted)
1457 1458
1458 1459 self.applieddirty = True
1459 1460 end = len(self.applied)
@@ -32,15 +32,15 def checksubstate(repo, baserev=None):
32 32
33 33 def checklocalchanges(repo, force=False, excsuffix=''):
34 34 cmdutil.checkunfinished(repo)
35 m, a, r, d = repo.status()[:4]
35 s = repo.status()
36 36 if not force:
37 if (m or a or r or d):
37 if s.modified or s.added or s.removed or s.deleted:
38 38 _("local changes found") # i18n tool detection
39 39 raise util.Abort(_("local changes found" + excsuffix))
40 40 if checksubstate(repo):
41 41 _("local changed subrepos found") # i18n tool detection
42 42 raise util.Abort(_("local changed subrepos found" + excsuffix))
43 return m, a, r, d
43 return s
44 44
45 45 def strip(ui, repo, revs, update=True, backup=True, force=None, bookmark=None):
46 46 wlock = lock = None
General Comments 0
You need to be logged in to leave comments. Login now