##// END OF EJS Templates
merge with stable
Matt Mackall -
r25662:ff5172c8 merge default
parent child Browse files
Show More
@@ -505,6 +505,8 b' def _regex(kind, pat, globsuffix):'
505 505 if kind == 're':
506 506 return pat
507 507 if kind == 'path':
508 if pat == '.':
509 return ''
508 510 return '^' + util.re.escape(pat) + '(?:/|$)'
509 511 if kind == 'relglob':
510 512 return '(?:|.*/)' + _globre(pat) + globsuffix
@@ -47,7 +47,7 b' def tokenize(program, start, end):'
47 47 s = pos
48 48 while pos < end: # find closing quote
49 49 d = program[pos]
50 if decode and d == '\\': # skip over escaped characters
50 if d == '\\': # skip over escaped characters
51 51 pos += 2
52 52 continue
53 53 if d == c:
@@ -450,7 +450,7 b' def revset(context, mapping, args):'
450 450 # i18n: "revset" is a keyword
451 451 raise error.ParseError(_("revset expects one or more arguments"))
452 452
453 raw = args[0][1]
453 raw = stringify(args[0][0](context, mapping, args[0][1]))
454 454 ctx = mapping['ctx']
455 455 repo = ctx.repo()
456 456
@@ -2849,6 +2849,17 b' Test string escaping:'
2849 2849 <>\n<]>
2850 2850 <>\n<
2851 2851
2852 Test string escaping of quotes:
2853
2854 $ hg log -Ra -r0 -T '{"\""}\n'
2855 "
2856 $ hg log -Ra -r0 -T '{"\\\""}\n'
2857 \"
2858 $ hg log -Ra -r0 -T '{r"\""}\n'
2859 \"
2860 $ hg log -Ra -r0 -T '{r"\\\""}\n'
2861 \\\"
2862
2852 2863 Test exception in quoted template. single backslash before quotation mark is
2853 2864 stripped before parsing:
2854 2865
@@ -3121,6 +3132,9 b' Test revset function'
3121 3132 Rev: 0
3122 3133 Ancestor: 0
3123 3134
3135 $ hg log --template '{revset("TIP"|lower)}\n' -l1
3136 2
3137
3124 3138 Test active bookmark templating
3125 3139
3126 3140 $ hg book foo
@@ -106,6 +106,19 b' Issue294: hg remove --after dir fails wh'
106 106 $ mkdir otherdir
107 107 $ cd otherdir
108 108
109 $ hg files path:
110 ../b (glob)
111 ../dir.h/foo (glob)
112 ../t.h (glob)
113 ../t/e.h (glob)
114 ../t/x (glob)
115 $ hg files path:.
116 ../b (glob)
117 ../dir.h/foo (glob)
118 ../t.h (glob)
119 ../t/e.h (glob)
120 ../t/x (glob)
121
109 122 $ hg locate b
110 123 ../b (glob)
111 124 ../t/b (glob)
General Comments 0
You need to be logged in to leave comments. Login now