Show More
@@ -2413,9 +2413,9 def export(ui, repo, *changesets, **opts | |||||
2413 | Returns 0 on success. |
|
2413 | Returns 0 on success. | |
2414 | """ |
|
2414 | """ | |
2415 | changesets += tuple(opts.get('rev', [])) |
|
2415 | changesets += tuple(opts.get('rev', [])) | |
2416 | if not changesets: |
|
2416 | revs = scmutil.revrange(repo, changesets) | |
|
2417 | if not revs: | |||
2417 | raise util.Abort(_("export requires at least one changeset")) |
|
2418 | raise util.Abort(_("export requires at least one changeset")) | |
2418 | revs = scmutil.revrange(repo, changesets) |
|
|||
2419 | if len(revs) > 1: |
|
2419 | if len(revs) > 1: | |
2420 | ui.note(_('exporting patches:\n')) |
|
2420 | ui.note(_('exporting patches:\n')) | |
2421 | else: |
|
2421 | else: |
@@ -129,3 +129,17 Checking if only alphanumeric characters | |||||
129 | exporting patch: |
|
129 | exporting patch: | |
130 | ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch |
|
130 | ____________0123456789_______ABCDEFGHIJKLMNOPQRSTUVWXYZ______abcdefghijklmnopqrstuvwxyz____.patch | |
131 |
|
131 | |||
|
132 | Catch exporting unknown revisions (especially empty revsets, see issue3353) | |||
|
133 | ||||
|
134 | $ hg export | |||
|
135 | abort: export requires at least one changeset | |||
|
136 | [255] | |||
|
137 | $ hg export "" | |||
|
138 | hg: parse error: empty query | |||
|
139 | [255] | |||
|
140 | $ hg export 999 | |||
|
141 | abort: unknown revision '999'! | |||
|
142 | [255] | |||
|
143 | $ hg export "not all()" | |||
|
144 | abort: export requires at least one changeset | |||
|
145 | [255] |
General Comments 0
You need to be logged in to leave comments.
Login now