mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
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:
parent
9a343a289b
commit
1aa37581ea
@ -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():
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user