Edgewall Software
Modify

Ticket #3584 (new enhancement)

Opened 5 years ago

Last modified 12 months ago

[PATCH] Zip file names should match the latest version of their contents, not of the whole repository

Reported by: eblot Owned by: osimons
Priority: normal Milestone: next-major-0.1X
Component: version control/browser Version: devel
Severity: minor Keywords: patch, zip
Cc: izzysoft@…, thijstriemstra
Release Notes:
API Changes:

Description

The original ticket appears as th:ticket:558.

I don't know which solution is the best to implement such a feature (renaming feature as Alec suggested, ...), but the current implemention is a real issue on multi-project host servers such as TracHacks.

Attachments

zip_rev.patch (946 bytes) - added by john.m.camara 4 years ago.

Download all attachments as: .zip

Change History

comment:1 Changed 5 years ago by athomas

This patch works, and I've enabled it on TracHacks:

  • trac/versioncontrol/web_ui/changeset.py

     
    228228            req.perm.assert_permission('FILE_VIEW') 
    229229            # choosing an appropriate filename 
    230230            rpath = new_path.replace('/','_') 
    231             if chgset: 
     231            if 'filename' in req.args: 
     232                filename = req.args['filename'] 
     233            elif chgset: 
    232234                if restricted: 
    233235                    filename = 'changeset_%s_r%s' % (rpath, new) 
    234236                else: 

comment:2 Changed 5 years ago by cboos

  • Component changed from general to browser
  • Milestone set to 0.12
  • Owner changed from jonas to cboos
  • Priority changed from low to normal

comment:3 Changed 4 years ago by john.m.camara

  • Milestone changed from 0.12 to 0.11

zip_rev.patch sets the rev number based on history instead of the latest rev of the repository.

Changed 4 years ago by john.m.camara

comment:4 Changed 4 years ago by john.m.camara

  • Summary changed from Zip file names should match the latest version of their contents, not of the whole repository to [PATCH] Zip file names should match the latest version of their contents, not of the whole repository

comment:5 Changed 4 years ago by eblot

  • Milestone changed from 0.11 to 0.11.1

Not for 0.11.

comment:6 Changed 4 years ago by eblot

Btw, please do not update the ticket description when you add a patch. Use [PATCH] when submitting a new ticket only, thanks.

comment:7 Changed 3 years ago by osimons

  • Keywords patch added
  • Owner changed from cboos to osimons

+1 on the idea. I'll put it on my todo.

comment:8 Changed 3 years ago by osimons

See also #5119.

comment:9 Changed 3 years ago by izzysoft@…

  • Cc izzysoft@… added

If you are once at the file names:

It would also be nice to be able to specify part of the file name. Finding files named trunk-r123.zip on my disk would drive me crazy ;) I think of a new parameter like "basename", so adding "&basename=something" would result in something-trunk-r123.zip then in the given example.

Next step would be to allow a "default basename" to be defined in your trac.ini, so the pages would render it this way by default.

comment:10 Changed 3 years ago by cboos

  • Milestone changed from 0.11-retriage to 0.11.6

comment:11 Changed 20 months ago by cboos

Moved together with #5119.

comment:12 Changed 20 months ago by cboos

  • Milestone changed from next-minor-0.12.x to next-major-0.1X

comment:13 Changed 12 months ago by thijstriemstra

  • Cc thijstriemstra added
  • Keywords patch, zip added; patch removed
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from osimons. Next status will be 'new'
The owner will be changed from osimons to anonymous. Next status will be 'assigned'
Author


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

 
Note: See TracTickets for help on using tickets.