Skip to content

Commit a95bea9

Browse files
committed
Simplify constructing URIs
1 parent 2cfda45 commit a95bea9

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"php": ">=5.3",
1818
"react/event-loop": "~0.4.0|~0.3.0",
1919
"react/promise": "~2.1|~1.1",
20-
"clue/buzz-react": "~0.4.0",
20+
"clue/buzz-react": "~0.4.1",
2121
"ext-simplexml": "*",
2222
"neitanod/forceutf8": "~1.4"
2323
},

src/Client.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ public function fetchFile($path, $revision = null)
4848

4949
return $this->fetch(
5050
$this->browser->resolve(
51-
'/{+path}?view=co{&pathrev}',
51+
'{+path}?view=co{&pathrev}',
5252
array(
53-
'path' => ltrim($path, '/'),
53+
'path' => $path,
5454
'pathrev' => $revision
5555
)
5656
)
@@ -68,9 +68,9 @@ public function fetchDirectory($path, $revision = null, $showAttic = false)
6868

6969
return $this->fetchXml(
7070
$this->browser->resolve(
71-
'/{+path}{?pathrev,hideattic}',
71+
'{+path}{?pathrev,hideattic}',
7272
array(
73-
'path' => ltrim($path, '/'),
73+
'path' => $path,
7474
'pathrev' => $revision,
7575
'hideattic' => $showAttic ? '0' : null
7676
)
@@ -87,9 +87,9 @@ public function fetchPatch($path, $r1, $r2)
8787
{
8888
return $this->fetch(
8989
$this->browser->resolve(
90-
'/{+path}?view=patch{&r1,r2}',
90+
'{+path}?view=patch{&r1,r2}',
9191
array(
92-
'path' => ltrim($path, '/'),
92+
'path' => $path,
9393
'r1' => $r1,
9494
'r2' => $r2
9595
)
@@ -103,9 +103,9 @@ public function fetchLog($path, $revision = null)
103103

104104
return $this->fetchXml(
105105
$this->browser->resolve(
106-
'/{+path}?view=log{&pathrev}',
106+
'{+path}?view=log{&pathrev}',
107107
array(
108-
'path' => ltrim($path, '/'),
108+
'path' => $path,
109109
'pathrev' => $revision
110110
)
111111
)
@@ -132,9 +132,9 @@ private function fetchLogXml($path)
132132
{
133133
return $this->fetchXml(
134134
$this->browser->resolve(
135-
'/{+path}?view=log',
135+
'{+path}?view=log',
136136
array(
137-
'path' => ltrim($path, '/')
137+
'path' => $path
138138
)
139139
)
140140
);

0 commit comments

Comments
 (0)