Edgewall Software
Modify

Ticket #4585 (closed defect: duplicate)

Opened 5 years ago

Last modified 5 years ago

VersionControl API inconsistency

Reported by: athomas Owned by: cboos
Priority: low Milestone:
Component: version control Version: 0.10.3
Severity: minor Keywords:
Cc:
Release Notes:
API 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

has_node-fix.diff (1.1 KB) - added by athomas 5 years ago.
Patch fixing has_node() in the VC layer

Download all attachments as: .zip

Change History

Changed 5 years ago by athomas

Patch fixing has_node() in the VC layer

comment:1 Changed 5 years ago by athomas

  • Milestone set to 0.10.4
  • Priority changed from normal to low
  • Severity changed from normal to minor

comment:2 follow-up: Changed 5 years ago by athomas

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'>

comment:3 in reply to: ↑ 2 Changed 5 years ago by cboos

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 Changed 5 years ago by cboos

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

See #4830.

comment:5 Changed 5 years ago by cboos

  • Milestone 0.10.5 deleted
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


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

 
Note: See TracTickets for help on using tickets.