Commit Graph

3 Commits

Author SHA1 Message Date
Mark Thomas
a3c411c1e8 commitcloud: omit older commits when pulling during sync
Summary:
Add a new config option: `commitcloud.max_sync_age`.  When set, commit cloud
will not pull in any commits that are older than this when it is joining or
syncing.  The commits are still nominally in the cloud workspace, we just
save join or sync time by not including the commits.

Reviewed By: liubov-dmitrieva

Differential Revision: D13062470

fbshipit-source-id: 17a4bdb4095766a83a4bf6d4151ae86b39edf59c
2018-11-15 12:16:19 -08:00
Mark Thomas
3a1c10039e smartlog: compare dates not time when determining one week ago
Summary:
For the smartdate template function, when displaying commits in the last week
using the day name, we compare the exact times.  This means commits made late
in the day on one day, will still show using the day name early in the day the
following week.

Instead, compare just the dates.  We can simplify the other date-based
comparisons, too.

Reviewed By: farnz

Differential Revision: D8113953

fbshipit-source-id: b9bed59ccf349e7274ad65d7ed5a7e08c50d4b53
2018-05-23 09:02:50 -07:00
Mark Thomas
2fed5ca134 smartlog: add smart date display to smartlog
Summary:
Adds two new template functions:

* `simpledate` formats recent dates in a human-friendly way, for example `Today
  at 12:00`, `Wednesday at 07:30`, or `Jan 05 at 23:45`.  The timezone used
  can be overridden.

* `smartdate` shows different results depending on whether a date is recent
  or not, where "recent" is defined by a threshold parameter.

Reviewed By: quark-zju

Differential Revision: D7123734

fbshipit-source-id: 7b68207e4debc85c0bfa72bba9b375a4aa11d7c6
2018-04-13 21:51:40 -07:00