Show More
@@ -84,12 +84,12 b' def clonenarrowcmd(orig, ui, repo, *args' | |||
|
84 | 84 | filepath = os.path.join(pycompat.getcwd(), narrowspecfile) |
|
85 | 85 | ui.status(_("reading narrowspec from '%s'\n") % filepath) |
|
86 | 86 | try: |
|
87 |
f |
|
|
88 | except IOError: | |
|
89 |
raise error.Abort(_(" |
|
|
87 | fdata = util.readfile(filepath) | |
|
88 | except IOError as inst: | |
|
89 | raise error.Abort(_("cannot read narrowspecs from '%s': %s") % | |
|
90 | (filepath, encoding.strtolocal(inst.strerror))) | |
|
90 | 91 | |
|
91 |
includes, excludes, profiles = sparse.parseconfig(ui, f |
|
|
92 | 'narrow') | |
|
92 | includes, excludes, profiles = sparse.parseconfig(ui, fdata, 'narrow') | |
|
93 | 93 | if profiles: |
|
94 | 94 | raise error.Abort(_("cannot specify other files using '%include' in" |
|
95 | 95 | " narrowspec")) |
General Comments 0
You need to be logged in to leave comments.
Login now