# HG changeset patch # User mpm@selenic.com # Date 1124248621 28800 # Node ID b765e970c9ff3dfa72d3d30130513a23bdec776e # Parent 5a034646e472c1c9e4c5bac0e356b49f009bf74c Add a local() method to repository classes diff -r 5a034646e472 -r b765e970c9ff mercurial/hg.py --- a/mercurial/hg.py Tue Aug 16 19:03:01 2005 -0800 +++ b/mercurial/hg.py Tue Aug 16 19:17:01 2005 -0800 @@ -749,6 +749,9 @@ if self.remote: return -1 return os.stat(self.path).st_dev + def local(self): + return not self.remote + def join(self, f): return os.path.join(self.path, f) @@ -1939,7 +1942,11 @@ self.ui.warn("%d integrity errors encountered!\n" % errors) return 1 -class httprepository: +class remoterepository: + def local(self): + return False + +class httprepository(remoterepository): def __init__(self, ui, path): # fix missing / after hostname s = urlparse.urlsplit(path) @@ -2078,7 +2085,7 @@ if self.repo: self.release() -class sshrepository: +class sshrepository(remoterepository): def __init__(self, ui, path): self.url = path self.ui = ui