Show More
@@ -4351,11 +4351,7 b' def incoming(ui, repo, source=b"default"' | |||
|
4351 | 4351 | finally: |
|
4352 | 4352 | other.close() |
|
4353 | 4353 | |
|
4354 | repo._subtoppath = ui.expandpath(source) | |
|
4355 | try: | |
|
4356 | return hg.incoming(ui, repo, source, opts) | |
|
4357 | finally: | |
|
4358 | del repo._subtoppath | |
|
4354 | return hg.incoming(ui, repo, source, opts) | |
|
4359 | 4355 | |
|
4360 | 4356 | |
|
4361 | 4357 | @command( |
@@ -1255,7 +1255,14 b' def abortmerge(ui, repo):' | |||
|
1255 | 1255 | |
|
1256 | 1256 | |
|
1257 | 1257 | def _incoming( |
|
1258 | displaychlist, subreporecurse, ui, repo, source, opts, buffered=False | |
|
1258 | displaychlist, | |
|
1259 | subreporecurse, | |
|
1260 | ui, | |
|
1261 | repo, | |
|
1262 | source, | |
|
1263 | opts, | |
|
1264 | buffered=False, | |
|
1265 | subpath=None, | |
|
1259 | 1266 | ): |
|
1260 | 1267 | """ |
|
1261 | 1268 | Helper for incoming / gincoming. |
@@ -1270,6 +1277,14 b' def _incoming(' | |||
|
1270 | 1277 | msg %= len(srcs) |
|
1271 | 1278 | raise error.Abort(msg) |
|
1272 | 1279 | source, branches = srcs[0] |
|
1280 | if subpath is not None: | |
|
1281 | subpath = urlutil.url(subpath) | |
|
1282 | if subpath.isabs(): | |
|
1283 | source = bytes(subpath) | |
|
1284 | else: | |
|
1285 | p = urlutil.url(source) | |
|
1286 | p.path = os.path.normpath(b'%s/%s' % (p.path, subpath)) | |
|
1287 | source = bytes(p) | |
|
1273 | 1288 | other = peer(repo, opts, source) |
|
1274 | 1289 | cleanupfn = other.close |
|
1275 | 1290 | try: |
@@ -1297,7 +1312,7 b' def _incoming(' | |||
|
1297 | 1312 | return 0 # exit code is zero since we found incoming changes |
|
1298 | 1313 | |
|
1299 | 1314 | |
|
1300 | def incoming(ui, repo, source, opts): | |
|
1315 | def incoming(ui, repo, source, opts, subpath=None): | |
|
1301 | 1316 | def subreporecurse(): |
|
1302 | 1317 | ret = 1 |
|
1303 | 1318 | if opts.get(b'subrepos'): |
@@ -1321,7 +1336,9 b' def incoming(ui, repo, source, opts):' | |||
|
1321 | 1336 | count += 1 |
|
1322 | 1337 | displayer.show(other[n]) |
|
1323 | 1338 | |
|
1324 | return _incoming(display, subreporecurse, ui, repo, source, opts) | |
|
1339 | return _incoming( | |
|
1340 | display, subreporecurse, ui, repo, source, opts, subpath=subpath | |
|
1341 | ) | |
|
1325 | 1342 | |
|
1326 | 1343 | |
|
1327 | 1344 | def _outgoing(ui, repo, dests, opts, subpath=None): |
@@ -882,7 +882,8 b' class hgsubrepo(abstractsubrepo):' | |||
|
882 | 882 | opts = copy.copy(opts) |
|
883 | 883 | opts.pop(b'rev', None) |
|
884 | 884 | opts.pop(b'branch', None) |
|
885 | return hg.incoming(ui, self._repo, _abssource(self._repo, False), opts) | |
|
885 | subpath = subrepoutil.repo_rel_or_abs_source(self._repo) | |
|
886 | return hg.incoming(ui, self._repo, source, opts, subpath=subpath) | |
|
886 | 887 | |
|
887 | 888 | @annotatesubrepoerror |
|
888 | 889 | def files(self): |
General Comments 0
You need to be logged in to leave comments.
Login now