Patchwork [1,of,2] lfs: correct the directory list value returned by lfsvfs.walk()

login
register
mail settings
Submitter Matt Harbison
Date Dec. 13, 2017, 5:33 a.m.
Message ID <380a4fb92c06e6725ec3.1513143182@Envy>
Download mbox | patch
Permalink /patch/26261/
State Accepted
Headers show

Comments

Matt Harbison - Dec. 13, 2017, 5:33 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1513128158 18000
#      Tue Dec 12 20:22:38 2017 -0500
# Node ID 380a4fb92c06e6725ec3027661ecf6f6d9e6cd1d
# Parent  37d923cdeba923f4964befcc3d0789362a433a35
lfs: correct the directory list value returned by lfsvfs.walk()

Spotted by Yuya.
Yuya Nishihara - Dec. 13, 2017, 12:27 p.m.
On Wed, 13 Dec 2017 00:33:02 -0500, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1513128158 18000
> #      Tue Dec 12 20:22:38 2017 -0500
> # Node ID 380a4fb92c06e6725ec3027661ecf6f6d9e6cd1d
> # Parent  37d923cdeba923f4964befcc3d0789362a433a35
> lfs: correct the directory list value returned by lfsvfs.walk()

Queued, thanks.

Patch

diff --git a/hgext/lfs/blobstore.py b/hgext/lfs/blobstore.py
--- a/hgext/lfs/blobstore.py
+++ b/hgext/lfs/blobstore.py
@@ -34,7 +34,7 @@ 
         return super(lfsvfs, self).join(path[0:2], path[2:])
 
     def walk(self, path=None, onerror=None):
-        """Yield (dirpath, '', oids) tuple for blobs under path
+        """Yield (dirpath, [], oids) tuple for blobs under path
 
         Oids only exist in the root of this vfs, so dirpath is always ''.
         """
@@ -53,7 +53,7 @@ 
                 oids.extend([dirpath + f for f in files
                              if _lfsre.match(dirpath + f)])
 
-        yield ('', '', oids)
+        yield ('', [], oids)
 
 class filewithprogress(object):
     """a file-like object that supports __len__ and read.