Mercurial > hg
view tests/test-branch-tag-confict.t @ 16514:363e808de349 stable
i18n: use locale insensitive format for datetimes as intermediate representation (issue3398)
on some non "en" locale environments, "hg convert" is aborted, because
"util.parsedate()" fails.
it fails in "memctx.__init__()" called by "putcommit()" of "convert".
in "hg convert", datetimes gotten from source repository
are usually formatted by "util.datestr()" with default format "%a %b
%d %H:%M:%S %Y %1%2".
but on some environments, "%a" and "%b" may cause locale sensitive
string, and such string may cause parse error in "util.parsedate()".
this path uses "%Y-%m-%d %H:%M:%S %1%2" as intermediate representation
format for datetimes, because it consists only of locale insensitive
elements.
datetimes in above format are only used for passing them from
conversion logic to memctx object, so it doesn't have to be formatted
by locale sensitive one.
this patch just avoids locale sensitivity problem of "datestr()" and
"parsedate()" combintion.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Thu, 26 Apr 2012 02:41:20 +0900 |
parents | 41885892796e |
children | f2719b387380 |
line wrap: on
line source
Initial setup. $ hg init repo $ cd repo $ touch thefile $ hg ci -A -m 'Initial commit.' adding thefile Create a tag. $ hg tag branchortag Create a branch with the same name as the tag. $ hg branch branchortag marked working directory as branch branchortag (branches are permanent and global, did you want a bookmark?) $ hg ci -m 'Create a branch with the same name as a tag.' This is what we have: $ hg log changeset: 2:10519b3f489a branch: branchortag tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Create a branch with the same name as a tag. changeset: 1:2635c45ca99b user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Added tag branchortag for changeset f57387372b5d changeset: 0:f57387372b5d tag: branchortag user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Initial commit. Update to the tag: $ hg up 'tag(branchortag)' 0 files updated, 0 files merged, 1 files removed, 0 files unresolved $ hg parents changeset: 0:f57387372b5d tag: branchortag user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Initial commit. Updating to the branch: $ hg up 'branch(branchortag)' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg parents changeset: 2:10519b3f489a branch: branchortag tag: tip user: test date: Thu Jan 01 00:00:00 1970 +0000 summary: Create a branch with the same name as a tag.