changeset 25675:c76e8d14383a

merge with stable
author Matt Mackall <mpm@selenic.com>
date Mon, 29 Jun 2015 16:38:22 -0500
parents 5d0847cd1587 (current diff) dc05a10e1e45 (diff)
children 125cedeebae8
files mercurial/archival.py tests/test-glog.t
diffstat 2 files changed, 12 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/archival.py	Sat Jun 27 17:31:06 2015 -0700
+++ b/mercurial/archival.py	Mon Jun 29 16:38:22 2015 -0500
@@ -85,7 +85,8 @@
         cmdutil.show_changeset(repo.ui, repo, opts).show(ctx)
         ltags, dist = repo.ui.popbuffer().split('\n')
         ltags = ltags.split(':')
-        changessince = len(repo.revs('only(.,%s)', ltags[0]))
+        # XXX: ctx.rev() needs to be handled differently with wdir()
+        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
--- a/tests/test-glog.t	Sat Jun 27 17:31:06 2015 -0700
+++ b/tests/test-glog.t	Mon Jun 29 16:38:22 2015 -0500
@@ -2012,6 +2012,16 @@
   |
   o  0 add a
   
+  $ hg archive -r 7 archive
+  $ grep changessincelatesttag archive/.hg_archival.txt
+  changessincelatesttag: 1
+  $ rm -r archive
+
+changessincelatesttag with no prior tag
+  $ hg archive -r 4 archive
+  $ grep changessincelatesttag archive/.hg_archival.txt
+  changessincelatesttag: 5
+
   $ hg export 'all()'
   # HG changeset patch
   # User test