##// END OF EJS Templates
archive: use {changessincelatesttag} to build the metadata file...
Matt Harbison -
r25725:f5f43178 default
parent child Browse files
Show More
@@ -80,16 +80,12 b' def buildmetadata(ctx):'
80 if repo.tagtype(t) == 'global')
80 if repo.tagtype(t) == 'global')
81 if not tags:
81 if not tags:
82 repo.ui.pushbuffer()
82 repo.ui.pushbuffer()
83 opts = {'template': '{latesttag}\n{latesttagdistance}',
83 opts = {'template': '{latesttag}\n{latesttagdistance}\n'
84 '{changessincelatesttag}',
84 'style': '', 'patch': None, 'git': None}
85 'style': '', 'patch': None, 'git': None}
85 cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
86 cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
86 ltags, dist = repo.ui.popbuffer().split('\n')
87 ltags, dist, changessince = repo.ui.popbuffer().split('\n')
87 ltags = ltags.split(':')
88 ltags = ltags.split(':')
88 if ctx.rev() is None:
89 changessince = len(repo.revs('only(%d,%s)', ctx.p1(),
90 ltags[0])) + 1
91 else:
92 changessince = len(repo.revs('only(%d,%s)', ctx.rev(), ltags[0]))
93 tags = ''.join('latesttag: %s\n' % t for t in ltags)
89 tags = ''.join('latesttag: %s\n' % t for t in ltags)
94 tags += 'latesttagdistance: %s\n' % dist
90 tags += 'latesttagdistance: %s\n' % dist
95 tags += 'changessincelatesttag: %s\n' % changessince
91 tags += 'changessincelatesttag: %s\n' % changessince
General Comments 0
You need to be logged in to leave comments. Login now