Opened 3 years ago

#9879 new defect

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 (0)

Add Comment

Modify Ticket

as new The owner will remain hvr.

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

Note: See TracTickets for help on using tickets.