Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#4585 closed defect (duplicate)

VersionControl API inconsistency

Reported by: Alec Thomas Owned by: Christian Boos
Priority: low Milestone:
Component: version control Version: 0.10.3
Severity: minor Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

trac.versioncontrol.api.Repository advertises get_node() and has_node() as accepting None as the default rev.

The underlying SVN bindings used by svn_fs.SubversionRepository do not appear to accept None as a rev, and SubversionRepository.has_node() does not have logic to deal with this (get_node() does).

Additionally, SubversionRepository.has_node() accepts a pool argument, while get_node() doesn't. I'm not sure whether this is intentional, but it seemed a bit odd.

Attachments (1)

has_node-fix.diff (1.1 KB ) - added by Alec Thomas 18 years ago.
Patch fixing has_node() in the VC layer

Download all attachments as: .zip

Change History (6)

by Alec Thomas, 18 years ago

Attachment: has_node-fix.diff added

Patch fixing has_node() in the VC layer

comment:1 by Alec Thomas, 18 years ago

Milestone: 0.10.4
Priority: normallow
Severity: normalminor

comment:2 by Alec Thomas, 18 years ago

Also, this is a bit odd:

rev = repo.get_youngest_rev()
self.env.log.debug(type(rev))

Logs this:

2007-01-24 17:43:45,977 Trac[__init__] DEBUG: <type 'unicode'>

in reply to:  2 comment:3 by Christian Boos, 18 years ago

Yes, it's a bit tricky: since 0.10.3, the get_youngest_rev is now done on the cache repos, not on the svn repos (see r4303). Therefore we now have unicode revs. We probably need to normalize the rev to an int in SubversionRepository.get_youngest_rev_in_cache.

comment:4 by Christian Boos, 18 years ago

Resolution: duplicate
Status: newclosed

See #4830.

comment:5 by Christian Boos, 18 years ago

Milestone: 0.10.5

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.