--- a/mercurial/commands.py Mon Jul 17 07:43:15 2006 -0700
+++ b/mercurial/commands.py Mon Jul 17 11:30:33 2006 -0500
@@ -128,13 +128,17 @@
if not slowpath:
# Only files, no patterns. Check the history of each file.
def filerevgen(filelog):
+ cl_count = repo.changelog.count()
for i, window in increasing_windows(filelog.count()-1, -1):
revs = []
for j in xrange(i - window, i + 1):
revs.append(filelog.linkrev(filelog.node(j)))
revs.reverse()
for rev in revs:
- yield rev
+ # only yield rev for which we have the changelog, it can
+ # happen while doing "hg log" during a pull or commit
+ if rev < cl_count:
+ yield rev
minrev, maxrev = min(revs), max(revs)
for file_ in files:
@@ -3514,7 +3518,9 @@
return inst.code
except:
u.warn(_("** unknown exception encountered, details follow\n"))
- u.warn(_("** report bug details to mercurial@selenic.com\n"))
+ u.warn(_("** report bug details to "
+ "http://www.selenic.com/mercurial/bts\n"))
+ u.warn(_("** or mercurial@selenic.com\n"))
u.warn(_("** Mercurial Distributed SCM (version %s)\n")
% version.get_version())
raise
--- a/mercurial/context.py Mon Jul 17 07:43:15 2006 -0700
+++ b/mercurial/context.py Mon Jul 17 11:30:33 2006 -0500
@@ -39,21 +39,23 @@
def parents(self):
"""return contexts for each parent changeset"""
- p = self.repo.changelog.parents(self._node)
+ p = self._repo.changelog.parents(self._node)
return [ changectx(self._repo, x) for x in p ]
def children(self):
"""return contexts for each child changeset"""
- c = self.repo.changelog.children(self._node)
+ c = self._repo.changelog.children(self._node)
return [ changectx(self._repo, x) for x in c ]
def filenode(self, path):
node, flag = self._repo.manifest.find(self.changeset()[0], path)
return node
- def filectx(self, path):
+ def filectx(self, path, fileid=None):
"""get a file context from this changeset"""
- return filectx(self._repo, path, fileid=self.filenode(path))
+ if fileid is None:
+ fileid = self.filenode(path)
+ return filectx(self._repo, path, fileid=fileid)
def filectxs(self):
"""generate a file context for each file in this changeset's
@@ -77,10 +79,10 @@
if self._id:
# if given a changeset id, go ahead and look up the file
- self._changeset = changectx(repo, self._id)
+ self._changeset = self._repo.changelog.read(self._id)
node, flag = self._repo.manifest.find(self._changeset[0], path)
- self._node = node
- self._filelog = self.repo.file(self._path)
+ self._filelog = self._repo.file(self._path)
+ self._filenode = node
elif self._fileid:
# else be lazy
self._filelog = self._repo.file(self._path)
--- a/mercurial/ui.py Mon Jul 17 07:43:15 2006 -0700
+++ b/mercurial/ui.py Mon Jul 17 11:30:33 2006 -0500
@@ -209,7 +209,7 @@
def expandpath(self, loc, default=None):
"""Return repository location relative to cwd or from [paths]"""
- if "://" in loc or os.path.exists(loc):
+ if "://" in loc or os.path.isdir(loc):
return loc
path = self.config("paths", loc)