Page MenuHomePhabricator

D18599.diff
No OneTemporary

D18599.diff

diff --git a/src/applications/differential/controller/DifferentialRevisionOperationController.php b/src/applications/differential/controller/DifferentialRevisionOperationController.php
--- a/src/applications/differential/controller/DifferentialRevisionOperationController.php
+++ b/src/applications/differential/controller/DifferentialRevisionOperationController.php
@@ -137,9 +137,19 @@
return null;
}
- return $this->newRefQuery($repository)
+ // NOTE: See PHI68. This is a workaround to make "Land Revision" work
+ // until T11823 is fixed properly. If we find multiple refs with the same
+ // name (normally, duplicate "master" refs), just pick the first one.
+
+ $refs = $this->newRefQuery($repository)
->withRefNames(array($default_name))
- ->executeOne();
+ ->execute();
+
+ if ($refs) {
+ return head($refs);
+ }
+
+ return null;
}
private function getDefaultRefName(

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 15, 3:34 PM (1 w, 11 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6297872
Default Alt Text
D18599.diff (945 B)

Event Timeline