Patchwork D5487: remotefilelog: fix bug in maybesparsematch returning alwaysmatcher

login
register
mail settings
Submitter phabricator
Date Dec. 30, 2018, 8:33 a.m.
Message ID <2350a40726ad1fe3616e31aeef1aad8b@localhost.localdomain>
Download mbox | patch
Permalink /patch/37390/
State Not Applicable
Headers show

Comments

phabricator - Dec. 30, 2018, 8:33 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG517a51d9cd7f: remotefilelog: fix bug in maybesparsematch returning alwaysmatcher (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5487?vs=12990&id=12994

REVISION DETAIL
  https://phab.mercurial-scm.org/D5487

AFFECTED FILES
  hgext/remotefilelog/shallowrepo.py

CHANGE DETAILS




To: spectral, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/hgext/remotefilelog/shallowrepo.py b/hgext/remotefilelog/shallowrepo.py
--- a/hgext/remotefilelog/shallowrepo.py
+++ b/hgext/remotefilelog/shallowrepo.py
@@ -143,8 +143,13 @@ 
             sparse repository.
             '''
             if revs:
-                return sparse.matcher(repo, revs=revs)
-            return sparse.matcher(repo)
+                ret = sparse.matcher(repo, revs=revs)
+            else:
+                ret = sparse.matcher(repo)
+
+            if ret.always():
+                return None
+            return ret
 
         def file(self, f):
             if f[0] == '/':