-r before:date:xxx produce error if branch don't have revisions after specified date

Bug #182258 reported by Alexander Belchenko
2
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:date:2008-01-13
bzr: ERROR: Invalid revision-id {None} in KnitPackRepository(u'file:///C:/Temp/1/.bzr/repository/')

I expect that in this case latest revision should be used for branching.

Revision history for this message
Martin Pool (mbp) wrote :

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.

Changed in bzr:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Alexander Belchenko (bialix) wrote :

I understand "before" as "before". If people say "before some date" this usually means "any day till the date". Am I wrong? Or may be I misunderstand English nuances?

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 182258] Re: -r before:date:xxx produce error if branch don't have revisions after specified date

You're right, I misunderstood the bug.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
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.