Mercurial > hg
changeset 17600:3a1c6b64e052 stable
largefiles: don't convert dest=None to dest=hg.defaultdest() in clone command
A status message is output if hg.clone() determines the default destination
because None was provided. The previous code never passed None to hg.clone().
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 09 Sep 2012 12:09:53 -0400 |
parents | 56136786000f |
children | 6e2ab601be3f |
files | hgext/largefiles/overrides.py tests/test-largefiles.t |
diffstat | 2 files changed, 15 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/largefiles/overrides.py Sun Sep 09 03:37:38 2012 -0400 +++ b/hgext/largefiles/overrides.py Sun Sep 09 12:09:53 2012 -0400 @@ -720,12 +720,13 @@ return result def overrideclone(orig, ui, source, dest=None, **opts): - if dest is None: - dest = hg.defaultdest(source) - if opts.get('all_largefiles') and not hg.islocal(dest): + d = dest + if d is None: + d = hg.defaultdest(source) + if opts.get('all_largefiles') and not hg.islocal(d): raise util.Abort(_( '--all-largefiles is incompatible with non-local destination %s' % - dest)) + d)) result = hg.clone(ui, opts, source, dest, pull=opts.get('pull'), stream=opts.get('uncompressed'),
--- a/tests/test-largefiles.t Sun Sep 09 03:37:38 2012 -0400 +++ b/tests/test-largefiles.t Sun Sep 09 12:09:53 2012 -0400 @@ -707,6 +707,16 @@ commit: (clean) update: 8 new changesets (update) + $ mkdir xyz + $ cd xyz + $ hg clone ../a + destination directory: a + updating to branch default + 5 files updated, 0 files merged, 0 files removed, 0 files unresolved + getting changed largefiles + 3 largefiles updated, 0 removed + $ cd .. + $ hg clone --all-largefiles a ssh://localhost/a abort: --all-largefiles is incompatible with non-local destination ssh://localhost/a [255]