Edgewall Software

Ticket #4585 (closed defect: duplicate)

Opened 23 months ago

Last modified 20 months ago

VersionControl API inconsistency

Reported by: athomas Owned by: cboos
Priority: low Milestone:
Component: version control Version: 0.10.3
Severity: minor Keywords:
Cc:

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 23 months ago.
Patch fixing has_node() in the VC layer

Change History

Changed 23 months ago by athomas

Patch fixing has_node() in the VC layer

  Changed 23 months ago by athomas

  • priority changed from normal to low
  • severity changed from normal to minor
  • milestone set to 0.10.4

follow-up: ↓ 3   Changed 23 months 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'>

in reply to: ↑ 2   Changed 23 months 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.

  Changed 20 months ago by cboos

  • status changed from new to closed
  • resolution set to duplicate

See #4830.

  Changed 20 months ago by cboos

  • milestone 0.10.5 deleted

Add/Change #4585 (VersionControl API inconsistency)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
to The owner will change from cboos. Next status will be 'closed'
 
Note: See TracTickets for help on using tickets.