Ticket #4595 (closed task: fixed)
versioncontrol api problem
| Reported by: | thomas.moschny@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.11 |
| Component: | version control | Version: | devel |
| Severity: | minor | Keywords: | api documentation |
| Cc: |
Description
Changeset.get_changes() is supposed to return tuples of type (path, kind, change, base_path, base_rev). For an implementor of the vc api it is however not clear what to return for path in case change is a DELETE.
In analogy to Repository.get_changes() (resp. its description) one would expect to be required to pass None in that case (as there is no current/new path for a deleted node.)
This however leads to an oops for restricted changeset views at this point: /trunk/trac/versioncontrol/web_ui/changeset.py@4634#L281.
The code in the if (restricted) block should ignore the value of npath iff change is a DELETE.
Furthermore, the documentation for Changeset.get_changes() could be updated accordingly.


