[PATCH] add more support for dates with slashes (re-sending)
Matt Mackall
mpm at selenic.com
Tue Nov 8 16:18:55 CST 2011
On Tue, 2011-11-08 at 21:39 +0000, Haszlakiewicz, Eric wrote:
> Here's a patch that adds support for several additional date formats
> that use slashes instead of dashes (plus some more tests to make sure
> everything still works).
>
> # HG changeset patch
> # User Eric Haszlakiewicz <hawicz at gmail.com> # Date 1319215280 14400 # Node ID 89a5617493747a9e58a47a244a5091e0c381c921
Something interesting happened with linewrapping. Please consider using
patchbomb.
> # Parent d4addef0ec74370fbf75b138d06f8ad93d3038ff
> Support full date formats with slashes.
Incorrect summary format (period, uppercase, no subsystem).
> +Test using dates with slashes
> +
> + $ RES1=`hg debugdate "01/02 +0000"`
> + $ THISYEAR=`date +%Y`
> + $ RES2=`hg debugdate "01/02/${THISYEAR} +0000"` $ ([ "$RES1" =
> + "$RES2" ] && echo OK) || (echo "$RES1" ; false) OK $ hg debugdate
More badly wrapped lines.
The right way to test this sort of low-level utility functionality these
days is with a doctest. See here for a nearby example of how this is
done:
http://www.selenic.com/hg/file/stable/mercurial/util.py#l1045
The result will be both better documentation and a faster test suite.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list