infinitepush: pass dest to pull function

Summary: Previously dest wasn't passed to pull command. This diff fixes it.

Test Plan: arc unit

Reviewers: #mercurial, durham

Reviewed By: durham

Subscribers: mjpieters, #sourcecontrol

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

Tasks: 15389402

Signature: t1:4643461:1488501956:4684805c618d55edcf4ee1ae13d34a87e92150e6
This commit is contained in:
Stanislau Hlebik 2017-03-06 00:50:30 -08:00
parent 9a343a289b
commit 1aa37581ea
2 changed files with 23 additions and 0 deletions

View File

@ -152,6 +152,8 @@ def restore(ui, repo, dest=None, **opts):
hint=_('set --hostname to disambiguate'))
pullcmd, pullopts = _getcommandandoptions('^pull')
pullopts['rev'] = list(nodestopull)
if dest:
pullopts['source'] = dest
result = pullcmd(ui, repo, **pullopts)
with repo.wlock():

View File

@ -120,6 +120,27 @@ Create a repo with `/bookmarks/` in path
bookbackupsource3 2:a2a9ae518b62
secondbook 0:c1bfda8efb6e
Check that correct path is used in pushbackup
$ cd ../backupsource
$ hg --config paths.default=badpath --config paths.anotherpath=ssh://user@dummy/repo pushbackup
abort: repository $TESTTMP/backupsource/badpath not found!
[255]
$ hg pushbackup anotherpath --config paths.default=badpath --config paths.anotherpath=ssh://user@dummy/repo
nothing to backup
$ cd ../restored
Check that correct path is used in pullbackup
$ hg pullbackup --config paths.default=badpath --config paths.anotherpath=ssh://user@dummy/repo --reporoot $TESTTMP/bookmarks/backupsource3
abort: repository $TESTTMP/restored/badpath not found!
[255]
$ hg pullbackup anotherpath --config paths.default=badpath --config paths.anotherpath=ssh://user@dummy/repo --reporoot $TESTTMP/bookmarks/backupsource3
pulling from ssh://user@dummy/repo
no changes found
adding changesets
adding manifests
adding file changes
added 0 changesets with 0 changes to 1 files
$ cd ..
Backup and restore two commits