hgext/mq.py
changeset 19824 237e40b2c1ff
parent 19823 6fb14d21fe9d
child 19825 4b4997068143
equal deleted inserted replaced
19823:6fb14d21fe9d 19824:237e40b2c1ff
    87         def debug(self, msg):
    87         def debug(self, msg):
    88             pass
    88             pass
    89     stripext = extensions.load(dummyui(), 'strip', '')
    89     stripext = extensions.load(dummyui(), 'strip', '')
    90 
    90 
    91 checksubstate = stripext.checksubstate
    91 checksubstate = stripext.checksubstate
       
    92 checklocalchanges = stripext.checklocalchanges
       
    93 
    92 
    94 
    93 # Patch names looks like unix-file names.
    95 # Patch names looks like unix-file names.
    94 # They must be joinable with queue directory and result in the patch path.
    96 # They must be joinable with queue directory and result in the patch path.
    95 normname = util.normpath
    97 normname = util.normpath
    96 
    98 
  2907         del q.applied[:]
  2909         del q.applied[:]
  2908         q.applieddirty = True
  2910         q.applieddirty = True
  2909         q.savedirty()
  2911         q.savedirty()
  2910     return 0
  2912     return 0
  2911 
  2913 
  2912 def checklocalchanges(repo, force=False, excsuffix=''):
       
  2913     cmdutil.checkunfinished(repo)
       
  2914     m, a, r, d = repo.status()[:4]
       
  2915     if not force:
       
  2916         if (m or a or r or d):
       
  2917             _("local changes found") # i18n tool detection
       
  2918             raise util.Abort(_("local changes found" + excsuffix))
       
  2919         if checksubstate(repo):
       
  2920             _("local changed subrepos found") # i18n tool detection
       
  2921             raise util.Abort(_("local changed subrepos found" + excsuffix))
       
  2922     return m, a, r, d
       
  2923 
       
  2924 def strip(ui, repo, revs, update=True, backup="all", force=None):
  2914 def strip(ui, repo, revs, update=True, backup="all", force=None):
  2925     wlock = lock = None
  2915     wlock = lock = None
  2926     try:
  2916     try:
  2927         wlock = repo.wlock()
  2917         wlock = repo.wlock()
  2928         lock = repo.lock()
  2918         lock = repo.lock()