# HG changeset patch # User Pierre-Yves David # Date 1493894847 -7200 # Node ID aeb060dd7ac9cf1632614ec679f76e739c7bae58 # Parent 4e6aab69a98b28675ac988c33348ce852d4873dd bundle: avoid reset of the 'outgoing' variable We have a cleaner way to achieve the same effect. Not resetting the variable will help us to simplify the code. diff -r 4e6aab69a98b -r aeb060dd7ac9 mercurial/commands.py --- a/mercurial/commands.py Thu May 04 12:43:41 2017 +0200 +++ b/mercurial/commands.py Thu May 04 12:47:27 2017 +0200 @@ -1359,7 +1359,6 @@ outgoing = discovery.outgoing(repo, common, heads) cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) - outgoing = None else: dest = ui.expandpath(dest or 'default-push', dest or 'default') dest, branches = hg.parseurl(dest, opts.get('branch')) @@ -1373,7 +1372,7 @@ cg = changegroup.getchangegroup(repo, 'bundle', outgoing, version=cgversion) if not cg: - scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) + scmutil.nochangesfound(ui, repo, not base and outgoing.excluded) return 1 if cgversion == '01': #bundle1