##// END OF EJS Templates
outgoing: use `get_push_paths` in the revset too...
marmoute -
r47695:9519312e default
parent child Browse files
Show More
@@ -1855,30 +1855,29 b' def outgoing(repo, subset, x):'
1855 dest = (
1855 dest = (
1856 l and getstring(l[0], _(b"outgoing requires a repository path")) or b''
1856 l and getstring(l[0], _(b"outgoing requires a repository path")) or b''
1857 )
1857 )
1858 if not dest:
1858 if dest:
1859 # ui.getpath() explicitly tests for None, not just a boolean
1859 # ui.getpath() explicitly tests for None, not just a boolean
1860 dest = None
1860 dests = [dest]
1861 path = repo.ui.getpath(dest, default=(b'default-push', b'default'))
1861 else:
1862 if not path:
1862 dests = []
1863 raise error.Abort(
1863 missing = set()
1864 _(b'default repository not configured!'),
1864 for path in urlutil.get_push_paths(repo, repo.ui, dests):
1865 hint=_(b"see 'hg help config.paths'"),
1865 dest = path.pushloc or path.loc
1866 )
1866 branches = path.branch, []
1867 dest = path.pushloc or path.loc
1867
1868 branches = path.branch, []
1868 revs, checkout = hg.addbranchrevs(repo, repo, branches, [])
1869
1869 if revs:
1870 revs, checkout = hg.addbranchrevs(repo, repo, branches, [])
1870 revs = [repo.lookup(rev) for rev in revs]
1871 if revs:
1871 other = hg.peer(repo, {}, dest)
1872 revs = [repo.lookup(rev) for rev in revs]
1872 try:
1873 other = hg.peer(repo, {}, dest)
1873 repo.ui.pushbuffer()
1874 try:
1874 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs)
1875 repo.ui.pushbuffer()
1875 repo.ui.popbuffer()
1876 outgoing = discovery.findcommonoutgoing(repo, other, onlyheads=revs)
1876 finally:
1877 repo.ui.popbuffer()
1877 other.close()
1878 finally:
1878 missing.update(outgoing.missing)
1879 other.close()
1880 cl = repo.changelog
1879 cl = repo.changelog
1881 o = {cl.rev(r) for r in outgoing.missing}
1880 o = {cl.rev(r) for r in missing}
1882 return subset & o
1881 return subset & o
1883
1882
1884
1883
General Comments 0
You need to be logged in to leave comments. Login now