comparison hgext/mq.py @ 19916:fb583a1efef0

mq: refactor usage of repo.branchmap().iteritems() with itervalues()
author Brodie Rao <brodie@sf.io>
date Mon, 01 Apr 2013 20:01:16 -0700
parents 28b1b7b9b4a9
children d51c4d85ec23
comparison
equal deleted inserted replaced
19915:1989111687a3 19916:fb583a1efef0
1202 keepchanges=False): 1202 keepchanges=False):
1203 self.checkkeepchanges(keepchanges, force) 1203 self.checkkeepchanges(keepchanges, force)
1204 diffopts = self.diffopts() 1204 diffopts = self.diffopts()
1205 wlock = repo.wlock() 1205 wlock = repo.wlock()
1206 try: 1206 try:
1207 heads = [] 1207 heads = [h for hs in repo.branchmap().itervalues() for h in hs]
1208 for b, ls in repo.branchmap().iteritems():
1209 heads += ls
1210 if not heads: 1208 if not heads:
1211 heads = [nullid] 1209 heads = [nullid]
1212 if repo.dirstate.p1() not in heads and not exact: 1210 if repo.dirstate.p1() not in heads and not exact:
1213 self.ui.status(_("(working directory not at a head)\n")) 1211 self.ui.status(_("(working directory not at a head)\n"))
1214 1212