Django

Code

Ticket #1327 (new)

Opened 2 years ago

Last modified 1 month ago

Support nightly-build download

Reported by: xyb <xieyanbo@gmail.com> Assigned to: jezdez
Component: Django Web site Version:
Keywords: svn nightly snapshot sprintsept14 Cc:
Triage Stage: Someday/Maybe Has patch: 1
Needs documentation: 0 Needs tests: 0
Patch needs improvement: 0

Description

Django's evolution is keep walking, getting the lastest code must use subversion. Supporting nightly-build download could be more user-friendly.

Attachments

nightly.diff (7.3 kB) - added by Jannis Leidel <jl@websushi.org> on 03/27/07 11:34:54.
Initial approach of a nightly serving app for django_website using pysvn
nightly2.diff (7.3 kB) - added by Jannis Leidel <jl@websushi.org> on 03/27/07 14:40:53.
Fixes a typo
nightly3.diff (7.4 kB) - added by Jannis Leidel <jl@websushi.org> on 03/28/07 04:12:37.
Adds version labels to archive filenames to differ them when creating archives with the included cron utility

Change History

02/18/06 15:03:45 changed by adrian

  • priority changed from normal to lowest.
  • severity changed from normal to trivial.

05/21/06 23:48:27 changed by adrian

#1741 was a duplicate.

06/05/06 12:43:15 changed by anonymous

  • priority changed from lowest to high.

06/05/06 12:56:59 changed by adrian

  • priority changed from high to low.

(follow-up: ↓ 20 ) 06/05/06 13:08:14 changed by jpaulofarias at gmail dot com

As an alternative to providing a nightly tarball, I've created a simple script to download code using http :o)

import os
import sys
import urllib
import sgmllib

class HtmlParser(sgmllib.SGMLParser):
    
    def reset(self):
        self.links = []
        sgmllib.SGMLParser.reset(self)
        
    def start_a(self, attrs):
        attrs = dict(attrs)
        if not attrs['href'].startswith('http://') and not attrs['href'] == '../':
            self.links.append(attrs['href'])
    

def download(url, basedir):
    fp = urllib.urlopen(url)
    data = fp.read()
    fp.close()
    parser = HtmlParser()
    parser.feed(data)
    parser.close()
    
    for link in parser.links:
        if link.endswith('/'):
            dirname = link[:-1]
            print 'entering', basedir + link
            try:
                os.mkdir(basedir + dirname)
            except:
                pass
            download(url + link, basedir + link)
        else:
            print 'downloading', url + link
            fp = urllib.urlopen(url + link)
            data = fp.read()
            fp.close()
            
            fp = open(basedir + link, 'w+')
            fp.write(data)
            fp.close()
    
def main():
    download('http://code.djangoproject.com/svn/django/trunk/',  './')
    
if __name__ == '__main__':
    main()

PS: Sorry adrian, I've changed it to high priority by mistake.

12/07/06 14:00:22 changed by anonymous

windows users need to change line 41 to:

fp = open(basedir + link, 'wb+')

to have the images download correctly.

01/21/07 21:59:56 changed by SmileyChris

  • stage changed from Unreviewed to Design decision needed.

Is this going to happen? Someone with power, make a decision.

03/10/07 04:17:11 changed by mtredinnick

  • stage changed from Design decision needed to Accepted.

This would be nice to have some day. It's not a high priority at the moment, but we have discussed it in the past and thought it would reasonable. The main reason not to dismiss it out of hand is that some corporate proxies are set up in a sufficiently b0rked fashion that they cannot be used for subversion access, so providing a tarball download is necessary.

To do this properly, we would actually need, say, one tarball for each of the last N days (N = 3 or 5, say), so that if one day has a broken tarball, there is still a backup.

03/27/07 11:34:54 changed by Jannis Leidel <jl@websushi.org>

  • attachment nightly.diff added.

Initial approach of a nightly serving app for django_website using pysvn

03/27/07 11:36:42 changed by Jannis Leidel <jl@websushi.org>

  • summary changed from Support nightly-build download to [PATCH] Support nightly-build download.

03/27/07 14:40:53 changed by Jannis Leidel <jl@websushi.org>

  • attachment nightly2.diff added.

Fixes a typo

03/28/07 04:12:37 changed by Jannis Leidel <jl@websushi.org>

  • attachment nightly3.diff added.

Adds version labels to archive filenames to differ them when creating archives with the included cron utility

05/19/07 19:15:08 changed by Marc Fargas <telenieko@telenieko.com>

  • has_patch set to 1.

05/22/07 20:44:02 changed by Brian Rosner <brosner@gmail.com>

I really would like to see a nightly tarball for download. Would rather wget http://nightlytarball than svn export and create my own ;)

Wouldn't this be better as a post commit hook and provide an archive of the last five commits?

05/24/07 01:00:03 changed by Jannis Leidel <jl@websushi.org>

  • keywords set to svn nightly snapshot.

Good point, running a script after a commit should be straight forward with the current code in build_nightlies.py. Just run the build_nightlies.py script and the daily nightly (??) will be build.

But maby it makes more sense to come up with snapshots instead of nightlies anyway, tagging the archive files with the revision number. Can we can please get a signal from one of the main devs?

05/24/07 01:13:04 changed by mtredinnick

It's not going to be a good idea to generate a new tarball after every commit. Commits are often very small changes, sometimes just one, two or five lines and there can be many of them close together. So sometimes we'll be generating tarballs more or less continuall and they won't be that different under that model.

Generating a tarball every 24 hours is a more reasonable interval and we can just keep the last five or so hanging around at any given moment (in case the most recent one is busted for some reason, which can easily happen).

05/24/07 08:48:07 changed by Jannis Leidel <jl@websushi.org>

Fair enough, the current patch creates the archives (tar.gz, tar.bz2 and zip) from the current trunk of every DocumentRelease object from the django_website project.
I hope you feel like really using this, I think it is very useful.

07/21/07 05:20:50 changed by Simon G. <dev@simon.net.nz>

  • stage changed from Accepted to Ready for checkin.

I've marked this as ready to checkin, since the last patch here seems to take into account all the comments and is good to go. Setting it up on the website, however, might take some time. I do think it's a good idea to get this in action soon, as it's probably less use post-1.0

09/14/07 14:47:02 changed by anonymous

  • keywords changed from svn nightly snapshot to svn nightly snapshot sprintsept14.

02/22/08 16:15:58 changed by PJCrosier

  • summary changed from [PATCH] Support nightly-build download to Support nightly-build download.

02/22/08 16:19:52 changed by jezdez

  • owner changed from nobody to jezdez.

Ha! I had already forgotten this patch. Thanks PJCrosier :)

03/17/08 12:29:21 changed by jacob

  • stage changed from Ready for checkin to Someday/Maybe.

(in reply to: ↑ 5 ) 04/04/08 04:32:04 changed by anonymous

Replying to jpaulofarias at gmail dot com:

Replace the last two function calls with this to specify a folder to download to at the command prompt.

def main(loc):
    download('http://code.djangoproject.com/svn/django/trunk/',  loc)
    
if __name__ == '__main__':
    try:
        loc = sys.argv[1]
    except IndexError:
	loc = "./"
    main(loc)

Add/Change #1327 (Support nightly-build download)




Change Properties
Action