summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metadata/md5-cache/dev-libs/glib-2.34.3-r12
-rw-r--r--metadata/md5-cache/www-apps/trac-1.0.12
-rw-r--r--www-apps/trac/ChangeLog22
-rw-r--r--www-apps/trac/Manifest19
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11684.diff31
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11689.diff59
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11690.diff40
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11691.diff81
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11712.diff45
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11769.diff73
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11771.diff162
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11773.diff44
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11776.diff43
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11783.diff23
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11816.diff45
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11876.diff37
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11892.diff (renamed from www-apps/trac/files/trac-1.0.1-changeset_11933.diff)285
-rw-r--r--www-apps/trac/files/trac-1.0.1-changeset_11893.diff24
-rw-r--r--www-apps/trac/trac-1.0.1.ebuild28
19 files changed, 914 insertions, 151 deletions
diff --git a/metadata/md5-cache/dev-libs/glib-2.34.3-r1 b/metadata/md5-cache/dev-libs/glib-2.34.3-r1
index 88aaa82e..0d0ddaa3 100644
--- a/metadata/md5-cache/dev-libs/glib-2.34.3-r1
+++ b/metadata/md5-cache/dev-libs/glib-2.34.3-r1
@@ -10,5 +10,5 @@ PDEPEND=x11-misc/shared-mime-info !<gnome-base/gvfs-1.6.4-r990
RDEPEND=virtual/libiconv virtual/libffi sys-libs/zlib || ( >=dev-libs/elfutils-0.142 >=dev-libs/libelf-0.8.12 >=sys-freebsd/freebsd-lib-9.2_rc1 ) selinux? ( sys-libs/libselinux ) xattr? ( sys-apps/attr ) fam? ( virtual/fam ) utils? ( >=dev-util/gdbus-codegen-2.34.3 )
SLOT=2
SRC_URI=mirror://gnome/sources/glib/2.34/glib-2.34.3.tar.xz http://pkgconfig.freedesktop.org/releases/pkg-config-0.28.tar.gz
-_eclasses_=autotools 16761a2f972abd686713e5967ff3c754 bash-completion-r1 cccf36bdb93b54baafea3b9d97abb0bf eutils 63afaaed8aa819fdcb814c7cd39495a2 flag-o-matic d900015de4e092f26d8c0a18b6bd60de gnome.org 8fef8f967214f56e08fa92d61163d891 gnome2-utils 794d2847b4af390a1e020924876c8297 libtool b1c8688e60f9580bcb9bb46e08737eb1 linux-info dd8fdcccc30f117673b4cba4ed4f74a7 multilib 892e597faee02a5b94eb02ab512e7622 multiprocessing a2130e6fc4aa4c6a24b265ca0cbcc2b6 pax-utils 2424f959506320f5196de8f79fa05297 python 7aff825f110c83fa8c77f14ba3c71c47 toolchain-funcs 7ffd28a8c7eea27218865352bfd3ab2f user d0a4d0735a6c0183d707ca919bd72f28 versionator 6601b4c5b3f019a993db59a50e1854e4 virtualx 73cfc129b4b9ba23aed1abb10c825d86
+_eclasses_=autotools 16761a2f972abd686713e5967ff3c754 bash-completion-r1 cccf36bdb93b54baafea3b9d97abb0bf eutils 63afaaed8aa819fdcb814c7cd39495a2 flag-o-matic d900015de4e092f26d8c0a18b6bd60de gnome.org 8fef8f967214f56e08fa92d61163d891 gnome2-utils cf14abfc65f26151fd2e33d722422ee3 libtool b1c8688e60f9580bcb9bb46e08737eb1 linux-info dd8fdcccc30f117673b4cba4ed4f74a7 multilib 892e597faee02a5b94eb02ab512e7622 multiprocessing a2130e6fc4aa4c6a24b265ca0cbcc2b6 pax-utils 2424f959506320f5196de8f79fa05297 python 7aff825f110c83fa8c77f14ba3c71c47 toolchain-funcs 7ffd28a8c7eea27218865352bfd3ab2f user d0a4d0735a6c0183d707ca919bd72f28 versionator 6601b4c5b3f019a993db59a50e1854e4 virtualx 73cfc129b4b9ba23aed1abb10c825d86
_md5_=c7e3299040650d309368da8900df43b9
diff --git a/metadata/md5-cache/www-apps/trac-1.0.1 b/metadata/md5-cache/www-apps/trac-1.0.1
index bc2cbf5c..636abd47 100644
--- a/metadata/md5-cache/www-apps/trac-1.0.1
+++ b/metadata/md5-cache/www-apps/trac-1.0.1
@@ -11,4 +11,4 @@ REQUIRED_USE=|| ( mysql postgres sqlite ) python_single_target_python2_6? ( pyth
SLOT=0
SRC_URI=http://ftp.edgewall.com/pub/trac/Trac-1.0.1.tar.gz
_eclasses_=distutils-r1 d260e4e05b2ca2981f6b6ab937e7ab9d eutils 63afaaed8aa819fdcb814c7cd39495a2 multilib 892e597faee02a5b94eb02ab512e7622 python-single-r1 b13f5baea5da0da5a5dcc6b8b79706a2 python-utils-r1 3668f5e62c6e2526acef650e8e1e8fc4 toolchain-funcs 7ffd28a8c7eea27218865352bfd3ab2f user d0a4d0735a6c0183d707ca919bd72f28 webapp 25b9b1696f5e698711f47d45c3d45e3e
-_md5_=3ddaacce3e1b8ab0d9038471751b0a61
+_md5_=e001ebe0608a56bf1a5c2978f1ab6f03
diff --git a/www-apps/trac/ChangeLog b/www-apps/trac/ChangeLog
index 14a12b28..2b1925b8 100644
--- a/www-apps/trac/ChangeLog
+++ b/www-apps/trac/ChangeLog
@@ -1,3 +1,25 @@
+ 04 Sep 2013; Bertrand Jacquin <beber@meleeweb.net>
+ +files/trac-1.0.1-changeset_11684.diff,
+ +files/trac-1.0.1-changeset_11689.diff,
+ +files/trac-1.0.1-changeset_11690.diff,
+ +files/trac-1.0.1-changeset_11691.diff,
+ +files/trac-1.0.1-changeset_11712.diff,
+ +files/trac-1.0.1-changeset_11769.diff,
+ +files/trac-1.0.1-changeset_11771.diff,
+ +files/trac-1.0.1-changeset_11773.diff,
+ +files/trac-1.0.1-changeset_11776.diff,
+ +files/trac-1.0.1-changeset_11783.diff,
+ +files/trac-1.0.1-changeset_11816.diff,
+ +files/trac-1.0.1-changeset_11876.diff,
+ +files/trac-1.0.1-changeset_11892.diff,
+ +files/trac-1.0.1-changeset_11893.diff,
+ -files/trac-1.0.1-changeset_11933.diff, trac-1.0.1.ebuild:
+ www-apps/trac: Make trac.util.tests.datefmt.I18nDateFormatTestCase sucess by
+ including changesets 11684 11689 11690 11691 11712 11769 11771 11773 11776
+ 11783 11816 11876 11892 11893 from
+ http://svn.edgewall.org/repos/trac/branches/1.0-stable, see
+ http://trac.edgewall.org/ticket/11290#comment:2
+
02 Sep 2013; Bertrand Jacquin <beber@meleeweb.net>
+files/trac-1.0.1-changeset_11933.diff, -files/trac-1.0.1-test-suite.diff,
trac-1.0.1.ebuild:
diff --git a/www-apps/trac/Manifest b/www-apps/trac/Manifest
index 4be81e37..cd233fd1 100644
--- a/www-apps/trac/Manifest
+++ b/www-apps/trac/Manifest
@@ -1,10 +1,23 @@
AUX 1.0.1-git-identity.patch 1691 SHA256 2ffbc7093cbdb6eefa7e4e936f25bdbbbf8b34a145c21e49116fb374c5e5b82b WHIRLPOOL 1a294cd7cca5cccfee2b3dacd251e55ae918fa28efad15f98013ab45730e2965fd1875af6ba1b21a4ef8d52472b0a24109e4ab9dda0ee204c54fb943f10f17bc
AUX postinst-en.txt 1331 SHA256 1799cf63e70e2ed7c3b1a1148b29ce456dda8e84ef137605549de7f1e2856a95 WHIRLPOOL d082aec44d057e3e0a7ccae6989a09c6c2e259bcc896cdd2bbea650c69c069fb9cbae7abd0db46f6c1cf6888cc36656a6a7271e2dfc962e21c5fa74708740ad8
AUX postupgrade-en.txt 665 SHA256 aec1179a04056a650a4f7429a927f510cd0e7256f889fdae2575ef471634ba41 WHIRLPOOL 512578b971cee45e0699e7461dd12ee37844bda48e69018d8956f81768e13a31ff30f91421697228410e61fa7159dc1a07e0831d8f4941e6d1bf1855d8d08207
-AUX trac-1.0.1-changeset_11933.diff 7331 SHA256 4d0aee5d17fac17dbac66c132580cfa996a8306c123035f16c984fea74e1138d WHIRLPOOL 5617dcd661d34e5239101bcf155f10ce0b2e9d0b346d76e08237177012e05c41424d771b1f7bb654ca7456ff2930d7d2467a2df3965d90079b037abbd558252d
+AUX trac-1.0.1-changeset_11684.diff 1189 SHA256 7d23c01ae67b78b23714d259d2ec66a9db9f0ce20b6c7f500645fff019d89ef3 WHIRLPOOL 995992141caca82fb95fe5ca2b19cf1ab2f6d184ad24e0aadd1efbbf78512a4a5f3032ba29d5e3f78db606e8595effff347bdfd4b67c616736d0aeb037c9525e
+AUX trac-1.0.1-changeset_11689.diff 2297 SHA256 c0f6c0de63e17c43b3c10238a7edd43ce6984d6a119116e648b45557b561f8f3 WHIRLPOOL 9c638ef1a1ed1737a99d0f158fe5f164a2efa7adab62524f22ece3beb3336efe2e63a3ce292b43b9245963b62635a0e0aa41e7bcb14086ae01c20fa3e2926071
+AUX trac-1.0.1-changeset_11690.diff 1700 SHA256 b72161bd34fbc71c4dd7653e1a03f3cc7d5c05c652ca989ff5f38018d1a41fac WHIRLPOOL a46d654528be8d2edb406f59f3800dbf7314c39655564f554712ad3464644406c0c182b8cf095ffc56a12a9d1d5ef492e36190e1add137445ea4fb3abeb64efe
+AUX trac-1.0.1-changeset_11691.diff 3207 SHA256 1025ee5fe466e5d7cb52b9f1df7cc5eb19566302beece9c93b088fc139c13663 WHIRLPOOL 71c94dd8e10ea96c2302effa35499cb2b520a1f7d2d8b4432e16476a0d7d780d52e217a0c9bb3a23fe5c895f0af352b2379620d3c064c67be3031fff3b28768e
+AUX trac-1.0.1-changeset_11712.diff 2286 SHA256 876055bc12cdf427dfb5d1522e9d40d429dfb1698c57c2e55ca3dffa6e226c50 WHIRLPOOL 7992a8f783dd7b4243ad481eb67754c610f6faa015284d0418475afe559786008458503ff4ab40da07c0d64a9417b6e93b66bb4fd153b37a6abf548ad05963c1
+AUX trac-1.0.1-changeset_11769.diff 3155 SHA256 2f9e215e08afa5c929f1a2a55d656a82daebb3ea29f57085bc318e6ab0f3f19d WHIRLPOOL 55dea8410bcb838c51ad0a117a9278f550638c6d316453663c44b318bb4553ae54cb344009cb7e628cf459bb503ea53d50af2e85ecc832a6bd62cd470cafa505
+AUX trac-1.0.1-changeset_11771.diff 7422 SHA256 559a9b12942833964dbd390eb6fea5c75232f94957c77105552d377f742e8818 WHIRLPOOL 2add7c156cbf014b4d2ff7b6603905555c6b4faa039d4e50f224e6219079ef26226b94a3031e3b9b33a799e80cc94f98d2e95ec98489aedca300a02adf16b38a
+AUX trac-1.0.1-changeset_11773.diff 1393 SHA256 35202d2e6e68456d8ef45d41d727eb8ac518f149a0f479b8c6135c00e7818cce WHIRLPOOL 0cad4f7125d3ac8b4e882f205f91a68f2e872ff398770ab3d55218aa24a76e1aefdc76e65154187f857ee649581946d9224bbb3aabb393e3bf07fee368ffae6d
+AUX trac-1.0.1-changeset_11776.diff 1708 SHA256 72a8ab96903ca3bf135008cbd513e51954c55acbc2662c6083de1494d0c9e236 WHIRLPOOL f3ca4f67e9a0344596610b715af5e77a1275f631ed786218793950e4dd03566650138a84e0c3012ebb2aeb84321b45bfc7a54cbcda974cd1008edb4a1e091b09
+AUX trac-1.0.1-changeset_11783.diff 950 SHA256 952a3d9d580572d65dd2010a7946157cf995a61c97df07cd27386fcb18be1a58 WHIRLPOOL ac9ea68692fa413a79784427f54e603b0ebcebef843f62cf5c2c47b3ebf047a8cea7cdff7fdd20b919afebb0db2c0d8ccfc58d3a70d349cbae47e3c90eab7b96
+AUX trac-1.0.1-changeset_11816.diff 1707 SHA256 480c3cbdc94aee2bece6bf6286bb37daeac7456bb6c93ea93b2ffa70a75ecc73 WHIRLPOOL 2dfafb7a4526ec662e698cfa4d0d3513a91f811bc1a5edf4a84e46812cb42247ebf50ceee04e672efc0523523aacb7ae38008f6c12226757560f0abbf64da3fd
+AUX trac-1.0.1-changeset_11876.diff 1949 SHA256 52c93f148d90e0a84d465db186ff64ba7c14d799c65997774840a61ef37dccd6 WHIRLPOOL 6e20e40a56a36536f53276aa0fccd0e0c0b88f8e65ea2ef7d6d4e7a94e247b655660623b305d6fce7eb94c4b646720195f0f79c4098306c98f63cfac86d64ee8
+AUX trac-1.0.1-changeset_11892.diff 7701 SHA256 c8bd891ee12b94aa35abc0a336a01ff07a6f991241945a2a89f36647b23284a7 WHIRLPOOL be632efa06e8a2cd1bd3a390b38de6ea6275a04a811b1a5b0000114a5b6e61c1619a2d2a4a2bb5a40c608ad402d0046edb42bf814d98339c5db6e0a7aa2400b2
+AUX trac-1.0.1-changeset_11893.diff 955 SHA256 f3e253c5bac4df10a714adad5d7df87aed937872c3e18e596738f1df3cd27a6a WHIRLPOOL 1466d07dc71512c5aeccd1d99dfb2b76caef586de49d3ab10c44213c34695ae4b94e643ce8291d01a0eb5920f7dbc76a437e124fde5053a83549fdde82245263
AUX tracd.confd 359 SHA256 6ae50c887d18f8eeda7d59c4d3fd1b5e07e407711c4e4679fef3583f7be8ed6e WHIRLPOOL 591394e732d39bc13f97004cfb3c18128aa16a55557172d872797b5ca5c69e5f15d1420e697a4e40215b2a893ed684ba6b6388abacd97874fd6f04953b579e1a
AUX tracd.initd 919 SHA256 21a2f301ec584917628a62a0809b9603a5f0b460f902b23b3867174a710bb132 WHIRLPOOL 06fc2a8833786d86821180d010de4b69fbc9eeee0c7bafd4c7ab77599740f84caec1b6bbde79ab6349100da21e246a0cf05dd1a767fafae75d02f2c8c058ebb9
DIST Trac-1.0.1.tar.gz 3479896 SHA256 9dd49065696a8d4dfcb1a1af81e51d6bd487f5a1e72b3325c1fe4ecb5c490adb WHIRLPOOL c795fab244c42752e1c7d2a0e488b1c062333a6de01e607b749271f0124c16746b55ad35a69b6844db272f7223179d6f29f9115abb5289f6af1bdf467394b1a5
-EBUILD trac-1.0.1.ebuild 2901 SHA256 c1474e7563a8caa6c97f7a9001e839a970148ceb339114cb66b255f15cda60c6 WHIRLPOOL dad753da8633b0f67379e2196e2e940d46ecea255e331f64490a9475d8e26e182060b261c504a927a19e812919a118e8cba15448df815a65fe0d0519f8b9d41d
-MISC ChangeLog 1256 SHA256 fb469e92db114224347a9652dca8d7cbcf17e1ff779e2317c7d1ffeda7f1aee9 WHIRLPOOL 22cacaf3e5c453d3f12dc057f56fe2f52704187ced478e3231936de906d4e2da3dd908b3e65d4b4f1918a1a4fafc865a41d242d65b00ee943521a21df405a14b
+EBUILD trac-1.0.1.ebuild 3496 SHA256 4b190cafa46e7da8cf987ba705824229ec6269d8a6c5b49c3cc59e03bd91b5d9 WHIRLPOOL b37728236b9b3fbb3cea99ea481a1ccdce11bdf3bfbad4a3c17474232e0dd3793e9e54e13c704e79344e671cc5b547f20f07431de6a250b0dffe82120908ecce
+MISC ChangeLog 2264 SHA256 0856d37ebc6611c86f2070e589deefd4950a8bd748eacd0ebc74f074b44c12ec WHIRLPOOL 685c531033a7450cea642f74df9b657e06f8d40c887ad2b7a36fecfc1df17dae5c177ba778524a01d51b2bc361b9a279d3870489bed40a3e85fdbc9e2558d0f5
MISC metadata.xml 375 SHA256 78fb655170713d45b48caf62f60ed1ec424aeb74fbd905f4b81595824ea456c7 WHIRLPOOL 051cbc8a2631a997006e63ea42639a4ece76b390c857bb771bf1061b950c4b876fa7e13c369800bac9f72bd5cdc62cde09a843a232369ceb2f188e2868c24f34
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11684.diff b/www-apps/trac/files/trac-1.0.1-changeset_11684.diff
new file mode 100644
index 00000000..61bd93b5
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11684.diff
@@ -0,0 +1,31 @@
+------------------------------------------------------------------------
+r11684 | cboos | 2013-02-11 21:57:53 +0100 (Mon, 11 Feb 2013) | 10 lines
+
+1.0.2dev: only list languages for which there's a message catalog.
+
+Previously we added to the list all the languages present in the
+repository. But sometimes a catalog might not be compiled (e.g. if
+marked as fuzzy), so better only propose a restricted choice
+consisting only of the languages for which a `messages.mo` file can be
+found.
+
+Fixes #10855.
+
+
+Index: trac/util/translation.py
+===================================================================
+--- trac/util/translation.py (revision 11683)
++++ trac/util/translation.py (revision 11684)
+@@ -337,7 +337,9 @@
+ try:
+ return [dirname for dirname
+ in pkg_resources.resource_listdir('trac', 'locale')
+- if '.' not in dirname]
++ if '.' not in dirname
++ and pkg_resources.resource_exists(
++ 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)]
+ except Exception:
+ return []
+
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11689.diff b/www-apps/trac/files/trac-1.0.1-changeset_11689.diff
new file mode 100644
index 00000000..7d574814
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11689.diff
@@ -0,0 +1,59 @@
+------------------------------------------------------------------------
+r11689 | cboos | 2013-02-17 16:47:01 +0100 (Sun, 17 Feb 2013) | 1 line
+
+1.0.2dev: follow-up to r11684, `parse_date()` needs the full list of locales
+
+Index: trac/util/translation.py
+===================================================================
+--- trac/util/translation.py (revision 11688)
++++ trac/util/translation.py (revision 11689)
+@@ -330,16 +330,20 @@
+ def get_translations():
+ return translations
+
+- def get_available_locales():
++ def get_available_locales(check_catalog=True):
+ """Return a list of locale identifiers of the locales for which
+ translations are available.
++
++ :param check_catalog: if `True` check for the compiled catalog
++ (.mo), otherwise the presence of the
++ directory is enough.
+ """
+ try:
+ return [dirname for dirname
+ in pkg_resources.resource_listdir('trac', 'locale')
+ if '.' not in dirname
+- and pkg_resources.resource_exists(
+- 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)]
++ and (not check_catalog or pkg_resources.resource_exists(
++ 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname))]
+ except Exception:
+ return []
+
+@@ -378,7 +382,7 @@
+ def get_translations():
+ return translations
+
+- def get_available_locales():
++ def get_available_locales(check_catalog=True):
+ return []
+
+ def get_negotiated_locale(preferred=None, default=None):
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11688)
++++ trac/util/datefmt.py (revision 11689)
+@@ -534,8 +534,8 @@
+ 'period_names': period_names,
+ }
+
+-_I18N_PARSE_DATE_PATTERNS = dict(map(lambda l: (l, False),
+- get_available_locales()))
++_I18N_PARSE_DATE_PATTERNS = dict(
++ (l, False) for l in get_available_locales(check_catalog=False))
+
+ def _i18n_parse_date(text, tzinfo, locale):
+ locale = Locale.parse(locale)
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11690.diff b/www-apps/trac/files/trac-1.0.1-changeset_11690.diff
new file mode 100644
index 00000000..9b39f8d6
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11690.diff
@@ -0,0 +1,40 @@
+------------------------------------------------------------------------
+r11690 | cboos | 2013-02-18 23:22:16 +0100 (Mon, 18 Feb 2013) | 11 lines
+
+1.0.2dev: ... and a follow-up to r11689, as there were still 2 test failures.
+
+The functional tests TestAdminMilestoneDue and
+TestAdminMilestoneDetailDue would fail with an "Invalid Date" error
+when the "en_US.mo" compiled catalog is missing.
+
+In fact, we should always have 'en_US' in the list of available
+translations, as it's the "source" language so it shouldn't matter if
+we have the compiled catalog or not. Ensuring we always have it fixes
+the tests.
+
+
+Index: trac/util/translation.py
+===================================================================
+--- trac/util/translation.py (revision 11689)
++++ trac/util/translation.py (revision 11690)
+@@ -339,11 +339,14 @@
+ directory is enough.
+ """
+ try:
+- return [dirname for dirname
+- in pkg_resources.resource_listdir('trac', 'locale')
+- if '.' not in dirname
+- and (not check_catalog or pkg_resources.resource_exists(
++ locales = [dirname for dirname
++ in pkg_resources.resource_listdir('trac', 'locale')
++ if '.' not in dirname
++ and (not check_catalog or pkg_resources.resource_exists(
+ 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname))]
++ if 'en_US' not in locales:
++ locales.append('en_US')
++ return locales
+ except Exception:
+ return []
+
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11691.diff b/www-apps/trac/files/trac-1.0.1-changeset_11691.diff
new file mode 100644
index 00000000..cb9b4137
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11691.diff
@@ -0,0 +1,81 @@
+------------------------------------------------------------------------
+r11691 | cboos | 2013-02-18 23:41:58 +0100 (Mon, 18 Feb 2013) | 15 lines
+
+1.0.2dev: second follow-up to r11689, no need for `check_catalog` param.
+
+`get_available_locales()` is defined in translation.py and clearly
+states that it corresponds to the list of locale identifiers for which
+//translations// are available. Which really means that checking for
+the presence of the compiled catalog is always the right thing to do
+(modulo the 'en_US' exception).
+
+The appropriate fix for `parse_date()` should have been to use the
+list of locales for which we have //date localization information//
+available, what the available translations are doesn't matter here.
+
+That list corresponds to what Babel provides, so we use now for that
+`get_known_locales` (= `babel.localedata.list`).
+
+
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11690)
++++ trac/util/datefmt.py (revision 11691)
+@@ -36,12 +36,16 @@
+ get_time_format, get_month_names,
+ get_period_names, get_day_names
+ )
++ from babel.localedata import list as get_known_locales
++
+ except ImportError:
+ babel = None
++ def get_known_locales():
++ return []
+
+ from trac.core import TracError
+ from trac.util.text import to_unicode, getpreferredencoding
+-from trac.util.translation import _, ngettext, get_available_locales
++from trac.util.translation import _, ngettext
+
+ # Date/time utilities
+
+@@ -534,8 +538,7 @@
+ 'period_names': period_names,
+ }
+
+-_I18N_PARSE_DATE_PATTERNS = dict(
+- (l, False) for l in get_available_locales(check_catalog=False))
++_I18N_PARSE_DATE_PATTERNS = dict((l, False) for l in get_known_locales())
+
+ def _i18n_parse_date(text, tzinfo, locale):
+ locale = Locale.parse(locale)
+Index: trac/util/translation.py
+===================================================================
+--- trac/util/translation.py (revision 11690)
++++ trac/util/translation.py (revision 11691)
+@@ -330,20 +330,16 @@
+ def get_translations():
+ return translations
+
+- def get_available_locales(check_catalog=True):
++ def get_available_locales():
+ """Return a list of locale identifiers of the locales for which
+ translations are available.
+-
+- :param check_catalog: if `True` check for the compiled catalog
+- (.mo), otherwise the presence of the
+- directory is enough.
+ """
+ try:
+ locales = [dirname for dirname
+ in pkg_resources.resource_listdir('trac', 'locale')
+ if '.' not in dirname
+- and (not check_catalog or pkg_resources.resource_exists(
+- 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname))]
++ and pkg_resources.resource_exists(
++ 'trac', 'locale/%s/LC_MESSAGES/messages.mo' % dirname)]
+ if 'en_US' not in locales:
+ locales.append('en_US')
+ return locales
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11712.diff b/www-apps/trac/files/trac-1.0.1-changeset_11712.diff
new file mode 100644
index 00000000..5e700f2a
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11712.diff
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------
+r11712 | jomae | 2013-03-10 17:07:36 +0100 (Sun, 10 Mar 2013) | 2 lines
+
+1.0.2dev: follow-up to r11684, `test_i18n_parse_date_roundtrip` needs the full list of locales in Trac if no `*.mo` files.
+
+
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11711)
++++ trac/util/tests/datefmt.py (revision 11712)
+@@ -945,20 +945,27 @@
+ datefmt.parse_date(u'2010-8-28', tz, zh_CN))
+
+ def test_i18n_parse_date_roundtrip(self):
++ from pkg_resources import resource_listdir
++ locales = sorted(dirname
++ for dirname in resource_listdir('trac', 'locale')
++ if '.' not in dirname)
++
+ tz = datefmt.timezone('GMT +2:00')
+ t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc)
+- expected = datetime.datetime(2010, 8, 28, 13, 45, 56, 0, tz)
++ tz_t = datetime.datetime(2010, 8, 28, 13, 45, 56, 0, tz)
+
+- for locale in translation.get_available_locales():
++ for locale in locales:
+ locale = Locale.parse(locale)
+ formatted = datefmt.format_datetime(t, tzinfo=tz,
+ locale=locale)
+
+ actual = datefmt.parse_date(formatted, tz, locale)
+- self.assertEqual(expected, actual,
+- '%r != %r (%r)' % (expected, actual, locale))
++ self.assertEqual(tz_t, actual,
++ '%r != %r (%r %r)' % (tz_t, actual, formatted,
++ locale))
++ self.assertEqual(tz_t.isoformat(), actual.isoformat())
+
+- actual = datefmt.format_datetime(expected, tzinfo=tz,
++ actual = datefmt.format_datetime(tz_t, tzinfo=tz,
+ locale=locale)
+ self.assertEqual(formatted, actual,
+ '%r != %r (%r)' % (formatted, actual, locale))
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11769.diff b/www-apps/trac/files/trac-1.0.1-changeset_11769.diff
new file mode 100644
index 00000000..cc0e24d8
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11769.diff
@@ -0,0 +1,73 @@
+------------------------------------------------------------------------
+r11769 | jomae | 2013-04-10 13:08:01 +0200 (Wed, 10 Apr 2013) | 2 lines
+
+1.0.2dev: merge [11768] from 0.12-stable
+
+
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11768)
++++ trac/util/tests/datefmt.py (revision 11769)
+@@ -1169,6 +1169,29 @@
+ self.assertEqual('2011-10-30T02:45:42.123456+01:00',
+ dt.astimezone(datefmt.localtz).isoformat())
+
++ def test_astimezone_invalid_range_on_gmt01(self):
++ self._tzset('GMT-1')
++
++ # 1899-12-30T23:59:58+00:00 is -0x83ac4e92 for time_t, out of range
++ # for 32-bit signed integer
++ dt = datetime.datetime(1899, 12, 30, 23, 59, 58, 123456, datefmt.utc)
++ self.assertEqual('1899-12-31T00:59:58.123456+01:00',
++ dt.astimezone(datefmt.localtz).isoformat())
++ dt = datetime.datetime(1899, 12, 30, 23, 59, 58, 123456,
++ datefmt.localtz)
++ self.assertEqual('1899-12-30T22:59:58.123456+00:00',
++ dt.astimezone(datefmt.utc).isoformat())
++
++ # 2040-12-31T23:59:58+00:00 is 0x858c84ee for time_t, out of range for
++ # 32-bit signed integer
++ dt = datetime.datetime(2040, 12, 31, 23, 59, 58, 123456, datefmt.utc)
++ self.assertEqual('2041-01-01T00:59:58.123456+01:00',
++ dt.astimezone(datefmt.localtz).isoformat())
++ dt = datetime.datetime(2040, 12, 31, 23, 59, 58, 123456,
++ datefmt.localtz)
++ self.assertEqual('2040-12-31T22:59:58.123456+00:00',
++ dt.astimezone(datefmt.utc).isoformat())
++
+ def test_arithmetic_localized_non_existent_time(self):
+ self._tzset('Europe/Paris')
+ t = datetime.datetime(2012, 3, 25, 1, 15, 42, 123456)
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11768)
++++ trac/util/datefmt.py (revision 11769)
+@@ -842,12 +842,15 @@
+ def fromutc(self, dt):
+ if dt.tzinfo is None or dt.tzinfo is not self:
+ raise ValueError('fromutc: dt.tzinfo is not self')
+- tt = time.localtime(to_timestamp(dt.replace(tzinfo=utc)))
++ try:
++ tt = time.localtime(to_timestamp(dt.replace(tzinfo=utc)))
++ except ValueError:
++ return dt.replace(tzinfo=self._std_tz) + self._std_offset
+ if tt.tm_isdst > 0:
+ tz = self._dst_tz
+ else:
+ tz = self._std_tz
+- return datetime(microsecond=dt.microsecond, tzinfo=tz, *tt[0:6])
++ return datetime(*(tt[:6] + (dt.microsecond, tz)))
+
+
+ utc = FixedOffset(0, 'UTC')
+Index: .
+===================================================================
+--- . (revision 11768)
++++ . (revision 11769)
+
+Property changes on: .
+___________________________________________________________________
+Modified: svn:mergeinfo
+ Merged /branches/0.12-stable:r11768
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11771.diff b/www-apps/trac/files/trac-1.0.1-changeset_11771.diff
new file mode 100644
index 00000000..f9b1a0aa
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11771.diff
@@ -0,0 +1,162 @@
+------------------------------------------------------------------------
+r11771 | jomae | 2013-04-10 13:27:58 +0200 (Wed, 10 Apr 2013) | 2 lines
+
+1.0.2dev: improved formatting iso8601 using `datetime.isoformat()` even if before 1900
+
+
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11770)
++++ trac/util/datefmt.py (revision 11771)
+@@ -158,51 +158,45 @@
+ 'date': {'short': '%x', 'medium': '%x', 'long': '%x', 'full': '%x'},
+ 'time': {'short': '%H:%M', 'medium': '%X', 'long': '%X', 'full': '%X'},
+ }
+-_ISO8601_FORMATS = {
+- 'datetime': {
+- '%x %X': 'iso8601', '%x': 'iso8601date', '%X': 'iso8601time',
+- 'short': '%Y-%m-%dT%H:%M', 'medium': '%Y-%m-%dT%H:%M:%S',
+- 'long': 'iso8601', 'full': 'iso8601',
+- 'iso8601': 'iso8601', None: 'iso8601'},
+- 'date': {
+- '%x %X': 'iso8601', '%x': 'iso8601date', '%X': 'iso8601time',
+- 'short': 'iso8601date', 'medium': 'iso8601date',
+- 'long': 'iso8601date', 'full': 'iso8601date',
+- 'iso8601': 'iso8601date', None: 'iso8601date'},
+- 'time': {
+- '%x %X': 'iso8601', '%x': 'iso8601date', '%X': 'iso8601time',
+- 'short': '%H:%M', 'medium': '%H:%M:%S',
+- 'long': 'iso8601time', 'full': 'iso8601time',
+- 'iso8601': 'iso8601time', None: 'iso8601time'},
+-}
+ _STRFTIME_HINTS = {'%x %X': 'datetime', '%x': 'date', '%X': 'time'}
+
+ def _format_datetime_without_babel(t, format):
+- normalize_Z = False
+- if format.lower().startswith('iso8601'):
+- if 'date' in format:
+- format = '%Y-%m-%d'
+- elif 'time' in format:
+- format = '%H:%M:%S%z'
+- normalize_Z = True
+- else:
+- format = '%Y-%m-%dT%H:%M:%S%z'
+- normalize_Z = True
+ text = t.strftime(str(format))
+- if normalize_Z:
+- text = text.replace('+0000', 'Z')
+- if not text.endswith('Z'):
+- text = text[:-2] + ":" + text[-2:]
+ encoding = getlocale(LC_TIME)[1] or getpreferredencoding() \
+ or sys.getdefaultencoding()
+ return unicode(text, encoding, 'replace')
+
++def _format_datetime_iso8601(t, format, hint):
++ if format != 'full':
++ t = t.replace(microsecond=0)
++ text = t.isoformat() # YYYY-MM-DDThh:mm:ss.SSSSSS±hh:mm
++ if format == 'short':
++ text = text[:16] # YYYY-MM-DDThh:mm
++ elif format == 'medium':
++ text = text[:19] # YYYY-MM-DDThh:mm:ss
++ elif text.endswith('+00:00'):
++ text = text[:-6] + 'Z'
++ if hint == 'date':
++ text = text.split('T', 1)[0]
++ elif hint == 'time':
++ text = text.split('T', 1)[1]
++ return unicode(text, 'ascii')
++
+ def _format_datetime(t, format, tzinfo, locale, hint):
+ t = to_datetime(t, tzinfo or localtz)
+
+- if (format in ('iso8601', 'iso8601date', 'iso8601time') or
+- locale == 'iso8601'):
+- format = _ISO8601_FORMATS[hint].get(format, format)
++ if format == 'iso8601':
++ return _format_datetime_iso8601(t, 'long', hint)
++ if format in ('iso8601date', 'iso8601time'):
++ return _format_datetime_iso8601(t, 'long', format[7:])
++ if locale == 'iso8601':
++ if format is None:
++ format = 'long'
++ elif format in _STRFTIME_HINTS:
++ hint = _STRFTIME_HINTS[format]
++ format = 'long'
++ if format in ('short', 'medium', 'long', 'full'):
++ return _format_datetime_iso8601(t, format, hint)
+ return _format_datetime_without_babel(t, format)
+
+ if babel and locale:
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11770)
++++ trac/util/tests/datefmt.py (revision 11771)
+@@ -559,6 +559,21 @@
+ self.assertEqual(datefmt.format_time(t, 'iso8601', gmt01),
+ expected.split('T')[1])
+
++ def test_format_iso8601_before_1900(self):
++ t = datetime.datetime(1899, 12, 30, 23, 58, 59, 123456, datefmt.utc)
++ self.assertEqual('1899-12-30T23:58:59Z',
++ datefmt.format_datetime(t, 'iso8601', datefmt.utc))
++ self.assertEqual('1899-12-30',
++ datefmt.format_datetime(t, 'iso8601date',
++ datefmt.utc))
++ self.assertEqual('1899-12-30',
++ datefmt.format_date(t, 'iso8601', datefmt.utc))
++ self.assertEqual('23:58:59Z',
++ datefmt.format_datetime(t, 'iso8601time',
++ datefmt.utc))
++ self.assertEqual('23:58:59Z',
++ datefmt.format_time(t, 'iso8601', datefmt.utc))
++
+ def test_format_date_accepts_date_instances(self):
+ a_date = datetime.date(2009, 8, 20)
+ self.assertEqual('2009-08-20',
+@@ -660,12 +675,38 @@
+ datefmt.format_time(t, 'medium', tz, 'iso8601'))
+ self.assertEqual('2010-08-28T11:45:56',
+ datefmt.format_datetime(t, 'medium', tz, 'iso8601'))
+- for f in ('long', 'full'):
+- self.assertEqual('11:45:56+02:00',
+- datefmt.format_time(t, f, tz, 'iso8601'))
+- self.assertEqual('2010-08-28T11:45:56+02:00',
+- datefmt.format_datetime(t, f, tz, 'iso8601'))
++ self.assertEqual('11:45:56+02:00',
++ datefmt.format_time(t, 'long', tz, 'iso8601'))
++ self.assertEqual('2010-08-28T11:45:56+02:00',
++ datefmt.format_datetime(t, 'long', tz, 'iso8601'))
++ self.assertEqual('11:45:56.123456+02:00',
++ datefmt.format_time(t, 'full', tz, 'iso8601'))
++ self.assertEqual('2010-08-28T11:45:56.123456+02:00',
++ datefmt.format_datetime(t, 'full', tz, 'iso8601'))
+
++ def test_with_babel_format_before_1900(self):
++ tz = datefmt.timezone('GMT +2:00')
++ t = datetime.datetime(1899, 8, 28, 11, 45, 56, 123456, tz)
++ for f in ('short', 'medium', 'long', 'full'):
++ self.assertEqual('1899-08-28',
++ datefmt.format_date(t, f, tz, 'iso8601'))
++ self.assertEqual('11:45',
++ datefmt.format_time(t, 'short', tz, 'iso8601'))
++ self.assertEqual('1899-08-28T11:45',
++ datefmt.format_datetime(t, 'short', tz, 'iso8601'))
++ self.assertEqual('11:45:56',
++ datefmt.format_time(t, 'medium', tz, 'iso8601'))
++ self.assertEqual('1899-08-28T11:45:56',
++ datefmt.format_datetime(t, 'medium', tz, 'iso8601'))
++ self.assertEqual('11:45:56+02:00',
++ datefmt.format_time(t, 'long', tz, 'iso8601'))
++ self.assertEqual('1899-08-28T11:45:56+02:00',
++ datefmt.format_datetime(t, 'long', tz, 'iso8601'))
++ self.assertEqual('11:45:56.123456+02:00',
++ datefmt.format_time(t, 'full', tz, 'iso8601'))
++ self.assertEqual('1899-08-28T11:45:56.123456+02:00',
++ datefmt.format_datetime(t, 'full', tz, 'iso8601'))
++
+ def test_hint(self):
+ try:
+ datefmt.parse_date('***', locale='iso8601', hint='date')
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11773.diff b/www-apps/trac/files/trac-1.0.1-changeset_11773.diff
new file mode 100644
index 00000000..119b2c7c
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11773.diff
@@ -0,0 +1,44 @@
+------------------------------------------------------------------------
+r11773 | jomae | 2013-04-10 13:48:46 +0200 (Wed, 10 Apr 2013) | 4 lines
+
+1.0.2dev: follow-up to r11691, `get_known_locales()` works with Babel 1.0dev
+
+`babel.localedata.list` has been renamed to `locale_identifiers` in [babel:r599/trunk].
+
+
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11772)
++++ trac/util/datefmt.py (revision 11773)
+@@ -26,6 +26,11 @@
+
+ try:
+ import babel
++except ImportError:
++ babel = None
++ def get_known_locales():
++ return []
++else:
+ from babel import Locale
+ from babel.core import LOCALE_ALIASES
+ from babel.dates import (
+@@ -36,13 +41,11 @@
+ get_time_format, get_month_names,
+ get_period_names, get_day_names
+ )
+- from babel.localedata import list as get_known_locales
++ try:
++ from babel.localedata import list as get_known_locales
++ except ImportError:
++ from babel.localedata import locale_identifiers as get_known_locales
+
+-except ImportError:
+- babel = None
+- def get_known_locales():
+- return []
+-
+ from trac.core import TracError
+ from trac.util.text import to_unicode, getpreferredencoding
+ from trac.util.translation import _, ngettext
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11776.diff b/www-apps/trac/files/trac-1.0.1-changeset_11776.diff
new file mode 100644
index 00000000..869c7266
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11776.diff
@@ -0,0 +1,43 @@
+------------------------------------------------------------------------
+r11776 | jomae | 2013-04-10 15:12:49 +0200 (Wed, 10 Apr 2013) | 4 lines
+
+1.0.2dev: search locale with territory in preferred languages for "first week day" before using `babel.core.LOCALE_ALIASES`
+
+A part of #10757.
+
+
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11775)
++++ trac/util/datefmt.py (revision 11776)
+@@ -32,7 +32,7 @@
+ return []
+ else:
+ from babel import Locale
+- from babel.core import LOCALE_ALIASES
++ from babel.core import LOCALE_ALIASES, UnknownLocaleError
+ from babel.dates import (
+ format_datetime as babel_format_datetime,
+ format_date as babel_format_date,
+@@ -373,6 +373,19 @@
+ if locale == 'iso8601':
+ return 1 # Monday
+ if babel and locale:
++ if not locale.territory:
++ # search first locale which has the same `langauge` and territory
++ # in preferred languages
++ for l in req.languages:
++ l = l.replace('-', '_').lower()
++ if l.startswith(locale.language.lower() + '_'):
++ try:
++ l = Locale.parse(l)
++ if l.territory:
++ locale = l
++ break
++ except UnknownLocaleError:
++ pass
+ if not locale.territory and locale.language in LOCALE_ALIASES:
+ locale = Locale.parse(LOCALE_ALIASES[locale.language])
+ return (locale.first_week_day + 1) % 7
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11783.diff b/www-apps/trac/files/trac-1.0.1-changeset_11783.diff
new file mode 100644
index 00000000..b3abbd86
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11783.diff
@@ -0,0 +1,23 @@
+------------------------------------------------------------------------
+r11783 | jomae | 2013-04-18 16:28:32 +0200 (Thu, 18 Apr 2013) | 4 lines
+
+1.0.2dev: fixed failures with Babel 1.0dev when compiled catalog is missing for current locale, introduced in babel:r651
+
+Closed #10903.
+
+
+Index: trac/util/translation.py
+===================================================================
+--- trac/util/translation.py (revision 11782)
++++ trac/util/translation.py (revision 11783)
+@@ -146,7 +146,7 @@
+ self._activate_failed = True
+ return
+ t = Translations.load(locale_dir, locale or 'en_US')
+- if not t or t.__class__ is NullTranslations:
++ if not isinstance(t, Translations):
+ t = self._null_translations
+ else:
+ t.add(Translations.load(locale_dir, locale or 'en_US',
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11816.diff b/www-apps/trac/files/trac-1.0.1-changeset_11816.diff
new file mode 100644
index 00000000..30b80e84
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11816.diff
@@ -0,0 +1,45 @@
+------------------------------------------------------------------------
+r11816 | jomae | 2013-06-10 16:00:45 +0200 (Mon, 10 Jun 2013) | 2 lines
+
+1.0.2dev: merge [11814-11815] from 0.12-stable
+
+
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11815)
++++ trac/util/tests/datefmt.py (revision 11816)
+@@ -523,6 +523,10 @@
+ self.assertEqual(datefmt.to_datetime(23L, tz), expected)
+ self.assertEqual(datefmt.to_datetime(23.0, tz), expected)
+
++ def test_to_datetime_typeerror(self):
++ self.assertRaises(TypeError, datefmt.to_datetime, 'blah')
++ self.assertRaises(TypeError, datefmt.to_datetime, u'bl\xe1h')
++
+ def test_format_datetime_utc(self):
+ t = datetime.datetime(1970, 1, 1, 1, 0, 23, 0, datefmt.utc)
+ expected = '1970-01-01T01:00:23Z'
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11815)
++++ trac/util/datefmt.py (revision 11816)
+@@ -94,6 +94,8 @@
+ timedelta(seconds=frac + 1)
+ else:
+ dt = datetime.fromtimestamp(t, tz)
++ else:
++ dt = None
+ if dt:
+ return tz.normalize(dt)
+ raise TypeError('expecting datetime, int, long, float, or None; got %s' %
+Index: .
+===================================================================
+--- . (revision 11815)
++++ . (revision 11816)
+
+Property changes on: .
+___________________________________________________________________
+Modified: svn:mergeinfo
+ Merged /branches/0.12-stable:r11814-11815
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11876.diff b/www-apps/trac/files/trac-1.0.1-changeset_11876.diff
new file mode 100644
index 00000000..c092dfd3
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11876.diff
@@ -0,0 +1,37 @@
+------------------------------------------------------------------------
+r11876 | jomae | 2013-07-28 03:53:59 +0200 (Sun, 28 Jul 2013) | 2 lines
+
+1.0.2dev: fixed test failures due to differences of date/time formats between Babel 0.9.x (CLDR 1.6.x) and Babel 1.x (CLDR 23). (a part of #11258)
+
+
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11875)
++++ trac/util/tests/datefmt.py (revision 11876)
+@@ -734,9 +734,9 @@
+ tz = datefmt.timezone('GMT +2:00')
+ t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc)
+ en_US = Locale.parse('en_US')
+- self.assertEqual('Aug 28, 2010 1:45:56 PM',
+- datefmt.format_datetime(t, tzinfo=tz,
+- locale=en_US))
++ self.assert_(datefmt.format_datetime(t, tzinfo=tz, locale=en_US)
++ in ('Aug 28, 2010 1:45:56 PM',
++ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
+ en_GB = Locale.parse('en_GB')
+ self.assertEqual('28 Aug 2010 13:45:56',
+ datefmt.format_datetime(t, tzinfo=tz,
+@@ -1022,8 +1022,9 @@
+ en_US = Locale.parse('en_US')
+
+ # Converting default format to babel's format
+- self.assertEqual('Aug 28, 2010 1:45:56 PM',
+- datefmt.format_datetime(t, '%x %X', tz, en_US))
++ self.assert_(datefmt.format_datetime(t, '%x %X', tz, en_US)
++ in ('Aug 28, 2010 1:45:56 PM',
++ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
+ self.assertEqual('Aug 28, 2010',
+ datefmt.format_datetime(t, '%x', tz, en_US))
+ self.assertEqual('1:45:56 PM',
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11933.diff b/www-apps/trac/files/trac-1.0.1-changeset_11892.diff
index 7b8c5f04..5a967f9b 100644
--- a/www-apps/trac/files/trac-1.0.1-changeset_11933.diff
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11892.diff
@@ -1,138 +1,147 @@
-Index: /trunk/trac/util/datefmt.py
-===================================================================
---- /trunk/trac/util/datefmt.py (revision 11932)
-+++ /trunk/trac/util/datefmt.py (revision 11933)
-@@ -540,6 +540,7 @@
- names = get_period_names(locale=locale)
- for period, name in names.iteritems():
-- name = name.lower()
-- period_names[name] = period
-+ if period in ('am', 'pm'):
-+ name = name.lower()
-+ period_names[name] = period
- regexp.extend(period_names.iterkeys())
-
-Index: /trunk/trac/util/tests/datefmt.py
-===================================================================
---- /trunk/trac/util/tests/datefmt.py (revision 11932)
-+++ /trunk/trac/util/tests/datefmt.py (revision 11933)
-@@ -852,11 +852,18 @@
- else:
- class I18nDateFormatTestCase(unittest.TestCase):
-+
-+ if not hasattr(unittest.TestCase, 'assertIn'):
-+ def assertIn(self, member, container, msg=None):
-+ if member not in container:
-+ raise self.failureException(msg or '%r not in %r' %
-+ (member, container))
-+
- def test_i18n_format_datetime(self):
- tz = datefmt.timezone('GMT +2:00')
- t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc)
- en_US = Locale.parse('en_US')
-- self.assertEqual('Aug 28, 2010 1:45:56 PM',
-- datefmt.format_datetime(t, tzinfo=tz,
-- locale=en_US))
-+ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=en_US),
-+ ('Aug 28, 2010 1:45:56 PM',
-+ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
- en_GB = Locale.parse('en_GB')
- self.assertEqual('28 Aug 2010 13:45:56',
-@@ -873,7 +880,7 @@
- datefmt.format_datetime(t, tzinfo=tz, locale=vi))
- zh_CN = Locale.parse('zh_CN')
-- self.assertEqual(u'2010-8-28 下午01:45:56',
-- datefmt.format_datetime(t, tzinfo=tz,
-- locale=zh_CN))
-+ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=zh_CN),
-+ (u'2010-8-28 下午01:45:56',
-+ u'2010年8月28日 下午1:45:56'))
-
- def test_i18n_format_date(self):
-@@ -896,6 +903,6 @@
- datefmt.format_date(t, tzinfo=tz, locale=vi))
- zh_CN = Locale.parse('zh_CN')
-- self.assertEqual(u'2010-8-7',
-- datefmt.format_date(t, tzinfo=tz, locale=zh_CN))
-+ self.assertIn(datefmt.format_date(t, tzinfo=tz, locale=zh_CN),
-+ (u'2010-8-7', u'2010年8月7日'))
-
- def test_i18n_format_time(self):
-@@ -919,6 +926,6 @@
- self.assertEqual('13:45:56',
- datefmt.format_time(t, tzinfo=tz, locale=vi))
-- self.assertEqual(u'下午01:45:56',
-- datefmt.format_time(t, tzinfo=tz, locale=zh_CN))
-+ self.assertIn(datefmt.format_time(t, tzinfo=tz, locale=zh_CN),
-+ (u'下午01:45:56', u'下午1:45:56'))
-
- def test_i18n_datetime_hint(self):
-@@ -930,16 +937,17 @@
- zh_CN = Locale.parse('zh_CN')
-
-- self.assert_(datefmt.get_datetime_format_hint(en_US)
-- in ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a'))
-- self.assert_(datefmt.get_datetime_format_hint(en_GB)
-- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
-- self.assert_(datefmt.get_datetime_format_hint(fr)
-- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
-- self.assertEqual('yyyy/MM/dd H:mm:ss',
-- datefmt.get_datetime_format_hint(ja))
-- self.assertEqual('HH:mm:ss dd-MM-yyyy',
-- datefmt.get_datetime_format_hint(vi))
-- self.assertEqual('yyyy-M-d ahh:mm:ss',
-- datefmt.get_datetime_format_hint(zh_CN))
-+ self.assertIn(datefmt.get_datetime_format_hint(en_US),
-+ ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a',
-+ 'MMM d, y, h:mm:ss a'))
-+ self.assertIn(datefmt.get_datetime_format_hint(en_GB),
-+ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
-+ self.assertIn(datefmt.get_datetime_format_hint(fr),
-+ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
-+ self.assertIn(datefmt.get_datetime_format_hint(ja),
-+ ('yyyy/MM/dd H:mm:ss', 'y/MM/dd H:mm:ss'))
-+ self.assertIn(datefmt.get_datetime_format_hint(vi),
-+ ('HH:mm:ss dd-MM-yyyy', 'HH:mm:ss dd-MM-y'))
-+ self.assertIn(datefmt.get_datetime_format_hint(zh_CN),
-+ ('yyyy-M-d ahh:mm:ss', u'y年M月d日 ah:mm:ss'))
-
- def test_i18n_date_hint(self):
-@@ -951,16 +959,16 @@
- zh_CN = Locale.parse('zh_CN')
-
-- self.assert_(datefmt.get_date_format_hint(en_US)
-- in ('MMM d, yyyy', 'MMM d, y'))
-- self.assert_(datefmt.get_date_format_hint(en_GB)
-- in ('d MMM yyyy', 'd MMM y'))
-- self.assert_(datefmt.get_date_format_hint(fr)
-- in ('d MMM yyyy', 'd MMM y'))
-- self.assertEqual('yyyy/MM/dd',
-- datefmt.get_date_format_hint(ja))
-- self.assertEqual('dd-MM-yyyy',
-- datefmt.get_date_format_hint(vi))
-- self.assertEqual('yyyy-M-d',
-- datefmt.get_date_format_hint(zh_CN))
-+ self.assertIn(datefmt.get_date_format_hint(en_US),
-+ ('MMM d, yyyy', 'MMM d, y'))
-+ self.assertIn(datefmt.get_date_format_hint(en_GB),
-+ ('d MMM yyyy', 'd MMM y'))
-+ self.assertIn(datefmt.get_date_format_hint(fr),
-+ ('d MMM yyyy', 'd MMM y'))
-+ self.assertIn(datefmt.get_date_format_hint(ja),
-+ ('yyyy/MM/dd', 'y/MM/dd'))
-+ self.assertIn(datefmt.get_date_format_hint(vi),
-+ ('dd-MM-yyyy', 'dd-MM-y'))
-+ self.assertIn(datefmt.get_date_format_hint(zh_CN),
-+ ('yyyy-M-d', u'y年M月d日'))
-
- def test_i18n_parse_date_iso8609(self):
-@@ -1144,6 +1152,7 @@
-
- # Converting default format to babel's format
-- self.assertEqual('Aug 28, 2010 1:45:56 PM',
-- datefmt.format_datetime(t, '%x %X', tz, en_US))
-+ self.assertIn(datefmt.format_datetime(t, '%x %X', tz, en_US),
-+ ('Aug 28, 2010 1:45:56 PM',
-+ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
- self.assertEqual('Aug 28, 2010',
- datefmt.format_datetime(t, '%x', tz, en_US))
+------------------------------------------------------------------------
+r11892 | jomae | 2013-07-29 15:46:16 +0200 (Mon, 29 Jul 2013) | 2 lines
+
+1.0.2dev: follow-ups to r11876, fixed test failures due to other differences between CLDR 1.6.x and 23 (a part of #11258)
+
+
+Index: trac/util/tests/datefmt.py
+===================================================================
+--- trac/util/tests/datefmt.py (revision 11891)
++++ trac/util/tests/datefmt.py (revision 11892)
+@@ -730,13 +730,20 @@
+ I18nDateFormatTestCase = None
+ else:
+ class I18nDateFormatTestCase(unittest.TestCase):
++
++ if not hasattr(unittest.TestCase, 'assertIn'):
++ def assertIn(self, member, container, msg=None):
++ if member not in container:
++ raise self.failureException(msg or '%r not in %r' %
++ (member, container))
++
+ def test_i18n_format_datetime(self):
+ tz = datefmt.timezone('GMT +2:00')
+ t = datetime.datetime(2010, 8, 28, 11, 45, 56, 123456, datefmt.utc)
+ en_US = Locale.parse('en_US')
+- self.assert_(datefmt.format_datetime(t, tzinfo=tz, locale=en_US)
+- in ('Aug 28, 2010 1:45:56 PM',
+- 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
++ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=en_US),
++ ('Aug 28, 2010 1:45:56 PM',
++ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
+ en_GB = Locale.parse('en_GB')
+ self.assertEqual('28 Aug 2010 13:45:56',
+ datefmt.format_datetime(t, tzinfo=tz,
+@@ -751,9 +758,9 @@
+ self.assertEqual(u'13:45:56 28-08-2010',
+ datefmt.format_datetime(t, tzinfo=tz, locale=vi))
+ zh_CN = Locale.parse('zh_CN')
+- self.assertEqual(u'2010-8-28 下午01:45:56',
+- datefmt.format_datetime(t, tzinfo=tz,
+- locale=zh_CN))
++ self.assertIn(datefmt.format_datetime(t, tzinfo=tz, locale=zh_CN),
++ (u'2010-8-28 下午01:45:56',
++ u'2010年8月28日 下午1:45:56'))
+
+ def test_i18n_format_date(self):
+ tz = datefmt.timezone('GMT +2:00')
+@@ -774,8 +781,8 @@
+ self.assertEqual(u'07-08-2010',
+ datefmt.format_date(t, tzinfo=tz, locale=vi))
+ zh_CN = Locale.parse('zh_CN')
+- self.assertEqual(u'2010-8-7',
+- datefmt.format_date(t, tzinfo=tz, locale=zh_CN))
++ self.assertIn(datefmt.format_date(t, tzinfo=tz, locale=zh_CN),
++ (u'2010-8-7', u'2010年8月7日'))
+
+ def test_i18n_format_time(self):
+ tz = datefmt.timezone('GMT +2:00')
+@@ -797,8 +804,8 @@
+ datefmt.format_time(t, tzinfo=tz, locale=ja))
+ self.assertEqual('13:45:56',
+ datefmt.format_time(t, tzinfo=tz, locale=vi))
+- self.assertEqual(u'下午01:45:56',
+- datefmt.format_time(t, tzinfo=tz, locale=zh_CN))
++ self.assertIn(datefmt.format_time(t, tzinfo=tz, locale=zh_CN),
++ (u'下午01:45:56', u'下午1:45:56'))
+
+ def test_i18n_datetime_hint(self):
+ en_US = Locale.parse('en_US')
+@@ -808,18 +815,19 @@
+ vi = Locale.parse('vi')
+ zh_CN = Locale.parse('zh_CN')
+
+- self.assert_(datefmt.get_datetime_format_hint(en_US)
+- in ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a'))
+- self.assert_(datefmt.get_datetime_format_hint(en_GB)
+- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
+- self.assert_(datefmt.get_datetime_format_hint(fr)
+- in ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
+- self.assertEqual('yyyy/MM/dd H:mm:ss',
+- datefmt.get_datetime_format_hint(ja))
+- self.assertEqual('HH:mm:ss dd-MM-yyyy',
+- datefmt.get_datetime_format_hint(vi))
+- self.assertEqual('yyyy-M-d ahh:mm:ss',
+- datefmt.get_datetime_format_hint(zh_CN))
++ self.assertIn(datefmt.get_datetime_format_hint(en_US),
++ ('MMM d, yyyy h:mm:ss a', 'MMM d, y h:mm:ss a',
++ 'MMM d, y, h:mm:ss a'))
++ self.assertIn(datefmt.get_datetime_format_hint(en_GB),
++ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
++ self.assertIn(datefmt.get_datetime_format_hint(fr),
++ ('d MMM yyyy HH:mm:ss', 'd MMM y HH:mm:ss'))
++ self.assertIn(datefmt.get_datetime_format_hint(ja),
++ ('yyyy/MM/dd H:mm:ss', 'y/MM/dd H:mm:ss'))
++ self.assertIn(datefmt.get_datetime_format_hint(vi),
++ ('HH:mm:ss dd-MM-yyyy', 'HH:mm:ss dd-MM-y'))
++ self.assertIn(datefmt.get_datetime_format_hint(zh_CN),
++ ('yyyy-M-d ahh:mm:ss', u'y年M月d日 ah:mm:ss'))
+
+ def test_i18n_date_hint(self):
+ en_US = Locale.parse('en_US')
+@@ -829,18 +837,18 @@
+ vi = Locale.parse('vi')
+ zh_CN = Locale.parse('zh_CN')
+
+- self.assert_(datefmt.get_date_format_hint(en_US)
+- in ('MMM d, yyyy', 'MMM d, y'))
+- self.assert_(datefmt.get_date_format_hint(en_GB)
+- in ('d MMM yyyy', 'd MMM y'))
+- self.assert_(datefmt.get_date_format_hint(fr)
+- in ('d MMM yyyy', 'd MMM y'))
+- self.assertEqual('yyyy/MM/dd',
+- datefmt.get_date_format_hint(ja))
+- self.assertEqual('dd-MM-yyyy',
+- datefmt.get_date_format_hint(vi))
+- self.assertEqual('yyyy-M-d',
+- datefmt.get_date_format_hint(zh_CN))
++ self.assertIn(datefmt.get_date_format_hint(en_US),
++ ('MMM d, yyyy', 'MMM d, y'))
++ self.assertIn(datefmt.get_date_format_hint(en_GB),
++ ('d MMM yyyy', 'd MMM y'))
++ self.assertIn(datefmt.get_date_format_hint(fr),
++ ('d MMM yyyy', 'd MMM y'))
++ self.assertIn(datefmt.get_date_format_hint(ja),
++ ('yyyy/MM/dd', 'y/MM/dd'))
++ self.assertIn(datefmt.get_date_format_hint(vi),
++ ('dd-MM-yyyy', 'dd-MM-y'))
++ self.assertIn(datefmt.get_date_format_hint(zh_CN),
++ ('yyyy-M-d', u'y年M月d日'))
+
+ def test_i18n_parse_date_iso8609(self):
+ tz = datefmt.timezone('GMT +2:00')
+@@ -1022,9 +1030,9 @@
+ en_US = Locale.parse('en_US')
+
+ # Converting default format to babel's format
+- self.assert_(datefmt.format_datetime(t, '%x %X', tz, en_US)
+- in ('Aug 28, 2010 1:45:56 PM',
+- 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
++ self.assertIn(datefmt.format_datetime(t, '%x %X', tz, en_US),
++ ('Aug 28, 2010 1:45:56 PM',
++ 'Aug 28, 2010, 1:45:56 PM')) # CLDR 23
+ self.assertEqual('Aug 28, 2010',
+ datefmt.format_datetime(t, '%x', tz, en_US))
+ self.assertEqual('1:45:56 PM',
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/files/trac-1.0.1-changeset_11893.diff b/www-apps/trac/files/trac-1.0.1-changeset_11893.diff
new file mode 100644
index 00000000..16f64d02
--- /dev/null
+++ b/www-apps/trac/files/trac-1.0.1-changeset_11893.diff
@@ -0,0 +1,24 @@
+------------------------------------------------------------------------
+r11893 | jomae | 2013-07-29 15:58:37 +0200 (Mon, 29 Jul 2013) | 2 lines
+
+1.0.2dev: fixed test failures caused by periods except am/pm which are retrieved from `get_period_names()` in Babel 1.0+ (a part of #11258)
+
+
+Index: trac/util/datefmt.py
+===================================================================
+--- trac/util/datefmt.py (revision 11892)
++++ trac/util/datefmt.py (revision 11893)
+@@ -538,8 +538,9 @@
+ if formats[0].find('%(a)s') != -1:
+ names = get_period_names(locale=locale)
+ for period, name in names.iteritems():
+- name = name.lower()
+- period_names[name] = period
++ if period in ('am', 'pm'):
++ name = name.lower()
++ period_names[name] = period
+ regexp.extend(period_names.iterkeys())
+
+ return {
+
+------------------------------------------------------------------------
diff --git a/www-apps/trac/trac-1.0.1.ebuild b/www-apps/trac/trac-1.0.1.ebuild
index 35f4df2c..62b9c1a5 100644
--- a/www-apps/trac/trac-1.0.1.ebuild
+++ b/www-apps/trac/trac-1.0.1.ebuild
@@ -59,18 +59,30 @@ pkg_setup() {
src_prepare() {
epatch "${FILESDIR}/${PV}-git-identity.patch"
- # http://trac.edgewall.org/ticket/11258
- # http://trac.edgewall.org/changeset/11933
- epatch "${FILESDIR}/${P}-changeset_11933.diff"
+
+ # http://trac.edgewall.org/ticket/11290
+ epatch "${FILESDIR}/${P}-changeset_11684.diff"
+ epatch "${FILESDIR}/${P}-changeset_11689.diff"
+ epatch "${FILESDIR}/${P}-changeset_11690.diff"
+ epatch "${FILESDIR}/${P}-changeset_11691.diff"
+ epatch "${FILESDIR}/${P}-changeset_11712.diff"
+ epatch "${FILESDIR}/${P}-changeset_11769.diff"
+ epatch "${FILESDIR}/${P}-changeset_11771.diff"
+ epatch "${FILESDIR}/${P}-changeset_11773.diff"
+ epatch "${FILESDIR}/${P}-changeset_11776.diff"
+ epatch "${FILESDIR}/${P}-changeset_11783.diff"
+ epatch "${FILESDIR}/${P}-changeset_11816.diff"
+ epatch "${FILESDIR}/${P}-changeset_11876.diff"
+ epatch "${FILESDIR}/${P}-changeset_11892.diff"
+ epatch "${FILESDIR}/${P}-changeset_11893.diff"
}
python_test() {
- einfo "Running ${PYTHON} trac/test.py -v"
- PYTHONPATH=. "${PYTHON}" trac/test.py -v || die
+ echo ".python = ${EPYTHON}" > Makefile.cfg
- if use i18n; then
- emake check
- fi
+ emake testopts="-v" unit-test
+ emake testopts="-v" functional-test
+ emake testopts="-v" test-wiki
}
# the default src_compile just calls setup.py build