Patchwork [remotefilelog-ext] debugindex: use normal handling for --dir

login
register
mail settings
Submitter via Mercurial-devel
Date May 18, 2016, 4:34 a.m.
Message ID <ee1d92ab3e3e90172d9a.1463546076@martinvonz.mtv.corp.google.com>
Download mbox | patch
Permalink /patch/15158/
State Accepted
Headers show

Comments

via Mercurial-devel - May 18, 2016, 4:34 a.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1451971941 28800
#      Mon Jan 04 21:32:21 2016 -0800
# Node ID ee1d92ab3e3e90172d9a222677de7291cc6ebf4e
# Parent  3db9ebc1a68ba2dd262b3a16fbfc14d911fe2589
debugindex: use normal handling for --dir

'debugindex --dir' is used for looking up the revlog of a directory
manifest, so it should use the normal (local file system) handling,
not remotefilelog.
Durham Goode - May 18, 2016, 3:04 p.m.
Accepted and pushed. Thanks!

On 5/18/16, 12:34 AM, "Martin von Zweigbergk" <martinvonz@google.com> wrote:

># HG changeset patch

># User Martin von Zweigbergk <martinvonz@google.com>

># Date 1451971941 28800

>#      Mon Jan 04 21:32:21 2016 -0800

># Node ID ee1d92ab3e3e90172d9a222677de7291cc6ebf4e

># Parent  3db9ebc1a68ba2dd262b3a16fbfc14d911fe2589

>debugindex: use normal handling for --dir

>

>'debugindex --dir' is used for looking up the revlog of a directory

>manifest, so it should use the normal (local file system) handling,

>not remotefilelog.

>

>diff -r 3db9ebc1a68b -r ee1d92ab3e3e remotefilelog/debugcommands.py

>--- a/remotefilelog/debugcommands.py	Wed May 04 14:53:23 2016 -0700

>+++ b/remotefilelog/debugcommands.py	Mon Jan 04 21:32:21 2016 -0800

>@@ -74,7 +74,9 @@

> 

> def debugindex(orig, ui, repo, file_=None, **opts):

>     """dump the contents of an index file"""

>-    if (opts.get('changelog') or opts.get('manifest') or

>+    if (opts.get('changelog') or

>+        opts.get('manifest') or

>+        opts.get('dir') or

>         not shallowrepo.requirement in repo.requirements or

>         not repo.shallowmatch(file_)):

>         return orig(ui, repo, file_, **opts)

Patch

diff -r 3db9ebc1a68b -r ee1d92ab3e3e remotefilelog/debugcommands.py
--- a/remotefilelog/debugcommands.py	Wed May 04 14:53:23 2016 -0700
+++ b/remotefilelog/debugcommands.py	Mon Jan 04 21:32:21 2016 -0800
@@ -74,7 +74,9 @@ 
 
 def debugindex(orig, ui, repo, file_=None, **opts):
     """dump the contents of an index file"""
-    if (opts.get('changelog') or opts.get('manifest') or
+    if (opts.get('changelog') or
+        opts.get('manifest') or
+        opts.get('dir') or
         not shallowrepo.requirement in repo.requirements or
         not repo.shallowmatch(file_)):
         return orig(ui, repo, file_, **opts)