##// END OF EJS Templates
outgoing: merge the code handling --graph with the main one...
marmoute -
r47677:efc6f6a7 default
parent child Browse files
Show More
@@ -4972,22 +4972,6 b' def outgoing(ui, repo, dest=None, **opts'
4972 )
4972 )
4973
4973
4974 opts = pycompat.byteskwargs(opts)
4974 opts = pycompat.byteskwargs(opts)
4975 if opts.get(b'graph'):
4976 logcmdutil.checkunsupportedgraphflags([], opts)
4977 o, other = hg._outgoing(ui, repo, dest, opts)
4978 if not o:
4979 cmdutil.outgoinghooks(ui, repo, other, opts, o)
4980 return
4981
4982 revdag = logcmdutil.graphrevs(repo, o, opts)
4983 ui.pager(b'outgoing')
4984 displayer = logcmdutil.changesetdisplayer(ui, repo, opts, buffered=True)
4985 logcmdutil.displaygraph(
4986 ui, repo, revdag, displayer, graphmod.asciiedges
4987 )
4988 cmdutil.outgoinghooks(ui, repo, other, opts, o)
4989 return 0
4990
4991 if opts.get(b'bookmarks'):
4975 if opts.get(b'bookmarks'):
4992 dest = path.pushloc or path.loc
4976 dest = path.pushloc or path.loc
4993 other = hg.peer(repo, opts, dest)
4977 other = hg.peer(repo, opts, dest)
@@ -32,6 +32,7 b' from . import ('
32 error,
32 error,
33 exchange,
33 exchange,
34 extensions,
34 extensions,
35 graphmod,
35 httppeer,
36 httppeer,
36 localrepo,
37 localrepo,
37 lock,
38 lock,
@@ -1382,18 +1383,29 b' def _outgoing_filter(repo, revs, opts):'
1382
1383
1383
1384
1384 def outgoing(ui, repo, dest, opts):
1385 def outgoing(ui, repo, dest, opts):
1385
1386 if opts.get(b'graph'):
1387 logcmdutil.checkunsupportedgraphflags([], opts)
1386 o, other = _outgoing(ui, repo, dest, opts)
1388 o, other = _outgoing(ui, repo, dest, opts)
1387 ret = 1
1389 ret = 1
1388 try:
1390 try:
1389 if o:
1391 if o:
1390 ret = 0
1392 ret = 0
1391
1393
1392 ui.pager(b'outgoing')
1394 if opts.get(b'graph'):
1393 displayer = logcmdutil.changesetdisplayer(ui, repo, opts)
1395 revdag = logcmdutil.graphrevs(repo, o, opts)
1394 for n in _outgoing_filter(repo, o, opts):
1396 ui.pager(b'outgoing')
1395 displayer.show(repo[n])
1397 displayer = logcmdutil.changesetdisplayer(
1396 displayer.close()
1398 ui, repo, opts, buffered=True
1399 )
1400 logcmdutil.displaygraph(
1401 ui, repo, revdag, displayer, graphmod.asciiedges
1402 )
1403 else:
1404 ui.pager(b'outgoing')
1405 displayer = logcmdutil.changesetdisplayer(ui, repo, opts)
1406 for n in _outgoing_filter(repo, o, opts):
1407 displayer.show(repo[n])
1408 displayer.close()
1397 cmdutil.outgoinghooks(ui, repo, other, opts, o)
1409 cmdutil.outgoinghooks(ui, repo, other, opts, o)
1398 ret = min(ret, _outgoing_recurse(ui, repo, dest, opts))
1410 ret = min(ret, _outgoing_recurse(ui, repo, dest, opts))
1399 return ret # exit code is zero since we found outgoing changes
1411 return ret # exit code is zero since we found outgoing changes
@@ -675,6 +675,7 b' check messages when there is no files to'
675 searching for changes
675 searching for changes
676 no changes found
676 no changes found
677 largefiles: no files to upload
677 largefiles: no files to upload
678 [1]
678
679
679 check messages when there are files to upload:
680 check messages when there are files to upload:
680
681
General Comments 0
You need to be logged in to leave comments. Login now