##// END OF EJS Templates
largefiles: don't crash when cloning to a remote repo...
Matt Harbison -
r24812:e4e69ceb stable
parent child Browse files
Show More
@@ -838,6 +838,12 b' def hgclone(orig, ui, opts, *args, **kwa'
838 sourcerepo, destrepo = result
838 sourcerepo, destrepo = result
839 repo = destrepo.local()
839 repo = destrepo.local()
840
840
841 # When cloning to a remote repo (like through SSH), no repo is available
842 # from the peer. Therefore the largefiles can't be downloaded and the
843 # hgrc can't be updated.
844 if not repo:
845 return result
846
841 # If largefiles is required for this repo, permanently enable it locally
847 # If largefiles is required for this repo, permanently enable it locally
842 if 'largefiles' in repo.requirements:
848 if 'largefiles' in repo.requirements:
843 fp = repo.vfs('hgrc', 'a', text=True)
849 fp = repo.vfs('hgrc', 'a', text=True)
@@ -111,6 +111,14 b' clone to remote1'
111 remote: adding file changes
111 remote: adding file changes
112 remote: added 1 changesets with 1 changes to 1 files
112 remote: added 1 changesets with 1 changes to 1 files
113
113
114 The largefiles extension doesn't crash
115 $ hg clone -e "python \"$TESTDIR/dummyssh\"" local ssh://user@dummy/remotelf --config extensions.largefiles=
116 searching for changes
117 remote: adding changesets
118 remote: adding manifests
119 remote: adding file changes
120 remote: added 1 changesets with 1 changes to 1 files
121
114 init to existing repo
122 init to existing repo
115
123
116 $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1
124 $ hg init -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/remote1
@@ -133,6 +141,8 b' output of dummyssh'
133 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
141 Got arguments 1:user@dummy 2:hg -R remote2 serve --stdio
134 Got arguments 1:user@dummy 2:hg init remote1
142 Got arguments 1:user@dummy 2:hg init remote1
135 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
143 Got arguments 1:user@dummy 2:hg -R remote1 serve --stdio
144 Got arguments 1:user@dummy 2:hg init remotelf
145 Got arguments 1:user@dummy 2:hg -R remotelf serve --stdio
136 Got arguments 1:user@dummy 2:hg init remote1
146 Got arguments 1:user@dummy 2:hg init remote1
137 Got arguments 1:user@dummy 2:hg init remote1
147 Got arguments 1:user@dummy 2:hg init remote1
138
148
General Comments 0
You need to be logged in to leave comments. Login now