Edgewall Software
Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#2369 closed defect (fixed)

Changeset detail displays propset on repo root as deletion

Reported by: Tim Hatch <trac@…> Owned by: Christian Boos
Priority: normal Milestone: 0.9.1
Component: version control Version: 0.9
Severity: minor Keywords:
Cc: trac@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I noticed this while trying to set svn:ignore on the root of an svn repository, but the behavior is the same for any property.

To reproduce:

$ cd /path/to/wc/root
$ svn propset "blah" "asd" .
$ svn ci -m "Updated"

View the changeset detail, and it will display incorrectly as a deletion with no path, where it should display as a modification to a property on /. Other paths work fine, it's just the display on root that's broken. This exists in the latest version of Trac straight out of svn. trac-admin resync once the propset was several revs back did not have any effect.

Attachments (1)

changeset-involving-root-r2536.patch (1.0 KB ) - added by Tim Hatch <trac@…> 18 years ago.
Diff from r2536 to enable links to root in changeset

Download all attachments as: .zip

Change History (8)

comment:1 by Christian Boos, 18 years ago

Component: generalversion control
Milestone: 0.9.1
Owner: changed from Jonas Borgström to Christian Boos
Severity: normalminor
Status: newassigned

Nice catch. Bug fix follows…

comment:2 by Christian Boos, 18 years ago

Fixed by r2536.

(I'll close the ticket once the fix is ported to 0.9-stable, after a few days)

comment:3 by Christian Boos, 18 years ago

Forgot to say that you'll need to do a trac-admin resync in order to fix the cached changeset information, and probably you'll also need to force a reload in your browser for viewing the updated changeset.

comment:4 by Tim Hatch <trac@…>, 18 years ago

Yay! r2536 fixes the problem on the back end.

However, there is still a small related formatting glitch — propedits on root don't have hrefs or text. I'm attaching a patch which will make it assume root if no path is specified which fixes this in my (admittedly limited) testing. I'm not sure if this is the "right" way to solve it since it does introduce another glitch (detailed below). I can't think of an instance off the top of my head where assuming an empty path as / is bad.

  • The behavior in trunk is to use <a href=""></a>, which is not clickable and makes the <h2> collapse in the lower changeset portion (#file0) so you can't hop to its respective /browser link at all.
  • The behavior of the patch is to force the path to / if it's empty, which does cause an inconsistency in display, but at least makes it clickable and render something. Example of inconsistency after applying the patch:
    • / (1 prop)
    • path2 (1 prop)
    • path2/path3 (1 prop)

The third option is to remove the links if there's no path, preventing goofy empty elements from being rendered.

What are your thoughts on the issue?

by Tim Hatch <trac@…>, 18 years ago

Diff from r2536 to enable links to root in changeset

comment:5 by Christian Boos, 18 years ago

Well, while doing the fix, what disturbed me was the inconsistent naming of the "root": sometimes it's "/", sometimes it's "" (empty) and sometimes it's None.

We should probably standardize on "/", as in source:/.

In that perspective, we need a second round of fixing, which should enforce that in the versioncontrol layer, leaving the web_ui/changeset.py unmodified.

I'll first merge some minor refactorings I did on the vc-refactoring branch (log:@2460:2462) before going on.

comment:6 by Christian Boos, 18 years ago

Resolution: fixed
Status: assignedclosed

Now in 0.9-stable (r2543).

comment:7 by Christian Boos, 18 years ago

In r3163, the root property change line is now correctly displayed.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.