comparison hgext/strip.py @ 42490:3a1988e915f9

strip: remove unused excsuffix argument from checklocalchanges() It was only used by mq, and mq now has its own copy of the function. Differential Revision: https://phab.mercurial-scm.org/D6534
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 17 Jun 2019 10:40:24 -0700
parents 1acaa9f37377
children 1474f5d84662
comparison
equal deleted inserted replaced
42489:cf445a212b9c 42490:3a1988e915f9
44 wctx.sub(s).bailifchanged(True) 44 wctx.sub(s).bailifchanged(True)
45 if s not in bctx.substate or bctx.sub(s).dirty(): 45 if s not in bctx.substate or bctx.sub(s).dirty():
46 inclsubs.append(s) 46 inclsubs.append(s)
47 return inclsubs 47 return inclsubs
48 48
49 def checklocalchanges(repo, force=False, excsuffix=''): 49 def checklocalchanges(repo, force=False):
50 cmdutil.checkunfinished(repo) 50 cmdutil.checkunfinished(repo)
51 s = repo.status() 51 s = repo.status()
52 if not force: 52 if not force:
53 if len(repo[None].parents()) > 1: 53 if len(repo[None].parents()) > 1:
54 _("outstanding uncommitted merge") #i18 tool detection 54 _("outstanding uncommitted merge") #i18 tool detection
55 raise error.Abort(_("outstanding uncommitted merge"+ excsuffix)) 55 raise error.Abort(_("outstanding uncommitted merge"))
56 if s.modified or s.added or s.removed or s.deleted: 56 if s.modified or s.added or s.removed or s.deleted:
57 _("local changes found") # i18n tool detection 57 _("local changes found") # i18n tool detection
58 raise error.Abort(_("local changes found" + excsuffix)) 58 raise error.Abort(_("local changes found"))
59 if checksubstate(repo): 59 if checksubstate(repo):
60 _("local changed subrepos found") # i18n tool detection 60 _("local changed subrepos found") # i18n tool detection
61 raise error.Abort(_("local changed subrepos found" + excsuffix)) 61 raise error.Abort(_("local changed subrepos found"))
62 return s 62 return s
63 63
64 def _findupdatetarget(repo, nodes): 64 def _findupdatetarget(repo, nodes):
65 unode, p2 = repo.changelog.parents(nodes[0]) 65 unode, p2 = repo.changelog.parents(nodes[0])
66 currentbranch = repo[None].branch() 66 currentbranch = repo[None].branch()