Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 24817:0bb98eee531d stable
committablefilectx: propagate ancestry info to parent to fix annotation
Before this patch, annotating working directory could include wrong revisions
that were hidden or belonged to different branches. This fixes wfctx.parents()
to set _descendantrev so that all ancestors can take advantage of the linkrev
adjustment introduced at c48924787eaa. _adjustlinkrev() can handle 'None'
revision thanks to 5a12ef618c03.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 18 Apr 2015 14:10:55 +0900 |
parents | 8eec040cb65e |
children | 8d7d0bf62f9f |
comparison
equal
deleted
inserted
replaced
24816:8eec040cb65e | 24817:0bb98eee531d |
---|---|
1616 pl = [(path, filenode(pcl[0], path), fl)] | 1616 pl = [(path, filenode(pcl[0], path), fl)] |
1617 | 1617 |
1618 for pc in pcl[1:]: | 1618 for pc in pcl[1:]: |
1619 pl.append((path, filenode(pc, path), fl)) | 1619 pl.append((path, filenode(pc, path), fl)) |
1620 | 1620 |
1621 return [filectx(self._repo, p, fileid=n, filelog=l) | 1621 return [self._parentfilectx(p, fileid=n, filelog=l) |
1622 for p, n, l in pl if n != nullid] | 1622 for p, n, l in pl if n != nullid] |
1623 | 1623 |
1624 def children(self): | 1624 def children(self): |
1625 return [] | 1625 return [] |
1626 | 1626 |