fetchsvn: remove with statements
This commit is contained in:
parent
e1854c33b2
commit
c406a6ed33
@ -10,15 +10,15 @@
|
|||||||
assert sshSupport -> openssh != null;
|
assert sshSupport -> openssh != null;
|
||||||
|
|
||||||
let
|
let
|
||||||
repoName = with lib;
|
repoName =
|
||||||
let
|
let
|
||||||
fst = head;
|
fst = lib.head;
|
||||||
snd = l: head (tail l);
|
snd = l: lib.head (lib.tail l);
|
||||||
trd = l: head (tail (tail l));
|
trd = l: lib.head (lib.tail (lib.tail l));
|
||||||
path_ =
|
path_ =
|
||||||
(p: if head p == "" then tail p else p) # ~ drop final slash if any
|
(p: if lib.head p == "" then lib.tail p else p) # ~ drop final slash if any
|
||||||
(reverseList (splitString "/" url));
|
(lib.reverseList (lib.splitString "/" url));
|
||||||
path = [ (removeSuffix "/" (head path_)) ] ++ (tail path_);
|
path = [ (lib.removeSuffix "/" (lib.head path_)) ] ++ (lib.tail path_);
|
||||||
in
|
in
|
||||||
# ../repo/trunk -> repo
|
# ../repo/trunk -> repo
|
||||||
if fst path == "trunk" then snd path
|
if fst path == "trunk" then snd path
|
||||||
|
Loading…
Reference in New Issue
Block a user