jtilander / p4scripts

Automatically exported from code.google.com/p/p4scripts
MIT License
1 stars 0 forks source link

p4shelf, Add some part of the changelist description to the filename to identify the files easier. #5

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The final filename is calculated by adding the date and time to a prefix
currently, it would be nice if the description of the changelist was added
in some clean fashion to the filename as well so that we could identify the
changes afterwards.

Or we chould make a frontend that reads all the archives and you can select
which ones you want to extract.

Original issue reported on code.google.com by jim.tila...@gmail.com on 26 Oct 2008 at 12:45

GoogleCodeExporter commented 9 years ago
Patch from Alen Ladavac:
----
def createFilename(filename, comment):
       timestring = time.strftime( '%Y-%m-%d_%H-%M' )
       name, ext = os.path.splitext(filename)
       if '' != comment:
               comment = re.sub(r'\W', '_', comment)
               comment = re.sub('_+$', '', comment)
               comment = comment[:32]
               comment = '-' + comment

       if '' == ext:
               ext = '.zip'

       result = '%s_%s%s%s' % (name, timestring, comment, ext)
       logging.info( 'Target filename is %s' % result )
       return result
----

Original comment by jim.tila...@gmail.com on 2 Nov 2008 at 6:27

GoogleCodeExporter commented 9 years ago
Fixed in: http://code.google.com/p/p4scripts/source/detail?r=9

Original comment by jim.tila...@gmail.com on 2 Nov 2008 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by jim.tila...@gmail.com on 2 Nov 2008 at 6:27