Comments
Patch
@@ -576,9 +576,24 @@
return {'users': sorted(users)}
+def _successorsetdates(successorset, markers):
+ """returns the max date and the min date of the markers list
+ """
+
+ if not markers:
+ return {}
+
+ dates = [m[4] for m in markers]
+
+ return {
+ 'min_date': min(dates),
+ 'max_date': max(dates)
+ }
+
FORMATSSETSFUNCTIONS = [
_successorsetverb,
_successorsetusers,
+ _successorsetdates,
]
def preparesuccessorset(successorset, rawmarkers):
@@ -672,6 +672,19 @@
fmtsuccessors = map(lambda s: _formatrevnode(repo[s]), successors)
line.append(" as %s" % ", ".join(fmtsuccessors))
+ # Date
+ if verbose:
+ min_date = obsfateline['min_date']
+ max_date = obsfateline['max_date']
+
+ if min_date == max_date:
+ fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2')
+ line.append(" (at %s)" % fmtmin_date)
+ else:
+ fmtmin_date = util.datestr(min_date, '%Y-%m-%d %H:%M %1%2')
+ fmtmax_date = util.datestr(max_date, '%Y-%m-%d %H:%M %1%2')
+ line.append(" (between %s and %s)" % (fmtmin_date, fmtmax_date))
+
return "".join(line)
def _obsfateprinter(obsfate, repo, ui, prefix=""):
@@ -694,6 +707,8 @@
This line will contains these information:
- The list of closest successors in the log output
- The users which have evolve the changeset
+ - The date or date range of the evolution betwwen the changeset and its
+ successors
"""
# Get the needed obsfate data
@@ -102,7 +102,7 @@
o d004c8f274b9
|
| @ 471f378eab4c
- |/ Obsfate: rewritten by test1, test2 as 4:d004c8f274b9
+ |/ Obsfate: rewritten by test1, test2 as 4:d004c8f274b9 (between 2001-04-19 04:25 +0000 and 2009-02-13 23:31 +0000)
o ea207398892e
$ hg up 'desc(A1)' --hidden
@@ -125,7 +125,7 @@
o d004c8f274b9
|
| @ a468dc9b3633
- |/ Obsfate: rewritten by test2 as 4:d004c8f274b9
+ |/ Obsfate: rewritten by test2 as 4:d004c8f274b9 (at 2001-04-19 04:25 +0000)
o ea207398892e
Predecessors template should show all the predecessors as we force their display
@@ -205,11 +205,11 @@
@ d004c8f274b9
|
| x a468dc9b3633
- |/ Obsfate: rewritten by test2 as 4:d004c8f274b9
+ |/ Obsfate: rewritten by test2 as 4:d004c8f274b9 (at 2001-04-19 04:25 +0000)
| x f137d23bb3e1
| |
| x 471f378eab4c
- |/ Obsfate: rewritten by test1 as 3:a468dc9b3633
+ |/ Obsfate: rewritten by test1 as 3:a468dc9b3633 (at 2009-02-13 23:31 +0000)
o ea207398892e
Test templates with splitted commit