##// END OF EJS Templates
mq: rename check_toppatch to checktoppatch
Adrian Buehlmann -
r14581:da40ee1a default
parent child Browse files
Show More
@@ -823,7 +823,7 b' class queue(object):'
823
823
824 self._cleanup(realpatches, numrevs, opts.get('keep'))
824 self._cleanup(realpatches, numrevs, opts.get('keep'))
825
825
826 def check_toppatch(self, repo):
826 def checktoppatch(self, repo):
827 if self.applied:
827 if self.applied:
828 top = self.applied[-1].node
828 top = self.applied[-1].node
829 patch = self.applied[-1].name
829 patch = self.applied[-1].name
@@ -912,7 +912,7 b' class queue(object):'
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'))
914 commitfiles = m + a + r
914 commitfiles = m + a + r
915 self.check_toppatch(repo)
915 self.checktoppatch(repo)
916 insert = self.full_series_end()
916 insert = self.full_series_end()
917 wlock = repo.wlock()
917 wlock = repo.wlock()
918 try:
918 try:
@@ -1164,7 +1164,7 b' class queue(object):'
1164
1164
1165 self.applied_dirty = 1
1165 self.applied_dirty = 1
1166 if start > 0:
1166 if start > 0:
1167 self.check_toppatch(repo)
1167 self.checktoppatch(repo)
1168 if not patch:
1168 if not patch:
1169 patch = self.series[start]
1169 patch = self.series[start]
1170 end = start + 1
1170 end = start + 1
@@ -1269,7 +1269,7 b' class queue(object):'
1269 end = len(self.applied)
1269 end = len(self.applied)
1270 rev = self.applied[start].node
1270 rev = self.applied[start].node
1271 if update:
1271 if update:
1272 top = self.check_toppatch(repo)[0]
1272 top = self.checktoppatch(repo)[0]
1273
1273
1274 try:
1274 try:
1275 heads = repo.changelog.heads(rev)
1275 heads = repo.changelog.heads(rev)
@@ -1319,7 +1319,7 b' class queue(object):'
1319 wlock.release()
1319 wlock.release()
1320
1320
1321 def diff(self, repo, pats, opts):
1321 def diff(self, repo, pats, opts):
1322 top, patch = self.check_toppatch(repo)
1322 top, patch = self.checktoppatch(repo)
1323 if not top:
1323 if not top:
1324 self.ui.write(_("no patches applied\n"))
1324 self.ui.write(_("no patches applied\n"))
1325 return
1325 return
@@ -1343,7 +1343,7 b' class queue(object):'
1343 wlock = repo.wlock()
1343 wlock = repo.wlock()
1344
1344
1345 try:
1345 try:
1346 self.check_toppatch(repo)
1346 self.checktoppatch(repo)
1347 (top, patchfn) = (self.applied[-1].node, self.applied[-1].name)
1347 (top, patchfn) = (self.applied[-1].node, self.applied[-1].name)
1348 if repo.changelog.heads(top) != [top]:
1348 if repo.changelog.heads(top) != [top]:
1349 raise util.Abort(_("cannot refresh a revision with children"))
1349 raise util.Abort(_("cannot refresh a revision with children"))
@@ -2324,7 +2324,7 b' def fold(ui, repo, *files, **opts):'
2324
2324
2325 if not files:
2325 if not files:
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.check_toppatch(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_localchanges(repo)
2329 q.check_localchanges(repo)
2330
2330
General Comments 0
You need to be logged in to leave comments. Login now