##// END OF EJS Templates
diff: support diffing explicit files in subrepos...
Matt Harbison -
r42177:db26dbbe default
parent child Browse files
Show More
@@ -105,8 +105,10 b' Interaction with Mercurial Commands'
105 Subversion subrepositories will print a warning and abort.
105 Subversion subrepositories will print a warning and abort.
106
106
107 :diff: diff does not recurse in subrepos unless -S/--subrepos is
107 :diff: diff does not recurse in subrepos unless -S/--subrepos is
108 specified. Changes are displayed as usual, on the subrepositories
108 specified. However, if you specify the full path of a file or
109 elements. Subversion subrepositories are currently silently ignored.
109 directory in a subrepo, it will be diffed even without
110 -S/--subrepos being specified. Subversion subrepositories are
111 currently silently ignored.
110
112
111 :files: files does not recurse into subrepos unless -S/--subrepos is
113 :files: files does not recurse into subrepos unless -S/--subrepos is
112 specified. However, if you specify the full path of a file or
114 specified. However, if you specify the full path of a file or
@@ -129,7 +129,6 b' def diffordiffstat(ui, repo, diffopts, n'
129 for chunk, label in chunks:
129 for chunk, label in chunks:
130 ui.write(chunk, label=label)
130 ui.write(chunk, label=label)
131
131
132 if listsubrepos:
133 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
132 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):
134 tempnode2 = node2
133 tempnode2 = node2
135 try:
134 try:
@@ -142,6 +141,7 b' def diffordiffstat(ui, repo, diffopts, n'
142 tempnode2 = None
141 tempnode2 = None
143 submatch = matchmod.subdirmatcher(subpath, match)
142 submatch = matchmod.subdirmatcher(subpath, match)
144 subprefix = repo.wvfs.reljoin(prefix, subpath)
143 subprefix = repo.wvfs.reljoin(prefix, subpath)
144 if listsubrepos or match.exact(subpath) or any(submatch.files()):
145 sub.diff(ui, diffopts, tempnode2, submatch, changes=changes,
145 sub.diff(ui, diffopts, tempnode2, submatch, changes=changes,
146 stat=stat, fp=fp, prefix=subprefix)
146 stat=stat, fp=fp, prefix=subprefix)
147
147
@@ -1875,6 +1875,19 b" Test that '[paths]' is configured correc"
1875 @@ -0,0 +1,1 @@
1875 @@ -0,0 +1,1 @@
1876 +bar
1876 +bar
1877
1877
1878 $ hg diff -X '.hgsub*' --nodates s
1879 diff -r 000000000000 s/a
1880 --- /dev/null
1881 +++ b/s/a
1882 @@ -0,0 +1,1 @@
1883 +a
1884 $ hg diff -X '.hgsub*' --nodates s/a
1885 diff -r 000000000000 s/a
1886 --- /dev/null
1887 +++ b/s/a
1888 @@ -0,0 +1,1 @@
1889 +a
1890
1878 $ cd ..
1891 $ cd ..
1879
1892
1880 test for ssh exploit 2017-07-25
1893 test for ssh exploit 2017-07-25
General Comments 0
You need to be logged in to leave comments. Login now