Show More
@@ -852,7 +852,7 b' class queue(object):' | |||||
852 | else: |
|
852 | else: | |
853 | raise util.Abort(_("local changes found")) |
|
853 | raise util.Abort(_("local changes found")) | |
854 |
|
854 | |||
855 |
def check |
|
855 | def checklocalchanges(self, repo, force=False, refresh=True): | |
856 | m, a, r, d = repo.status()[:4] |
|
856 | m, a, r, d = repo.status()[:4] | |
857 | if (m or a or r or d) and not force: |
|
857 | if (m or a or r or d) and not force: | |
858 | self.localchangesfound(refresh) |
|
858 | self.localchangesfound(refresh) | |
@@ -907,7 +907,7 b' class queue(object):' | |||||
907 | match.bad = badfn |
|
907 | match.bad = badfn | |
908 | m, a, r, d = repo.status(match=match)[:4] |
|
908 | m, a, r, d = repo.status(match=match)[:4] | |
909 | else: |
|
909 | else: | |
910 |
m, a, r, d = self.check |
|
910 | m, a, r, d = self.checklocalchanges(repo, force=True) | |
911 | match = scmutil.matchfiles(repo, m + a + r + inclsubs) |
|
911 | match = scmutil.matchfiles(repo, m + a + r + inclsubs) | |
912 | if len(repo[None].parents()) > 1: |
|
912 | if len(repo[None].parents()) > 1: | |
913 | raise util.Abort(_('cannot manage merge changesets')) |
|
913 | raise util.Abort(_('cannot manage merge changesets')) | |
@@ -986,7 +986,7 b' class queue(object):' | |||||
986 | lock = repo.lock() |
|
986 | lock = repo.lock() | |
987 |
|
987 | |||
988 | if update: |
|
988 | if update: | |
989 |
self.check |
|
989 | self.checklocalchanges(repo, force=force, refresh=False) | |
990 | urev = self.qparents(repo, revs[0]) |
|
990 | urev = self.qparents(repo, revs[0]) | |
991 | hg.clean(repo, urev) |
|
991 | hg.clean(repo, urev) | |
992 | repo.dirstate.write() |
|
992 | repo.dirstate.write() | |
@@ -1183,7 +1183,7 b' class queue(object):' | |||||
1183 | if wcfiles.intersection(patchfiles): |
|
1183 | if wcfiles.intersection(patchfiles): | |
1184 | self.localchangesfound(self.applied) |
|
1184 | self.localchangesfound(self.applied) | |
1185 | elif mergeq: |
|
1185 | elif mergeq: | |
1186 |
self.check |
|
1186 | self.checklocalchanges(refresh=self.applied) | |
1187 |
|
1187 | |||
1188 | all_files = set() |
|
1188 | all_files = set() | |
1189 | try: |
|
1189 | try: | |
@@ -2326,7 +2326,7 b' def fold(ui, repo, *files, **opts):' | |||||
2326 | raise util.Abort(_('qfold requires at least one patch name')) |
|
2326 | raise util.Abort(_('qfold requires at least one patch name')) | |
2327 | if not q.checktoppatch(repo)[0]: |
|
2327 | if not q.checktoppatch(repo)[0]: | |
2328 | raise util.Abort(_('no patches applied')) |
|
2328 | raise util.Abort(_('no patches applied')) | |
2329 |
q.check |
|
2329 | q.checklocalchanges(repo) | |
2330 |
|
2330 | |||
2331 | message = cmdutil.logmessage(opts) |
|
2331 | message = cmdutil.logmessage(opts) | |
2332 | if opts.get('edit'): |
|
2332 | if opts.get('edit'): |
General Comments 0
You need to be logged in to leave comments.
Login now