D6650: phabricator: handle local:commits time being string or int

Kwan (Ian Moody) phabricator at mercurial-scm.org
Tue Jul 16 14:35:04 EDT 2019


Kwan added inline comments.

INLINE COMMENTS

> phabricator.py:953
>              if b'time' in commit:
> -                meta[b'date'] = b'%d 0' % commit[b'time']
> +                meta[b'date'] = b'%d 0' % int(commit[b'time'])
>              if b'branch' in commit:

I went for `int()` over switching to `%s` because if time is ever a float we'd end up with `# Date 1562019844.0 0` in the patch header.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6650/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6650

To: Kwan, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list