# HG changeset patch # User Dirkjan Ochtman # Date 2008-11-27 15:07:17 # Node ID 5e13df32fb74a1044d4cde1ac79daf17dcfa8121 # Parent cf7741aa1e96ca26eec707d0609c24065353b35e bundlerepo doesn't really have a dirstate, throw AttributeError if requested diff --git a/hgext/graphlog.py b/hgext/graphlog.py --- a/hgext/graphlog.py +++ b/hgext/graphlog.py @@ -435,7 +435,7 @@ def gincoming(ui, repo, source="default" chlist = other.changelog.nodesbetween(incoming, revs)[0] revdag = incoming_revs(other, chlist, opts) - other_parents = other.dirstate.parents() + other_parents = [] displayer = show_changeset(ui, other, opts, buffered=True) def graphabledag(): for (ctx, parents) in revdag: diff --git a/mercurial/bundlerepo.py b/mercurial/bundlerepo.py --- a/mercurial/bundlerepo.py +++ b/mercurial/bundlerepo.py @@ -13,7 +13,7 @@ of the GNU General Public License, incor from node import hex, nullid, short from i18n import _ import changegroup, util, os, struct, bz2, zlib, tempfile, shutil, mdiff -import repo, localrepo, changelog, manifest, filelog, revlog +import repo, localrepo, changelog, manifest, filelog, revlog, context class bundlerevlog(revlog.revlog): def __init__(self, opener, indexfile, bundlefile, @@ -213,19 +213,20 @@ class bundlerepository(localrepo.localre self.changelog = bundlechangelog(self.sopener, self.bundlefile) self.manstart = self.bundlefile.tell() return self.changelog - if name == 'manifest': + elif name == 'manifest': self.bundlefile.seek(self.manstart) self.manifest = bundlemanifest(self.sopener, self.bundlefile, self.changelog.rev) self.filestart = self.bundlefile.tell() return self.manifest - if name == 'manstart': + elif name == 'manstart': self.changelog return self.manstart - if name == 'filestart': + elif name == 'filestart': self.manifest return self.filestart - return localrepo.localrepository.__getattr__(self, name) + else: + raise AttributeError(name) def url(self): return self._url @@ -267,6 +268,9 @@ class bundlerepository(localrepo.localre def cancopy(self): return False + def getcwd(self): + return os.getcwd() # always outside the repo + def instance(ui, path, create): if create: raise util.Abort(_('cannot create new bundle repository')) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -982,7 +982,7 @@ class localrepository(repo.repository): else: ctx2 = self[node2] - working = ctx2 == self[None] + working = ctx2.rev() is None parentworking = working and ctx1 == self['.'] match = match or match_.always(self.root, self.getcwd()) listignored, listclean, listunknown = ignored, clean, unknown