changeset 39139:08b2ae9fc030

merge with stable
author Augie Fackler <augie@google.com>
date Wed, 15 Aug 2018 17:06:12 -0400
parents 18cbe2d872d3 (current diff) 7e023ce26c7f (diff)
children da130c5cef90
files mercurial/hgweb/webcommands.py
diffstat 4 files changed, 40 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/hg.py	Wed Aug 15 10:57:47 2018 +0900
+++ b/hgext/convert/hg.py	Wed Aug 15 17:06:12 2018 -0400
@@ -143,12 +143,17 @@
         for line in data.splitlines():
             s = line.split(' ', 1)
             if len(s) != 2:
+                self.ui.warn(_('invalid tag entry: "%s"\n') % line)
+                fp.write('%s\n' % line)  # Bogus, but keep for hash stability
                 continue
             revid = revmap.get(source.lookuprev(s[0]))
             if not revid:
                 if s[0] == nodemod.nullhex:
                     revid = s[0]
                 else:
+                    # missing, but keep for hash stability
+                    self.ui.warn(_('missing tag entry: "%s"\n') % line)
+                    fp.write('%s\n' % line)
                     continue
             fp.write('%s %s\n' % (revid, s[1]))
         return fp.getvalue()
--- a/mercurial/hgweb/webcommands.py	Wed Aug 15 10:57:47 2018 +0900
+++ b/mercurial/hgweb/webcommands.py	Wed Aug 15 17:06:12 2018 -0400
@@ -276,9 +276,9 @@
         if not funcsused.issubset(revset.safesymbols):
             return MODE_KEYWORD, query
 
-        mfunc = revset.match(web.repo.ui, revdef,
-                             lookup=revset.lookupfn(web.repo))
         try:
+            mfunc = revset.match(web.repo.ui, revdef,
+                                 lookup=revset.lookupfn(web.repo))
             revs = mfunc(web.repo)
             return MODE_REVSET, revs
             # ParseError: wrongly placed tokens, wrongs arguments, etc
--- a/tests/test-convert-hg-sink.t	Wed Aug 15 10:57:47 2018 +0900
+++ b/tests/test-convert-hg-sink.t	Wed Aug 15 17:06:12 2018 -0400
@@ -17,10 +17,17 @@
   $ hg ci -qAm 'add foo/file'
   $ hg tag some-tag
   $ hg tag -l local-tag
+  $ echo '1234567890123456789012345678901234567890 missing_tag' >> .hgtags
+  $ hg ci -m 'add a missing tag'
   $ hg log
+  changeset:   4:3fb95ee23a66
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     add a missing tag
+  
   changeset:   3:593cbf6fb2b4
   tag:         local-tag
-  tag:         tip
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     Added tag some-tag for changeset ad681a868e44
@@ -48,12 +55,16 @@
   scanning source...
   sorting...
   converting...
-  3 add foo and bar
-  2 remove foo
-  1 add foo/file
-  0 Added tag some-tag for changeset ad681a868e44
+  4 add foo and bar
+  3 remove foo
+  2 add foo/file
+  1 Added tag some-tag for changeset ad681a868e44
+  0 add a missing tag
+  missing tag entry: "1234567890123456789012345678901234567890 missing_tag"
   $ cd new
   $ hg log -G --template '{rev} {node|short} ({phase}) "{desc}"\n'
+  o  4 3fb95ee23a66 (public) "add a missing tag"
+  |
   o  3 593cbf6fb2b4 (public) "Added tag some-tag for changeset ad681a868e44"
   |
   o  2 ad681a868e44 (public) "add foo/file"
@@ -125,14 +136,16 @@
   scanning source...
   sorting...
   converting...
-  4 add foo and bar
-  3 remove foo
-  2 add foo/file
-  1 Added tag some-tag for changeset ad681a868e44
+  5 add foo and bar
+  4 remove foo
+  3 add foo/file
+  2 Added tag some-tag for changeset ad681a868e44
+  1 add a missing tag
+  missing tag entry: "1234567890123456789012345678901234567890 missing_tag"
   0 add baz
   $ cd new-filemap
   $ hg tags
-  tip                                2:3c74706b1ff8
+  tip                                3:7bb553f2c68a
   some-tag                           0:ba8636729451
   $ cd ..
 
--- a/tests/test-hgweb-commands.t	Wed Aug 15 10:57:47 2018 +0900
+++ b/tests/test-hgweb-commands.t	Wed Aug 15 17:06:12 2018 -0400
@@ -1227,6 +1227,16 @@
   # Mode literal keyword search
   
   
+  $ get-with-headers.py $LOCALIP:$HGPORT 'log?rev=first(::)&style=raw'
+  200 Script output follows
+  
+  
+  # HG changesets search
+  # Node ID cad8025a2e87f88c06259790adfa15acb4080123
+  # Query "first(::)"
+  # Mode literal keyword search
+  
+  
 
 Revset query with foo-bar bookmark (issue5879)