Please enable JavaScript to use RhodeCode Enterprise
##// END OF EJS Templates
Martin Geisler
- Mon, 20 Sep 2010 13:42:58
Show More
mercurial/archival.py
0
+7
0
@@
-150,6
+150,13
class zipit(object):
150
self . z = zipfile . ZipFile ( dest , 'w' ,
150
self . z = zipfile . ZipFile ( dest , 'w' ,
151
compress and zipfile . ZIP_DEFLATED or
151
compress and zipfile . ZIP_DEFLATED or
152
zipfile . ZIP_STORED )
152
zipfile . ZIP_STORED )
153
154
# Python's zipfile module emits deprecation warnings if we try
155
# to store files with a date before 1980.
156
epoch = 315532800 # calendar.timegm((1980, 1, 1, 0, 0, 0, 1, 1, 0))
157
if mtime < epoch :
158
mtime = epoch
159
153
self . date_time = time . gmtime ( mtime )[: 6 ]
160
self . date_time = time . gmtime ( mtime )[: 6 ]
154
161
155
def addfile ( self , name , mode , islink , data ):
162
def addfile ( self , name , mode , islink , data ):
mercurial/revset.py
0
+3
0
@@
-276,7
+276,10
def keyword(repo, subset, x):
276
return l
276
return l
277
277
278
def grep ( repo , subset , x ):
278
def grep ( repo , subset , x ):
279
try :
279
gr = re . compile ( getstring ( x , _ ( "grep wants a string" )))
280
gr = re . compile ( getstring ( x , _ ( "grep wants a string" )))
281
except re . error , e :
282
raise error . ParseError ( _ ( 'invalid match pattern: %s ' ) % e )
280
l = []
283
l = []
281
for r in subset :
284
for r in subset :
282
c = repo [ r ]
285
c = repo [ r ]
tests/test-archive.t
0
+14
0
@@
-219,5
+219,19
empty repo
219
$ hg archive .. / test - empty
219
$ hg archive .. / test - empty
220
abort : no working directory : please specify a revision
220
abort : no working directory : please specify a revision
221
[ 255 ]
221
[ 255 ]
222
old file -- date clamped to 1980
223
224
$ touch - d 1975 - 01 - 01 old
225
$ hg add old
226
$ hg commit - m old
227
$ hg archive .. / old . zip
228
$ unzip - l .. / old . zip
229
Archive : .. / old . zip
230
Length Date Time Name
231
--------- ---------- ----- ----
232
147 1980 - 01 - 01 00 : 00 old /. hg_archival . txt
233
0 1980 - 01 - 01 00 : 00 old / old
234
--------- -------
235
147 2 files
222
236
223
$ exit 0
237
$ exit 0
tests/test-revset.t
0
+4
0
@@
-211,6
+211,10
quoting needed
211
9
211
9
212
$ log 'grep("issue\d+")'
212
$ log 'grep("issue\d+")'
213
6
213
6
214
$ try 'grep("(")' # invalid regular expression
215
( 'func' , ( 'symbol' , 'grep' ) , ( 'string' , '(' ))
216
hg : parse error : invalid match pattern : unbalanced parenthesis
217
[ 255 ]
214
$ log 'head()'
218
$ log 'head()'
215
0
219
0
216
1
220
1
Site-wide shortcuts
/
Use quick search box
g h
Goto home page
g g
Goto my private gists page
g G
Goto my public gists page
g 0-9
Goto bookmarked items from 0-9
n r
New repository page
n g
New gist page
Repositories
g s
Goto summary page
g c
Goto changelog page
g f
Goto files page
g F
Goto files page with file search activated
g p
Goto pull requests page
g o
Goto repository settings
g O
Goto repository access permissions settings
t s
Toggle sidebar on some pages