##// END OF EJS Templates
mq: abort qnew -f if any file in an explicit list cannot be read
Brendan Cully -
r7161:b420ef2c default
parent child Browse files
Show More
@@ -655,6 +655,10 b' class queue:'
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)
@@ -99,14 +99,8 b' hg qnew uncommitted.patch'
99 hg st
99 hg st
100 hg qseries
100 hg qseries
101
101
102 echo '% qnew with uncommitted changes and missing file (issue 803)'
102 echo '% qnew missing'
103
103 hg qnew missing.patch missing
104 hg qnew issue803.patch someotherfile 2>&1 | \
105 sed -e 's/someotherfile:.*/someotherfile: No such file or directory/'
106 hg st
107 hg qseries
108 hg qpop -f
109 hg qdel issue803.patch
110
104
111 hg revert --no-backup somefile
105 hg revert --no-backup somefile
112 rm somefile
106 rm somefile
@@ -99,12 +99,8 b' B'
99 % qnew with uncommitted changes
99 % qnew with uncommitted changes
100 abort: local changes found, refresh first
100 abort: local changes found, refresh first
101 A somefile
101 A somefile
102 % qnew with uncommitted changes and missing file (issue 803)
102 % qnew missing
103 someotherfile: No such file or directory
103 abort: missing: No such file or directory
104 someotherfile: No such file or directory
105 A somefile
106 issue803.patch
107 Patch queue now empty
108 % qnew -m
104 % qnew -m
109 foo bar
105 foo bar
110 % qrefresh
106 % qrefresh
General Comments 0
You need to be logged in to leave comments. Login now