[Patch] bzr status doesn't handle revision

Robey Pointer robey at lag.net
Tue Sep 13 06:47:16 BST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12 Sep 2005, at 21:04, John A Meinel wrote:

> Robey Pointer wrote:
>
>>
>>
>>> John A Meinel <john at arbash-meinel.com> writes:
>>>
>>> | bzr log -r date:+yesterday..date:-tomorrow
>>> |
>>> | (The syntax for the date code is a little bit odd, but the  
>>> above  would
>>> | print out all the changes from yesterday through today, up  
>>> until  just
>>> | before tomorrow).
>>>
>>
>> Yes, that date syntax is difficult. :)
>>
>> How about using [start,end) convention there and removing the "+" and
>> "-"?  For non-math-geeks, [start,end) is the same as python  
>> slices:  the
>> start point is included but the end point is not.
>>
>> Then "date:yesterday..date:tomorrow" would mean "everything from the
>> beginning of yesterday, right up to -- but not including -- the
>> beginning of tomorrow" or "11-Sep-2005 0:00:00 .. 12-Sep-2005
>> 23:59:59.999999".
>
> The problem as it stands is how the revision parser works, which
> generally treats each entry separately, so it doesn't know if you are
> looking for the beginning of a date range, or the end of one. The +/-
> change the meaning slightly, though I believe doing:
> bzr log -r date:yesterday..date:tomorrow
>
> Would almost work. (tomorrow would fail because there are no revisions
> which match that date. Hence you have to specify the -tomorrow so that
> it looks for the first revision before the specified time).

What if you treated all dates as "+" and used the [start,end)  
convention?  Dates before the archive started would round up to revno  
1, and dates past the end (tomorrow, for example) could be rounded to  
branch.get_revno() + 1.

Example:

revno   date
- -----   ----
167     2005-09-12 22:18
168     2005-09-13 01:14
169     2005-09-13 01:40
170     2005-09-14 15:05

date:2005-09-13..date:2005-09-14
     => [168..170)  because +2005-09-13 = 168 and +2005-09-14 = 170
     => 168 thru 169

robey

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (Darwin)

iD8DBQFDJmfqQQDkKvyJ6cMRAv8nAJ4lNXLiYYNPEOwpny4ZoUbQ88NKQACgrZFx
Ofq6Qx5kuMRMjyq1ajjEDyY=
=qobs
-----END PGP SIGNATURE-----




More information about the bazaar mailing list