changeset 42094:b1b216a241cc

remotefilelog: add tests of `hg grep -r 'wdir()'` This demonstrates how remotefilelog breaks grepping dirtied working directories. A future change will introduce a fix. Differential Revision: https://phab.mercurial-scm.org/D6216
author Augie Fackler <augie@google.com>
date Mon, 08 Apr 2019 10:56:55 -0400
parents edbcf5b239f9
children 864f9f63d3ed
files tests/test-remotefilelog-blame.t
diffstat 1 files changed, 13 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-remotefilelog-blame.t	Wed Apr 03 16:03:41 2019 -0700
+++ b/tests/test-remotefilelog-blame.t	Mon Apr 08 10:56:55 2019 -0400
@@ -30,3 +30,16 @@
   1: y
   2: z
   2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over *s (glob)
+
+Test grepping the working directory.
+
+  $ hg grep --all-files x
+  x:x
+BROKEN: modifications in the wdir tries to fetch from the server.
+  $ echo foo >> x
+  $ hg grep --all-files x
+  remote: abort: working directory revision cannot be specified
+  1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *s (glob)
+  abort: error downloading file contents:
+  'connection closed early'
+  [255]