Patchwork [2,of,2] convert: kill dead code

login
register
mail settings
Submitter Julien Cristau
Date April 6, 2016, 8:25 p.m.
Message ID <9b5bbe1978e08e13db18.1459974325@betterave.cristau.org>
Download mbox | patch
Permalink /patch/14400/
State Accepted
Headers show

Comments

Julien Cristau - April 6, 2016, 8:25 p.m.
# HG changeset patch
# User Julien Cristau <julien.cristau@logilab.fr>
# Date 1459777153 -7200
#      Mon Apr 04 15:39:13 2016 +0200
# Node ID 9b5bbe1978e08e13db1883300df60c7012dbe60b
# Parent  14688347f01754b9d1c5bd31e59b4966e3335986
convert: kill dead code

gitread is unused with the new commandline-based code.
Augie Fackler - April 7, 2016, 1:12 a.m.
On Wed, Apr 06, 2016 at 10:25:25PM +0200, Julien Cristau wrote:
> # HG changeset patch
> # User Julien Cristau <julien.cristau@logilab.fr>
> # Date 1459777153 -7200
> #      Mon Apr 04 15:39:13 2016 +0200
> # Node ID 9b5bbe1978e08e13db1883300df60c7012dbe60b
> # Parent  14688347f01754b9d1c5bd31e59b4966e3335986
> convert: kill dead code
>

queued these, thanks

>
> gitread is unused with the new commandline-based code.
>
> diff --git a/hgext/convert/git.py b/hgext/convert/git.py
> --- a/hgext/convert/git.py
> +++ b/hgext/convert/git.py
> @@ -53,11 +53,6 @@ class convert_git(common.converter_sourc
>      def gitpipe(self, *args, **kwargs):
>          return self._gitcmd(self._run3, *args, **kwargs)
>
> -    def gitread(self, s):
> -        fh = self.gitopen(s)
> -        data = fh.read()
> -        return data, fh.close()
> -
>      def __init__(self, ui, path, revs=None):
>          super(convert_git, self).__init__(ui, path, revs=revs)
>          common.commandline.__init__(self, ui, 'git')
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -53,11 +53,6 @@  class convert_git(common.converter_sourc
     def gitpipe(self, *args, **kwargs):
         return self._gitcmd(self._run3, *args, **kwargs)
 
-    def gitread(self, s):
-        fh = self.gitopen(s)
-        data = fh.read()
-        return data, fh.close()
-
     def __init__(self, ui, path, revs=None):
         super(convert_git, self).__init__(ui, path, revs=revs)
         common.commandline.__init__(self, ui, 'git')