Show More
@@ -5,7 +5,7 b'' | |||||
5 | # This software may be used and distributed according to the terms of the |
|
5 | # This software may be used and distributed according to the terms of the | |
6 | # GNU General Public License version 2 or any later version. |
|
6 | # GNU General Public License version 2 or any later version. | |
7 |
|
7 | |||
8 |
from node import hex, |
|
8 | from node import hex, nullid, nullrev, short | |
9 | from i18n import _ |
|
9 | from i18n import _ | |
10 | import os, sys, errno, re, glob, tempfile |
|
10 | import os, sys, errno, re, glob, tempfile | |
11 | import util, templater, patch, error, encoding, templatekw |
|
11 | import util, templater, patch, error, encoding, templatekw | |
@@ -685,7 +685,7 b' def diffordiffstat(ui, repo, diffopts, n' | |||||
685 | ctx2 = repo[node2] |
|
685 | ctx2 = repo[node2] | |
686 | for subpath, sub in subrepo.itersubrepos(ctx1, ctx2): |
|
686 | for subpath, sub in subrepo.itersubrepos(ctx1, ctx2): | |
687 | if node2 is not None: |
|
687 | if node2 is not None: | |
688 |
node2 = |
|
688 | node2 = ctx2.substate[subpath][1] | |
689 | submatch = matchmod.narrowmatcher(subpath, match) |
|
689 | submatch = matchmod.narrowmatcher(subpath, match) | |
690 | sub.diff(diffopts, node2, submatch, changes=changes, |
|
690 | sub.diff(diffopts, node2, submatch, changes=changes, | |
691 | stat=stat, fp=fp, prefix=prefix) |
|
691 | stat=stat, fp=fp, prefix=prefix) |
@@ -305,6 +305,9 b' class hgsubrepo(abstractsubrepo):' | |||||
305 | def diff(self, diffopts, node2, match, prefix, **opts): |
|
305 | def diff(self, diffopts, node2, match, prefix, **opts): | |
306 | try: |
|
306 | try: | |
307 | node1 = node.bin(self._state[1]) |
|
307 | node1 = node.bin(self._state[1]) | |
|
308 | # We currently expect node2 to come from substate and be | |||
|
309 | # in hex format | |||
|
310 | node2 = node.bin(node2) | |||
308 | cmdutil.diffordiffstat(self._repo.ui, self._repo, diffopts, |
|
311 | cmdutil.diffordiffstat(self._repo.ui, self._repo, diffopts, | |
309 | node1, node2, match, |
|
312 | node1, node2, match, | |
310 | prefix=os.path.join(prefix, self._path), |
|
313 | prefix=os.path.join(prefix, self._path), |
@@ -153,6 +153,17 b' this commit fails because of externals c' | |||||
153 | $ hg ci -m 'amend externals from hg' |
|
153 | $ hg ci -m 'amend externals from hg' | |
154 | committing subrepository s |
|
154 | committing subrepository s | |
155 | abort: cannot commit svn externals |
|
155 | abort: cannot commit svn externals | |
|
156 | $ hg diff --subrepos -r 1:2 | grep -v diff | |||
|
157 | --- a/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 | |||
|
158 | +++ b/.hgsubstate Thu Jan 01 00:00:00 1970 +0000 | |||
|
159 | @@ -1,1 +1,1 @@ | |||
|
160 | -2 s | |||
|
161 | +3 s | |||
|
162 | --- a/a Thu Jan 01 00:00:00 1970 +0000 | |||
|
163 | +++ b/a Thu Jan 01 00:00:00 1970 +0000 | |||
|
164 | @@ -1,1 +1,2 @@ | |||
|
165 | a | |||
|
166 | +a | |||
156 | $ svn revert -q s/externals/other |
|
167 | $ svn revert -q s/externals/other | |
157 |
|
168 | |||
158 | this commit fails because of externals meta changes |
|
169 | this commit fails because of externals meta changes |
General Comments 0
You need to be logged in to leave comments.
Login now