comparison mercurial/context.py @ 32409:3e2e179ef031

devel: add a config field to force dates to timestamp 0 Add a new config field named default-date under the devel section to force all implicits date to a specific value. If a explicit date is passed, it will override the default. This patch only affect changesets. Other usages (blackbox, obsmarkers) are updated in later patchs. The test runner is setting a bunch of alias to force the '--date' argument. We will replace theses aliases in a later patch.
author Boris Feld <boris.feld@octobus.net>
date Fri, 19 May 2017 12:18:25 +0200
parents 284b18303f61
children f8fb8a441b4a
comparison
equal deleted inserted replaced
32408:420e93b0d9dc 32409:3e2e179ef031
1351 def _user(self): 1351 def _user(self):
1352 return self._repo.ui.username() 1352 return self._repo.ui.username()
1353 1353
1354 @propertycache 1354 @propertycache
1355 def _date(self): 1355 def _date(self):
1356 return util.makedate() 1356 ui = self._repo.ui
1357 date = ui.configdate('devel', 'default-date')
1358 if date is None:
1359 date = util.makedate()
1360 return date
1357 1361
1358 def subrev(self, subpath): 1362 def subrev(self, subpath):
1359 return None 1363 return None
1360 1364
1361 def manifestnode(self): 1365 def manifestnode(self):