date:today in log broken in 2.5+

Bug #964171 reported by Matthew Fuller
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Fix Released
Medium
Jelmer Vernooij

Bug Description

With 2.4 and prior (checked with r6067 of 2.4 branch), the date:today revspec works as expected, but fails for 2.5 and bzr.dev. Note that 'yesterday' appears to work fine...

% ~/src/bzr/back-branches/2.4/bzr log -rtoday..
------------------------------------------------------------
revno: 905

% ~/src/bzr/back-branches/2.4/bzr revision-info -rtoday
905 <email address hidden>[...]

vs

% bzr log -rtoday | head -2
bzr: ERROR: Requested revision: 'today' does not exist in branch: file:///[...]

% bzr revision-info -rtoday
bzr: ERROR: Requested revision: 'today' does not exist in branch: file:///[...]

Revision history for this message
Vincent Ladeuil (vila) wrote :

Weird, this doesn't seem to be related to bzr-2.4/2.5 but rather depends on when the branch tip has been created.

Can you confirm that ?

Changed in bzr:
status: New → Incomplete
Revision history for this message
Vincent Ladeuil (vila) wrote :

Investigating a bit, the relevant change seem to be revno 6338 on bzr.dev especially:

=== modified file bzrlib/revisionspec.py
--- bzrlib/revisionspec.py 2011-10-05 18:11:19 +0000
+++ bzrlib/revisionspec.py 2011-12-01 23:10:02 +0000
@@ -750,13 +741,12 @@
                     hour=hour, minute=minute, second=second)
         branch.lock_read()
         try:
- rev = bisect.bisect(_RevListToTimestamps(revs, branch), dt)
+ rev = bisect.bisect(_RevListToTimestamps(branch), dt, 1)
         finally:
             branch.unlock()
- if rev == len(revs):
+ if rev == branch.revno():
             raise errors.InvalidRevisionSpec(self.user_spec, branch)
- else:
- return RevisionInfo(branch, rev + 1)
+ return RevisionInfo(branch, rev)

I.e. when -rdate:<whatever> is the branch tip, we raise errors.InvalidRevisionSpec and *that* seem to have changed for the edge case where we need to identify a date that is *after* the most recent revision (which may differ from tip ???).

@Jelmer: Any idea ?

Jelmer Vernooij (jelmer)
Changed in bzr:
status: Incomplete → Confirmed
importance: Undecided → Medium
importance: Medium → High
tags: added: regression revspec
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → High
importance: High → Medium
Jelmer Vernooij (jelmer)
Changed in brz:
assignee: nobody → Jelmer Vernooij (jelmer)
milestone: none → 3.1.0
milestone: 3.1.0 → 3.0.1
Jelmer Vernooij (jelmer)
Changed in brz:
milestone: 3.0.1 → 3.0.2
Vincent Ladeuil (vila)
Changed in brz:
milestone: 3.0.2 → none
Jelmer Vernooij (jelmer)
Changed in brz:
milestone: none → 3.3.1
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.