##// END OF EJS Templates
largefiles: don't crash when trying to find default dest for url without path...
Mads Kiilerich -
r18553:b6b9475c stable
parent child Browse files
Show More
@@ -122,7 +122,7 b' def peer(uiorrepo, opts, path, create=Fa'
122
122
123 def defaultdest(source):
123 def defaultdest(source):
124 '''return default destination of clone if none is given'''
124 '''return default destination of clone if none is given'''
125 return os.path.basename(os.path.normpath(util.url(source).path))
125 return os.path.basename(os.path.normpath(util.url(source).path or ''))
126
126
127 def share(ui, source, dest=None, update=True):
127 def share(ui, source, dest=None, update=True):
128 '''create a shared repository'''
128 '''create a shared repository'''
@@ -831,6 +831,8 b' Test cloning with --all-largefiles flag'
831 commit: (clean)
831 commit: (clean)
832 update: 8 new changesets (update)
832 update: 8 new changesets (update)
833
833
834 Show computed destination directory:
835
834 $ mkdir xyz
836 $ mkdir xyz
835 $ cd xyz
837 $ cd xyz
836 $ hg clone ../a
838 $ hg clone ../a
@@ -841,6 +843,12 b' Test cloning with --all-largefiles flag'
841 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
843 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
842 $ cd ..
844 $ cd ..
843
845
846 Clone URL without path:
847
848 $ hg clone file://
849 abort: repository / not found!
850 [255]
851
844 Ensure base clone command argument validation
852 Ensure base clone command argument validation
845
853
846 $ hg clone -U -u 0 a a-clone-failure
854 $ hg clone -U -u 0 a a-clone-failure
General Comments 0
You need to be logged in to leave comments. Login now