Mercurial > public > mercurial-scm > hg
diff mercurial/archival.py @ 25690:98064baab877
archive: fix changesincelatesttag with wdir()
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 01 Jul 2015 15:12:45 -0500 |
parents | c76e8d14383a |
children | ce3d4b858420 |
line wrap: on
line diff
--- a/mercurial/archival.py Mon Jun 29 10:34:56 2015 -0400 +++ b/mercurial/archival.py Wed Jul 01 15:12:45 2015 -0500 @@ -86,7 +86,11 @@ ltags, dist = repo.ui.popbuffer().split('\n') ltags = ltags.split(':') # XXX: ctx.rev() needs to be handled differently with wdir() - changessince = len(repo.revs('only(%d,%s)', ctx.rev(), ltags[0])) + if ctx.rev() is None: + changessince = len(repo.revs('only(%d,%s)', ctx.p1(), + ltags[0])) + 1 + else: + changessince = len(repo.revs('only(%d,%s)', ctx.rev(), ltags[0])) tags = ''.join('latesttag: %s\n' % t for t in ltags) tags += 'latesttagdistance: %s\n' % dist tags += 'changessincelatesttag: %s\n' % changessince