##// END OF EJS Templates
export: show 'Date' header in a format that also is readable for humans...
export: show 'Date' header in a format that also is readable for humans 'export' is the official export format and used by patchbomb, but it would only show date as a timestamp that most humans might find it hard to relate to. It would be very convenient when reviewing a patch to be able to see what timestamp the patch will end up with. Mercurial has always used util.parsedate for parsing these headers. It can handle 'all' date formats, so we could just as well use a readable one. 'export' will now use the format used by 'log' - which is the format described as 'Unix date format' in the templating help. We assume that all parsers of '# HG changeset patch'es can handle that.

File last commit:

r17017:953faba2 default
r18648:76b69ccc default
Show More
test-interhg.t
33 lines | 851 B | text/troff | Tads3Lexer
$ "$TESTDIR/hghave" serve || exit 80
$ hg init test
$ cd test
$ cat > .hg/hgrc <<EOF
> [extensions]
> interhg =
>
> [interhg]
> issues = s|Issue(\d+)|<a href="http://bts.example.org/issue\1">Issue\1</a>|
>
> # yes, 'x' is a weird delimiter...
> markbugs = sxbugx<i class="\x">bug</i>x
> EOF
$ touch foo
$ hg add foo
$ hg commit -d '1 0' -m 'Issue123: fixed the bug!'
$ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
$ cat hg.pid >> $DAEMON_PIDS
log
$ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '' | grep bts
<td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td>
errors
$ cat errors.log
$ cd ..