##// END OF EJS Templates
archive: store number of changes since latest tag as well...
Siddharth Agarwal -
r23645:242d1181 default
parent child Browse files
Show More
@@ -276,8 +276,11 b' def archive(repo, dest, node, kind, deco'
276 276 'style': '', 'patch': None, 'git': None}
277 277 cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
278 278 ltags, dist = repo.ui.popbuffer().split('\n')
279 tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':'))
279 ltags = ltags.split(':')
280 changessince = len(repo.revs('only(.,%s)', ltags[0]))
281 tags = ''.join('latesttag: %s\n' % t for t in ltags)
280 282 tags += 'latesttagdistance: %s\n' % dist
283 tags += 'changessincelatesttag: %s\n' % changessince
281 284
282 285 return base + tags
283 286
@@ -250,6 +250,7 b' test .hg_archival.txt'
250 250 branch: default
251 251 latesttag: null
252 252 latesttagdistance: 4
253 changessincelatesttag: 4
253 254 $ hg tag -r 2 mytag
254 255 $ hg tag -r 2 anothertag
255 256 $ hg archive -r 2 ../test-lasttag
@@ -322,10 +323,10 b' old file -- date clamped to 1980'
322 323 Archive: ../old.zip
323 324 \s*Length.* (re)
324 325 *-----* (glob)
325 *147*80*00:00*old/.hg_archival.txt (glob)
326 *172*80*00:00*old/.hg_archival.txt (glob)
326 327 *0*80*00:00*old/old (glob)
327 328 *-----* (glob)
328 \s*147\s+2 files (re)
329 \s*172\s+2 files (re)
329 330
330 331 show an error when a provided pattern matches no files
331 332
General Comments 0
You need to be logged in to leave comments. Login now