This is an archive of the discontinued Mercurial Phabricator instance.

util: extract all date-related utils in utils/dateutil module
AbandonedPublic

Authored by lothiraldan on Feb 2 2018, 4:40 AM.

Details

Reviewers
durin42
Group Reviewers
hg-reviewers
Summary

With this commit, util.py lose 313 lines

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

lothiraldan created this revision.Feb 2 2018, 4:40 AM
lothiraldan added a subscriber: durin42.

@durin42 please tell me if I am on the right tracks

Should dateutil.py be created with ‘hg cp’ to make annotate easier?

I think this is a reasonable approach. Do mark the copy though for blame preservation, and make sure to add utils/__init__.py and add mercurial.utils to the setup.py

Thanks!

durin42 requested changes to this revision.Feb 2 2018, 10:58 AM
This revision now requires changes to proceed.Feb 2 2018, 10:58 AM

Should we alias the symbols into util to avoid the massive API break? We already re-export a number of symbols from util.

Probably, but I'd also like to time-box how long we do those exports to a release cycle or two so we can get out from under the mess.

lothiraldan updated this revision to Diff 5205.Feb 5 2018, 9:06 AM
lothiraldan abandoned this revision.Feb 5 2018, 11:28 AM

I updated the series with copying util.py to utils/dateutil.py.

I've also added the deprecation warnings but I'm not sure how to add deprecation warnings for variables.

I also splitted the change as copying util.py made the change harder to read.

Abandoned in favor of" https://phab.mercurial-scm.org/D2056

mercurial/util.py