Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F19015708
D18439.id44301.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D18439.id44301.diff
View Options
diff --git a/src/applications/diffusion/controller/DiffusionRepositoryController.php b/src/applications/diffusion/controller/DiffusionRepositoryController.php
--- a/src/applications/diffusion/controller/DiffusionRepositoryController.php
+++ b/src/applications/diffusion/controller/DiffusionRepositoryController.php
@@ -40,6 +40,9 @@
// If this VCS supports branches, check that the selected branch actually
// exists.
if ($drequest->supportsBranches()) {
+ $branch = $drequest->getBranch();
+ $tracking = $repository->shouldTrackBranch($branch);
+
// NOTE: Mercurial may have multiple branch heads with the same name.
$ref_cursors = id(new PhabricatorRepositoryRefCursorQuery())
->setViewer($viewer)
@@ -47,7 +50,7 @@
->withRefTypes(array(PhabricatorRepositoryRefCursor::TYPE_BRANCH))
->withRefNames(array($drequest->getBranch()))
->execute();
- if ($ref_cursors) {
+ if ($ref_cursors && $tracking) {
// This is a valid branch, so we necessarily have some content.
$page_has_content = true;
} else {
@@ -57,6 +60,17 @@
$empty_message = pht(
'There is no branch named "%s" in this repository.',
$drequest->getBranch());
+ } else if (!$tracking) {
+ $empty_title = pht('Branch Not Tracked');
+ if ($default != $drequest->getBranch()) {
+ $empty_message = pht(
+ 'The branch named "%s" is not being tracked.',
+ $drequest->getBranch());
+ } else {
+ $empty_message = pht(
+ 'The branch named "%s" is configured as the default, but is not '.
+ 'being tracked.', $drequest->getBranch());
+ }
} else {
$empty_title = pht('No Default Branch');
$empty_message = pht(
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 24, 1:12 AM (4 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
13618719
Default Alt Text
D18439.id44301.diff (1 KB)
Attached To
Mode
D18439: Show error message in Diffusion if branch is not tracked
Attached
Detach File
Event Timeline
Log In to Comment