Show More
@@ -272,6 +272,15 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||
|
272 | 272 | raise error.Abort(_('cannot partially commit a merge ' |
|
273 | 273 | '(use "hg commit" instead)')) |
|
274 | 274 | |
|
275 | def fail(f, msg): | |
|
276 | raise error.Abort('%s: %s' % (f, msg)) | |
|
277 | ||
|
278 | force = opts.get('force') | |
|
279 | if not force: | |
|
280 | vdirs = [] | |
|
281 | match.explicitdir = vdirs.append | |
|
282 | match.bad = fail | |
|
283 | ||
|
275 | 284 | status = repo.status(match=match) |
|
276 | 285 | |
|
277 | 286 | overrides = {(b'ui', b'commitsubrepos'): True} |
@@ -294,15 +303,6 b' def dorecord(ui, repo, commitfunc, cmdsu' | |||
|
294 | 303 | dirtyreason = wctx.sub(s).dirtyreason(True) |
|
295 | 304 | raise error.Abort(dirtyreason) |
|
296 | 305 | |
|
297 | def fail(f, msg): | |
|
298 | raise error.Abort('%s: %s' % (f, msg)) | |
|
299 | ||
|
300 | force = opts.get('force') | |
|
301 | if not force: | |
|
302 | vdirs = [] | |
|
303 | match.explicitdir = vdirs.append | |
|
304 | match.bad = fail | |
|
305 | ||
|
306 | 306 | if not force: |
|
307 | 307 | repo.checkcommitpatterns(wctx, vdirs, match, status, fail) |
|
308 | 308 | diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True, |
@@ -147,7 +147,8 b' def buildargsdict(trees, funcname, argsp' | |||
|
147 | 147 | arguments are rejected, but missing keyword arguments are just omitted. |
|
148 | 148 | """ |
|
149 | 149 | poskeys, varkey, keys, optkey = argspec |
|
150 |
kwstart = next((i for i, x in enumerate(trees) |
|
|
150 | kwstart = next((i for i, x in enumerate(trees) | |
|
151 | if x and x[0] == keyvaluenode), | |
|
151 | 152 | len(trees)) |
|
152 | 153 | if kwstart < len(poskeys): |
|
153 | 154 | raise error.ParseError(_("%(func)s takes at least %(nargs)d positional " |
@@ -171,7 +172,7 b' def buildargsdict(trees, funcname, argsp' | |||
|
171 | 172 | if optkey: |
|
172 | 173 | args[optkey] = util.sortdict() |
|
173 | 174 | for x in trees[kwstart:]: |
|
174 | if x[0] != keyvaluenode or x[1][0] != keynode: | |
|
175 | if not x or x[0] != keyvaluenode or x[1][0] != keynode: | |
|
175 | 176 | raise error.ParseError(_("%(func)s got an invalid argument") |
|
176 | 177 | % {'func': funcname}) |
|
177 | 178 | k = x[1][1] |
@@ -722,7 +722,7 b' def _defaultcacerts(ui):' | |||
|
722 | 722 | certs = certifi.where() |
|
723 | 723 | if os.path.exists(certs): |
|
724 | 724 | ui.debug('using ca certificates from certifi\n') |
|
725 | return certs | |
|
725 | return pycompat.fsencode(certs) | |
|
726 | 726 | except (ImportError, AttributeError): |
|
727 | 727 | pass |
|
728 | 728 |
@@ -775,12 +775,24 b' Record end' | |||
|
775 | 775 | +10 |
|
776 | 776 | +11 |
|
777 | 777 | |
|
778 | Interactive commit can name a directory instead of files (issue6131) | |
|
778 | 779 | |
|
779 | 780 | $ mkdir subdir |
|
781 | $ echo a > subdir/a | |
|
782 | $ hg ci -d '16 0' -i subdir -Amsubdir <<EOF | |
|
783 | > y | |
|
784 | > y | |
|
785 | > EOF | |
|
786 | adding subdir/a | |
|
787 | diff --git a/subdir/a b/subdir/a | |
|
788 | new file mode 100644 | |
|
789 | examine changes to 'subdir/a'? [Ynesfdaq?] y | |
|
790 | ||
|
791 | @@ -0,0 +1,1 @@ | |
|
792 | +a | |
|
793 | record this change to 'subdir/a'? [Ynesfdaq?] y | |
|
794 | ||
|
780 | 795 |
$ |
|
781 | $ echo a > a | |
|
782 | $ hg ci -d '16 0' -Amsubdir | |
|
783 | adding subdir/a | |
|
784 | 796 | |
|
785 | 797 | $ echo a >> a |
|
786 | 798 | $ hg commit -i -d '16 0' -m subdir-change a <<EOF |
@@ -472,6 +472,12 b' keyword arguments' | |||
|
472 | 472 | $ log 'extra(unknown=branch)' |
|
473 | 473 | hg: parse error: extra got an unexpected keyword argument 'unknown' |
|
474 | 474 | [255] |
|
475 | $ log 'extra((), x)' | |
|
476 | hg: parse error: first argument to extra must be a string | |
|
477 | [255] | |
|
478 | $ log 'extra(label=x, ())' | |
|
479 | hg: parse error: extra got an invalid argument | |
|
480 | [255] | |
|
475 | 481 | |
|
476 | 482 | $ try 'foo=bar|baz' |
|
477 | 483 | (keyvalue |
General Comments 0
You need to be logged in to leave comments.
Login now