Opened 5 years ago

Closed 20 months ago

#9879 closed defect (wontfix)

GitNode *must* throw NoSuchNode on invalid revisions for Bitten to work

Reported by: dvdkhlng Owned by: hvr
Priority: normal Component: GitPlugin
Severity: normal Keywords: bitten nosuchnode
Cc: Trac Release: 0.12


When git revisions are lost in a repository (due to rebases or whatever), and the Bitten plugin already had build such a revisions, then it will later die with a NoSuchChangeset excption while showing the Timeline.

A very similar probmlem existed for Bitten (see Bitten ticket 606) with SVN repositories and was fixed already. However that fix does not generalize to Git repositories, as GitNode.__init_ (called from GitRepository.get_node) does not throw NoSuchNode on invalid revisions if path is '/' (it does throw for all paths != '/').

So Bitten calls repo.get_node with an invalid revision, which succeeds (this part is try/catch protected). And later dies when calling repo.normalize_rev (this part is not protected).

What would be the correct fix? Is it sufficient to pull the ls_tree_info assignment and result check out of the if p: block in the GitNode constructor?

Attachments (0)

Change History (1)

comment:1 Changed 20 months ago by rjollos

  • Resolution set to wontfix
  • Status changed from new to closed

GitPlugin is deprecated. Please upgrade to Trac 1.0 and use TracGit.

Add Comment

Modify Ticket

as closed The owner will remain hvr.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.