Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/logcmdutil.py @ 41641:3d094bfaf885
subrepo: adjust subrepo prefix before calling subrepo.diff() (API)
Differential Revision: https://phab.mercurial-scm.org/D5886
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 07 Feb 2019 09:52:36 -0800 |
parents | 74f53d3bd685 |
children | d4c9eebdd72d |
comparison
equal
deleted
inserted
replaced
41640:5ee3c49fc9cd | 41641:3d094bfaf885 |
---|---|
121 # A subrepo that existed in node1 was deleted between node1 and | 121 # A subrepo that existed in node1 was deleted between node1 and |
122 # node2 (inclusive). Thus, ctx2's substate won't contain that | 122 # node2 (inclusive). Thus, ctx2's substate won't contain that |
123 # subpath. The best we can do is to ignore it. | 123 # subpath. The best we can do is to ignore it. |
124 tempnode2 = None | 124 tempnode2 = None |
125 submatch = matchmod.subdirmatcher(subpath, match) | 125 submatch = matchmod.subdirmatcher(subpath, match) |
126 subprefix = repo.wvfs.reljoin(prefix, subpath) | |
126 sub.diff(ui, diffopts, tempnode2, submatch, changes=changes, | 127 sub.diff(ui, diffopts, tempnode2, submatch, changes=changes, |
127 stat=stat, fp=fp, prefix=prefix) | 128 stat=stat, fp=fp, prefix=subprefix) |
128 | 129 |
129 class changesetdiffer(object): | 130 class changesetdiffer(object): |
130 """Generate diff of changeset with pre-configured filtering functions""" | 131 """Generate diff of changeset with pre-configured filtering functions""" |
131 | 132 |
132 def _makefilematcher(self, ctx): | 133 def _makefilematcher(self, ctx): |