Patchwork filelog: remove unused _file method

login
register
mail settings
Submitter adgar@google.com
Date Feb. 3, 2015, 6:14 a.m.
Message ID <37d6629e4026313a30be.1422944092@adgar.nyc.corp.google.com>
Download mbox | patch
Permalink /patch/7626/
State Accepted
Headers show

Comments

adgar@google.com - Feb. 3, 2015, 6:14 a.m.
# HG changeset patch
# User Mike Edgar <adgar@google.com>
# Date 1421942974 18000
#      Thu Jan 22 11:09:34 2015 -0500
# Node ID 37d6629e4026313a30beaa85205f74619ae741f2
# Parent  8b88870cbd1eeefaee0af053ae36728f8c0a1847
filelog: remove unused _file method
Pierre-Yves David - Feb. 3, 2015, 11:22 a.m.
On 02/03/2015 06:14 AM, Mike Edgar wrote:
> # HG changeset patch
> # User Mike Edgar <adgar@google.com>
> # Date 1421942974 18000
> #      Thu Jan 22 11:09:34 2015 -0500
> # Node ID 37d6629e4026313a30beaa85205f74619ae741f2
> # Parent  8b88870cbd1eeefaee0af053ae36728f8c0a1847
> filelog: remove unused _file method

I a bit puzzled about what this method was about. Pushed to the clowncopter.

If the world burns as a result we'll back it out and document its purpose.
Matt Mackall - Feb. 3, 2015, 10:45 p.m.
On Tue, 2015-02-03 at 01:14 -0500, Mike Edgar wrote:
> # HG changeset patch
> # User Mike Edgar <adgar@google.com>
> # Date 1421942974 18000
> #      Thu Jan 22 11:09:34 2015 -0500
> # Node ID 37d6629e4026313a30beaa85205f74619ae741f2
> # Parent  8b88870cbd1eeefaee0af053ae36728f8c0a1847
> filelog: remove unused _file method

This was preparation for lightweight copy support:

http://mercurial.selenic.com/wiki/RenameSpaceSavingPlan
Martin von Zweigbergk - Feb. 3, 2015, 10:51 p.m.
Since the plan hasn't materialized in almost 4 years, is it fine to delete
the functions or do you want to keep them?

On Tue Feb 03 2015 at 2:46:24 PM Matt Mackall <mpm@selenic.com> wrote:

> On Tue, 2015-02-03 at 01:14 -0500, Mike Edgar wrote:
> > # HG changeset patch
> > # User Mike Edgar <adgar@google.com>
> > # Date 1421942974 18000
> > #      Thu Jan 22 11:09:34 2015 -0500
> > # Node ID 37d6629e4026313a30beaa85205f74619ae741f2
> > # Parent  8b88870cbd1eeefaee0af053ae36728f8c0a1847
> > filelog: remove unused _file method
>
> This was preparation for lightweight copy support:
>
> http://mercurial.selenic.com/wiki/RenameSpaceSavingPlan
>
> --
> Mathematics is the supreme nostalgia of our time.
>
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
Matt Mackall - Feb. 4, 2015, midnight
On Tue, 2015-02-03 at 22:51 +0000, Martin von Zweigbergk wrote:
> Since the plan hasn't materialized in almost 4 years, is it fine to delete
> the functions or do you want to keep them?

Don't care much, just put it out there for posterity. Some day we'll
find an ambitious intern to tackle it?

Patch

diff -r 8b88870cbd1e -r 37d6629e4026 mercurial/bundlerepo.py
--- a/mercurial/bundlerepo.py	Fri Jan 16 10:57:13 2015 -0800
+++ b/mercurial/bundlerepo.py	Thu Jan 22 11:09:34 2015 -0500
@@ -177,9 +177,6 @@ 
     def baserevision(self, nodeorrev):
         return filelog.filelog.revision(self, nodeorrev)
 
-    def _file(self, f):
-        self._repo.file(f)
-
 class bundlepeer(localrepo.localpeer):
     def canpush(self):
         return False
diff -r 8b88870cbd1e -r 37d6629e4026 mercurial/filelog.py
--- a/mercurial/filelog.py	Fri Jan 16 10:57:13 2015 -0800
+++ b/mercurial/filelog.py	Thu Jan 22 11:09:34 2015 -0500
@@ -104,9 +104,6 @@ 
                 raise error.CensoredNodeError(self.indexfile, node)
             raise
 
-    def _file(self, f):
-        return filelog(self.opener, f)
-
     def _iscensored(self, rev):
         """Check if a file revision is censored."""
         return self.flags(rev) & revlog.REVIDX_ISCENSORED
diff -r 8b88870cbd1e -r 37d6629e4026 mercurial/unionrepo.py
--- a/mercurial/unionrepo.py	Fri Jan 16 10:57:13 2015 -0800
+++ b/mercurial/unionrepo.py	Thu Jan 22 11:09:34 2015 -0500
@@ -160,9 +160,6 @@ 
     def baserevdiff(self, rev1, rev2):
         return filelog.filelog.revdiff(self, rev1, rev2)
 
-    def _file(self, f):
-        self._repo.file(f)
-
 class unionpeer(localrepo.localpeer):
     def canpush(self):
         return False