##// END OF EJS Templates
import: abort usefully if no patch name given
Kevin Bullock -
r15327:67e92d29 stable
parent child Browse files
Show More
@@ -3356,7 +3356,7 b' def identify(ui, repo, source=None, rev='
3356 _('use any branch information in patch (implied by --exact)'))] +
3356 _('use any branch information in patch (implied by --exact)'))] +
3357 commitopts + commitopts2 + similarityopts,
3357 commitopts + commitopts2 + similarityopts,
3358 _('[OPTION]... PATCH...'))
3358 _('[OPTION]... PATCH...'))
3359 def import_(ui, repo, patch1, *patches, **opts):
3359 def import_(ui, repo, patch1=None, *patches, **opts):
3360 """import an ordered set of patches
3360 """import an ordered set of patches
3361
3361
3362 Import a list of patches and commit them individually (unless
3362 Import a list of patches and commit them individually (unless
@@ -3418,6 +3418,10 b' def import_(ui, repo, patch1, *patches, '
3418
3418
3419 Returns 0 on success.
3419 Returns 0 on success.
3420 """
3420 """
3421
3422 if not patch1:
3423 raise util.Abort(_('need at least one patch to import'))
3424
3421 patches = (patch1,) + patches
3425 patches = (patch1,) + patches
3422
3426
3423 date = opts.get('date')
3427 date = opts.get('date')
@@ -10,6 +10,11 b''
10 $ echo line 2 >> a/a
10 $ echo line 2 >> a/a
11 $ hg --cwd a ci -u someone -d '1 0' -m'second change'
11 $ hg --cwd a ci -u someone -d '1 0' -m'second change'
12
12
13 import with no args:
14
15 $ hg --cwd a import
16 abort: need at least one patch to import
17 [255]
13
18
14 generate patches for the test
19 generate patches for the test
15
20
General Comments 0
You need to be logged in to leave comments. Login now