#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)
Change History (6)
by , 19 years ago
| Attachment: | has_node-fix.diff added |
|---|
comment:1 by , 19 years ago
| Milestone: | → 0.10.4 |
|---|---|
| Priority: | normal → low |
| Severity: | normal → minor |
follow-up: 3 comment:2 by , 19 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'>
comment:3 by , 19 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:5 by , 19 years ago
| Milestone: | 0.10.5 |
|---|



Patch fixing has_node() in the VC layer