Edgewall Software

Opened 13 years ago

Closed 13 years ago

Last modified 10 years ago

#10414 closed defect (fixed)

Changeset view broken for deleted files after upgrade to Subversion 1.7.0 — at Version 4

Reported by: csapuntz@… Owned by:
Priority: high Milestone: 0.12.3
Component: version control Version: 0.11.7
Severity: critical Keywords: svn17
Cc: ryano@… Branch:
Release Notes:

versioncontrol: Fixed a compatibility issue with Subversion 1.7.0.

API Changes:
Internal Changes:

Description (last modified by Remy Blank)

Upgraded to Subversion 1.7.0 compiled by WanDisco on Centos 5.5.

New commits with file deletions no longer render in changeset view. Instead I get a "No node for /path in revision x" error.

Looking at the node_changes database, all the entries are marked E, even though the deletions should be marked D

Playing around on my test instance, I isolated the problem to a change in behavior between Subversion 1.6.x and 1.7.0. In Subversion 1.6.x, the change.path was None on a delete. In Subversion 1.7.0, the change.path is the path of the file that was deleted.

Recommend changing code

            if not path:
                 if base_path:

to

           if change.action == repos.CHANGE_ACTION_DELETE:
               if base_path:

in svn_fs.py. Not sure if that breaks compatiiblity with old subversion bindings though.

Problem observed on 0.11.7 but seems to exist in 0.13dev too.

Change History (4)

comment:1 by Remy Blank, 13 years ago

Component: generalversion control
Milestone: 0.12.3
Priority: normalhigh
Severity: normalcritical

Thanks for the report and fix! This should go into 0.12.3.

comment:2 by Ryan J Ollos <ryano@…>, 13 years ago

Cc: ryano@… added

comment:3 by Remy Blank, 13 years ago

Description: modified (diff)

comment:4 by Remy Blank, 13 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: newclosed

Fortunately, macports has updated their Subversion port to 1.7.0, so I could test the issue. There's indeed a change in svn.repos.ChangeCollector.delete_entry(), where the construction of ChangedPath now takes a non-None path argument. This seems like a pretty arbitrary change, and I'm a bit worried there may be other "vicious" issues like this popping up.

Anyway, your fix is almost correct, except for the fact that change.action was only introduced in 1.5.0, and AFAIK we still support 1.3 and 1.4. The complete fix is in [10833], and passes all tests with Subversion 1.6.17 and 1.7.0 (I don't have older versions, unfortunately).

Note: See TracTickets for help on using tickets.