comparison hgext/mq.py @ 7161:b420ef2c812b

mq: abort qnew -f if any file in an explicit list cannot be read
author Brendan Cully <brendan@kublai.com>
date Sat, 18 Oct 2008 20:45:53 -0700
parents 1b7b21b634f2
children ce10a2f22258
comparison
equal deleted inserted replaced
7160:1b7b21b634f2 7161:b420ef2c812b
653 self.check_reserved_name(patch) 653 self.check_reserved_name(patch)
654 if os.path.exists(self.join(patch)): 654 if os.path.exists(self.join(patch)):
655 raise util.Abort(_('patch "%s" already exists') % patch) 655 raise util.Abort(_('patch "%s" already exists') % patch)
656 if opts.get('include') or opts.get('exclude') or pats: 656 if opts.get('include') or opts.get('exclude') or pats:
657 match = cmdutil.match(repo, pats, opts) 657 match = cmdutil.match(repo, pats, opts)
658 # detect missing files in pats
659 def badfn(f, msg):
660 raise util.Abort('%s: %s' % (f, msg))
661 match.bad = badfn
658 m, a, r, d = repo.status(match=match)[:4] 662 m, a, r, d = repo.status(match=match)[:4]
659 else: 663 else:
660 m, a, r, d = self.check_localchanges(repo, force) 664 m, a, r, d = self.check_localchanges(repo, force)
661 match = cmdutil.match(repo, m + a + r) 665 match = cmdutil.match(repo, m + a + r)
662 commitfiles = m + a + r 666 commitfiles = m + a + r