infinitepush: get rid of useless variable

Summary:
hasscratchbookmarks is True if scratchbookmarks is not empty and vice-versa.
No need to use this variable

Test Plan: arc unit

Reviewers: #mercurial, mjpieters

Reviewed By: mjpieters

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4590917

Signature: t1:4590917:1487682597:c2a6e0accbd8e539a885dd11e6819986e57d24df
This commit is contained in:
Stanislau Hlebik 2017-02-23 04:25:02 -08:00
parent 6087449988
commit 6d667d9cc2

View File

@ -546,7 +546,6 @@ def _pull(orig, ui, repo, source="default", **opts):
# Copy paste from `pull` command
source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch'))
hasscratchbookmarks = False
scratchbookmarks = {}
if opts.get('bookmark'):
bookmarks = []
@ -569,7 +568,6 @@ def _pull(orig, ui, repo, source="default", **opts):
bookmark)
scratchbookmarks[bookmark] = fetchedbookmarks[bookmark]
revs.append(fetchedbookmarks[bookmark])
hasscratchbookmarks = True
opts['bookmark'] = bookmarks
opts['rev'] = revs
@ -591,7 +589,7 @@ def _pull(orig, ui, repo, source="default", **opts):
except error.RepoLookupError:
pass
if hasscratchbookmarks:
if scratchbookmarks:
# Set anyincoming to True
oldfindcommonincoming = wrapfunction(discovery,
'findcommonincoming',
@ -611,7 +609,7 @@ def _pull(orig, ui, repo, source="default", **opts):
_savelocalbookmarks(repo, scratchbookmarks)
return result
finally:
if hasscratchbookmarks:
if scratchbookmarks:
discovery.findcommonincoming = oldfindcommonincoming
def _readscratchremotebookmarks(ui, repo, other):