##// END OF EJS Templates
merge with stable
Augie Fackler -
r42453:838f3a09 merge default
parent child Browse files
Show More
@@ -272,6 +272,15 b' def dorecord(ui, repo, commitfunc, cmdsu'
272 raise error.Abort(_('cannot partially commit a merge '
272 raise error.Abort(_('cannot partially commit a merge '
273 '(use "hg commit" instead)'))
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 status = repo.status(match=match)
284 status = repo.status(match=match)
276
285
277 overrides = {(b'ui', b'commitsubrepos'): True}
286 overrides = {(b'ui', b'commitsubrepos'): True}
@@ -294,15 +303,6 b' def dorecord(ui, repo, commitfunc, cmdsu'
294 dirtyreason = wctx.sub(s).dirtyreason(True)
303 dirtyreason = wctx.sub(s).dirtyreason(True)
295 raise error.Abort(dirtyreason)
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 if not force:
306 if not force:
307 repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
307 repo.checkcommitpatterns(wctx, vdirs, match, status, fail)
308 diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True,
308 diffopts = patch.difffeatureopts(ui, opts=opts, whitespace=True,
@@ -147,7 +147,8 b' def buildargsdict(trees, funcname, argsp'
147 arguments are rejected, but missing keyword arguments are just omitted.
147 arguments are rejected, but missing keyword arguments are just omitted.
148 """
148 """
149 poskeys, varkey, keys, optkey = argspec
149 poskeys, varkey, keys, optkey = argspec
150 kwstart = next((i for i, x in enumerate(trees) if x[0] == keyvaluenode),
150 kwstart = next((i for i, x in enumerate(trees)
151 if x and x[0] == keyvaluenode),
151 len(trees))
152 len(trees))
152 if kwstart < len(poskeys):
153 if kwstart < len(poskeys):
153 raise error.ParseError(_("%(func)s takes at least %(nargs)d positional "
154 raise error.ParseError(_("%(func)s takes at least %(nargs)d positional "
@@ -171,7 +172,7 b' def buildargsdict(trees, funcname, argsp'
171 if optkey:
172 if optkey:
172 args[optkey] = util.sortdict()
173 args[optkey] = util.sortdict()
173 for x in trees[kwstart:]:
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 raise error.ParseError(_("%(func)s got an invalid argument")
176 raise error.ParseError(_("%(func)s got an invalid argument")
176 % {'func': funcname})
177 % {'func': funcname})
177 k = x[1][1]
178 k = x[1][1]
@@ -722,7 +722,7 b' def _defaultcacerts(ui):'
722 certs = certifi.where()
722 certs = certifi.where()
723 if os.path.exists(certs):
723 if os.path.exists(certs):
724 ui.debug('using ca certificates from certifi\n')
724 ui.debug('using ca certificates from certifi\n')
725 return certs
725 return pycompat.fsencode(certs)
726 except (ImportError, AttributeError):
726 except (ImportError, AttributeError):
727 pass
727 pass
728
728
@@ -775,12 +775,24 b' Record end'
775 +10
775 +10
776 +11
776 +11
777
777
778 Interactive commit can name a directory instead of files (issue6131)
778
779
779 $ mkdir subdir
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 $ cd subdir
795 $ cd subdir
781 $ echo a > a
782 $ hg ci -d '16 0' -Amsubdir
783 adding subdir/a
784
796
785 $ echo a >> a
797 $ echo a >> a
786 $ hg commit -i -d '16 0' -m subdir-change a <<EOF
798 $ hg commit -i -d '16 0' -m subdir-change a <<EOF
@@ -472,6 +472,12 b' keyword arguments'
472 $ log 'extra(unknown=branch)'
472 $ log 'extra(unknown=branch)'
473 hg: parse error: extra got an unexpected keyword argument 'unknown'
473 hg: parse error: extra got an unexpected keyword argument 'unknown'
474 [255]
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 $ try 'foo=bar|baz'
482 $ try 'foo=bar|baz'
477 (keyvalue
483 (keyvalue
General Comments 0
You need to be logged in to leave comments. Login now