-r before:date:xxx produce error if branch don't have revisions after specified date
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Confirmed
|
Low
|
Unassigned |
Bug Description
I faced with this bug when I try to branch from a set of related branches to obtain state of the code at given date (actually for 1 august 2007). Some of my branches don't have commits after this date and unexpectedly I've got error. Below a simple test case to illustrate problem:
C:\Temp\1>bzr init .
C:\Temp\1>bzr mkdir foo
added foo
C:\Temp\1>bzr ci -m 1
Committing to: C:/Temp/1/
added foo
Committed revision 1.
C:\Temp\1>bzr info -v
Standalone tree (format: pack-0.92)
Location:
branch root: .
Format:
control: Meta directory format 1
working tree: Working tree format 4
branch: Branch format 6
repository: Packs containing knits without subtree support
In the working tree:
1 unchanged
0 modified
0 added
0 removed
0 renamed
0 unknown
0 ignored
1 versioned subdirectory
Branch history:
1 revision
1 committer
0 days old
first revision: Sat 2008-01-12 13:26:57 +0200
latest revision: Sat 2008-01-12 13:26:57 +0200
Repository:
1 revision
1 KiB
C:\Temp\1>bzr branch . bar -rbefore:
bzr: ERROR: Invalid revision-id {None} in KnitPackReposit
I expect that in this case latest revision should be used for branching.
tags: | added: check-for-breezy |
While it's probably not very helpful, in some ways it is consistent to report that the branch had no content at this date, or at least to report that in a cleaner way.
Perhaps there should be a different revspec that says 'the revision before this, or otherwise the first', or perhaps before: should just mean that.