[PATCH 1 of 3] Add cancopy() method to repo classes
Matt Mackall
mpm at selenic.com
Sat Mar 15 13:11:20 CDT 2008
On Sat, 2008-03-15 at 14:00 -0400, John Mulligan wrote:
> On Saturday 15 March 2008 1:47:15 pm Matt Mackall wrote:
> > On Sat, 2008-03-15 at 12:34 -0400, John Mulligan wrote:
> > > # HG changeset patch
> > > # User John Mulligan <phlogistonjohn at asynchrono.us>
> > > # Date 1205595829 14400
> > > # Node ID ee80fcb9d96fd9aa9cb2c1e7a0031da4eaccf267
> > > # Parent d036ea7111405d03775cf50377bfeedf027a2ee9
> > > Add cancopy() method to repo classes
> > > cancopy() returns true if direct copy can be used during clone
> >
> > It would have been better to define cancopy in the base class to be
> > something like:
> >
> > def cancopy(self):
> > return self.islocal()
>
> I wanted to, but the local() method doesn't exist for the base class (repo).
I don't think that actually matters due to delayed binding.
> So I located it where the individual local() methods were defined
> (localrepo,remoterepo,etc).
>
> Would you prefer it if I added both a local and a cancopy to the base class?
Should probably be a separate patch. islocal should be false in the base
class and overridden with true in localrepo and no one else should need
to mess with it.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list