Patchwork [10,of,10] bundlerepo: remove check of repo names - it will be audited properly later!???

login
register
mail settings
Submitter Mads Kiilerich
Date Jan. 16, 2013, 7:57 p.m.
Message ID <e442856809ae1e6914bc.1358366254@mk-desktop>
Download mbox | patch
Permalink /patch/670/
State Accepted
Headers show

Comments

Mads Kiilerich - Jan. 16, 2013, 7:57 p.m.
# HG changeset patch
# User Mads Kiilerich <madski@unity3d.com>
# Date 1358365976 -3600
# Node ID e442856809ae1e6914bc58fa574c974937de56c8
# Parent  52c0ec0dbbe5cae4daeb33d0a3591e6240e9054e
bundlerepo: remove check of repo names - it will be audited properly later!???

filelog.__init__ will prefix the path with 'data/' and it will be opened by an
opener which should audit it too ... unless it has been disabled.
tonfa - Jan. 16, 2013, 8:41 p.m.
Yeah, pathauditor should take care of it.


On Wed, Jan 16, 2013 at 8:57 PM, Mads Kiilerich <mads@kiilerich.com> wrote:

> # HG changeset patch
> # User Mads Kiilerich <madski@unity3d.com>
> # Date 1358365976 -3600
> # Node ID e442856809ae1e6914bc58fa574c974937de56c8
> # Parent  52c0ec0dbbe5cae4daeb33d0a3591e6240e9054e
> bundlerepo: remove check of repo names - it will be audited properly
> later!???
>
> filelog.__init__ will prefix the path with 'data/' and it will be opened
> by an
> opener which should audit it too ... unless it has been disabled.
>
> diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
> --- a/mercurial/bundlerepo.py
> +++ b/mercurial/bundlerepo.py
> @@ -256,8 +256,6 @@
>                      if not c:
>                          break
>
> -        if f[0] == '/':
> -            f = f[1:]
>          if f in self.bundlefilespos:
>              self.bundle.seek(self.bundlefilespos[f])
>              return bundlefilelog(self.sopener, f, self.bundle,
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py
+++ b/mercurial/bundlerepo.py
@@ -256,8 +256,6 @@ 
                     if not c:
                         break
 
-        if f[0] == '/':
-            f = f[1:]
         if f in self.bundlefilespos:
             self.bundle.seek(self.bundlefilespos[f])
             return bundlefilelog(self.sopener, f, self.bundle,