Show More
@@ -1829,11 +1829,14 b' class queue(object):' | |||
|
1829 | 1829 | patchname = filename |
|
1830 | 1830 | |
|
1831 | 1831 | else: |
|
1832 | if filename == '-' and not patchname: | |
|
1833 | raise util.Abort(_('need --name to import a patch from -')) | |
|
1834 | elif not patchname: | |
|
1835 | patchname = normname(os.path.basename(filename)) | |
|
1836 | self.check_reserved_name(patchname) | |
|
1837 | checkfile(patchname) | |
|
1832 | 1838 | try: |
|
1833 | 1839 | if filename == '-': |
|
1834 | if not patchname: | |
|
1835 | raise util.Abort( | |
|
1836 | _('need --name to import a patch from -')) | |
|
1837 | 1840 | text = sys.stdin.read() |
|
1838 | 1841 | else: |
|
1839 | 1842 | fp = url.open(self.ui, filename) |
@@ -1841,10 +1844,6 b' class queue(object):' | |||
|
1841 | 1844 | fp.close() |
|
1842 | 1845 | except (OSError, IOError): |
|
1843 | 1846 | raise util.Abort(_("unable to read file %s") % filename) |
|
1844 | if not patchname: | |
|
1845 | patchname = normname(os.path.basename(filename)) | |
|
1846 | self.check_reserved_name(patchname) | |
|
1847 | checkfile(patchname) | |
|
1848 | 1847 | patchf = self.opener(patchname, "w") |
|
1849 | 1848 | patchf.write(text) |
|
1850 | 1849 | patchf.close() |
General Comments 0
You need to be logged in to leave comments.
Login now