--- a/mercurial/commands.py Sat May 06 23:00:57 2017 -0400
+++ b/mercurial/commands.py Thu May 04 21:44:36 2017 +0200
@@ -1368,11 +1368,13 @@
onlyheads=heads,
force=opts.get('force'),
portable=True)
- cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion)
- if not cg:
+
+ if not outgoing.missing:
scmutil.nochangesfound(ui, repo, not base and outgoing.excluded)
return 1
+ cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion)
+
if cgversion == '01': #bundle1
if bcompression is None:
bcompression = 'UN'