# HG changeset patch # User Levi Bard # Date 2012-05-13 20:59:22 # Node ID 68da5ae6e470b1c3a7a453b4e881f1531f7189a0 # Parent 3e6d59ae4dc2861fbe2371343be40f6e096b0a11 largefiles: don't attempt to clone all largefiles to non-local destinations diff --git a/hgext/largefiles/overrides.py b/hgext/largefiles/overrides.py --- a/hgext/largefiles/overrides.py +++ b/hgext/largefiles/overrides.py @@ -704,6 +704,12 @@ def overridepull(orig, ui, repo, source= return result def overrideclone(orig, ui, source, dest=None, **opts): + if dest is None: + dest = defaultdest(source) + if opts.get('all_largefiles') and not hg.islocal(dest): + raise util.Abort(_( + '--all-largefiles is incompatible with non-local destination %s' % + dest)) result = hg.clone(ui, opts, source, dest, pull=opts.get('pull'), stream=opts.get('uncompressed'), diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -444,6 +444,10 @@ Test cloning with --all-largefiles flag 3 largefiles updated, 0 removed 8 additional largefiles cached + $ hg clone --all-largefiles a ssh://localhost/a + abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a + [255] + Test pulling with --all-largefiles flag $ rm -Rf a-backup