On Tue, Aug 16, 2011 at 1:38 PM, Simon King <[email protected]> wrote:
> Hi Volker,
>
> On 16 Aug., 22:22, Volker Braun <[email protected]> wrote:
>> wget will by default not clobber the file with a newer version, and instead
>> save it as m4rie_for_sage.patch.1
>
> OK, but it was on a different directory, thus, no clobbering
> intended...
>

Of tangential relevance is this script I use all the time.  It let's
you "hgqimport" and give the link right off the front of the trac
ticket.  And it automatically pushes after importing, so if you have
several patches they don't all get applied in reverse by accident.

wstein@boxen:~/bin$ more hgqimport
#!/usr/bin/env python

import os, sys

for url in sys.argv[1:]:
    url = url.replace('/attachment/','/raw-attachment/')
    filename = url.split('/')[-1]
    if os.path.exists(filename):
        os.unlink(filename)
    os.system('wget %s'%url)
    os.system('hg qimport %s'%filename)
    if os.path.exists(filename):
        os.system('hg qpush')
        os.unlink(filename)

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to