Show More
@@ -821,6 +821,10 b' class queue(object):' | |||||
821 | diffopts = self.diffopts({'git': opts.get('git')}) |
|
821 | diffopts = self.diffopts({'git': opts.get('git')}) | |
822 | self.check_reserved_name(patchfn) |
|
822 | self.check_reserved_name(patchfn) | |
823 | if os.path.exists(self.join(patchfn)): |
|
823 | if os.path.exists(self.join(patchfn)): | |
|
824 | if os.path.isdir(self.join(patchfn)): | |||
|
825 | raise util.Abort(_('"%s" already exists as a directory') | |||
|
826 | % patchfn) | |||
|
827 | else: | |||
824 | raise util.Abort(_('patch "%s" already exists') % patchfn) |
|
828 | raise util.Abort(_('patch "%s" already exists') % patchfn) | |
825 | if opts.get('include') or opts.get('exclude') or pats: |
|
829 | if opts.get('include') or opts.get('exclude') or pats: | |
826 | match = cmdutil.match(repo, pats, opts) |
|
830 | match = cmdutil.match(repo, pats, opts) |
@@ -25,6 +25,7 b'' | |||||
25 | > echo '% qnew with name containing slash' |
|
25 | > echo '% qnew with name containing slash' | |
26 | > hg qnew foo/ |
|
26 | > hg qnew foo/ | |
27 | > hg qnew foo/bar.patch |
|
27 | > hg qnew foo/bar.patch | |
|
28 | > hg qnew foo | |||
28 | > hg qseries |
|
29 | > hg qseries | |
29 | > hg qpop |
|
30 | > hg qpop | |
30 | > hg qdelete foo/bar.patch |
|
31 | > hg qdelete foo/bar.patch | |
@@ -107,6 +108,7 b' plain headers' | |||||
107 | abort: "foo:bar" cannot be used as the name of a patch |
|
108 | abort: "foo:bar" cannot be used as the name of a patch | |
108 | % qnew with name containing slash |
|
109 | % qnew with name containing slash | |
109 | abort: cannot write patch "foo/": Is a directory |
|
110 | abort: cannot write patch "foo/": Is a directory | |
|
111 | abort: "foo" already exists as a directory | |||
110 | foo/bar.patch |
|
112 | foo/bar.patch | |
111 | popping foo/bar.patch |
|
113 | popping foo/bar.patch | |
112 | patch queue now empty |
|
114 | patch queue now empty | |
@@ -171,6 +173,7 b' hg headers' | |||||
171 | abort: "foo:bar" cannot be used as the name of a patch |
|
173 | abort: "foo:bar" cannot be used as the name of a patch | |
172 | % qnew with name containing slash |
|
174 | % qnew with name containing slash | |
173 | abort: cannot write patch "foo/": Is a directory |
|
175 | abort: cannot write patch "foo/": Is a directory | |
|
176 | abort: "foo" already exists as a directory | |||
174 | foo/bar.patch |
|
177 | foo/bar.patch | |
175 | popping foo/bar.patch |
|
178 | popping foo/bar.patch | |
176 | patch queue now empty |
|
179 | patch queue now empty |
General Comments 0
You need to be logged in to leave comments.
Login now