Edgewall Software
Modify

Ticket #2369 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Changeset detail displays propset on repo root as deletion

Reported by: Tim Hatch <trac@…> Owned by: cboos
Priority: normal Milestone: 0.9.1
Component: version control Version: 0.9
Severity: minor Keywords:
Cc: trac@…
Release Notes:
API 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

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

Download all attachments as: .zip

Change History

comment:1 Changed 6 years ago by cboos

  • Component changed from general to version control
  • Milestone set to 0.9.1
  • Owner changed from jonas to cboos
  • Severity changed from normal to minor
  • Status changed from new to assigned

Nice catch. Bug fix follows...

comment:2 Changed 6 years ago by cboos

Fixed by r2536.

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

comment:3 Changed 6 years ago by cboos

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 Changed 6 years ago by Tim Hatch <trac@…>

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?

Changed 6 years ago by Tim Hatch <trac@…>

Diff from r2536 to enable links to root in changeset

comment:5 Changed 6 years ago by cboos

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 Changed 6 years ago by cboos

  • Resolution set to fixed
  • Status changed from assigned to closed

Now in 0.9-stable (r2543).

comment:7 Changed 6 years ago by cboos

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

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.