Show More
@@ -4351,11 +4351,7 b' def incoming(ui, repo, source=b"default"' | |||||
4351 | finally: |
|
4351 | finally: | |
4352 | other.close() |
|
4352 | other.close() | |
4353 |
|
4353 | |||
4354 | repo._subtoppath = ui.expandpath(source) |
|
4354 | return hg.incoming(ui, repo, source, opts) | |
4355 | try: |
|
|||
4356 | return hg.incoming(ui, repo, source, opts) |
|
|||
4357 | finally: |
|
|||
4358 | del repo._subtoppath |
|
|||
4359 |
|
4355 | |||
4360 |
|
4356 | |||
4361 | @command( |
|
4357 | @command( |
@@ -1255,7 +1255,14 b' def abortmerge(ui, repo):' | |||||
1255 |
|
1255 | |||
1256 |
|
1256 | |||
1257 | def _incoming( |
|
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 | Helper for incoming / gincoming. |
|
1268 | Helper for incoming / gincoming. | |
@@ -1270,6 +1277,14 b' def _incoming(' | |||||
1270 | msg %= len(srcs) |
|
1277 | msg %= len(srcs) | |
1271 | raise error.Abort(msg) |
|
1278 | raise error.Abort(msg) | |
1272 | source, branches = srcs[0] |
|
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 | other = peer(repo, opts, source) |
|
1288 | other = peer(repo, opts, source) | |
1274 | cleanupfn = other.close |
|
1289 | cleanupfn = other.close | |
1275 | try: |
|
1290 | try: | |
@@ -1297,7 +1312,7 b' def _incoming(' | |||||
1297 | return 0 # exit code is zero since we found incoming changes |
|
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 | def subreporecurse(): |
|
1316 | def subreporecurse(): | |
1302 | ret = 1 |
|
1317 | ret = 1 | |
1303 | if opts.get(b'subrepos'): |
|
1318 | if opts.get(b'subrepos'): | |
@@ -1321,7 +1336,9 b' def incoming(ui, repo, source, opts):' | |||||
1321 | count += 1 |
|
1336 | count += 1 | |
1322 | displayer.show(other[n]) |
|
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 | def _outgoing(ui, repo, dests, opts, subpath=None): |
|
1344 | def _outgoing(ui, repo, dests, opts, subpath=None): |
@@ -882,7 +882,8 b' class hgsubrepo(abstractsubrepo):' | |||||
882 | opts = copy.copy(opts) |
|
882 | opts = copy.copy(opts) | |
883 | opts.pop(b'rev', None) |
|
883 | opts.pop(b'rev', None) | |
884 | opts.pop(b'branch', None) |
|
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 | @annotatesubrepoerror |
|
888 | @annotatesubrepoerror | |
888 | def files(self): |
|
889 | def files(self): |
General Comments 0
You need to be logged in to leave comments.
Login now