Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14376465
D7563.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D7563.diff
View Options
Index: src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
===================================================================
--- src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
+++ src/applications/diffusion/controller/DiffusionRepositoryEditBranchesController.php
@@ -22,9 +22,15 @@
return new Aphront404Response();
}
+ $is_git = false;
+ $is_hg = false;
+
switch ($repository->getVersionControlSystem()) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
+ $is_git = true;
+ break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
+ $is_hg = true;
break;
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
throw new Exception(
@@ -64,9 +70,11 @@
->setTransactionType($type_track)
->setNewValue($v_track);
- $xactions[] = id(clone $template)
- ->setTransactionType($type_autoclose)
- ->setNewValue($v_autoclose);
+ if (!$is_hg) {
+ $xactions[] = id(clone $template)
+ ->setTransactionType($type_autoclose)
+ ->setNewValue($v_autoclose);
+ }
id(new PhabricatorRepositoryEditor())
->setContinueOnNoEffect(true)
@@ -119,18 +127,22 @@
->setLabel(pht('Track Only'))
->setValue($v_track)
->setCaption(
- pht('Example: %s', phutil_tag('tt', array(), 'master, develop'))))
- ->appendChild(
+ pht('Example: %s', phutil_tag('tt', array(), 'master, develop'))));
+
+ if (!$is_hg) {
+ $form->appendChild(
id(new AphrontFormTextControl())
->setName('autoclose')
->setLabel(pht('Autoclose Only'))
->setValue($v_autoclose)
->setCaption(
- pht('Example: %s', phutil_tag('tt', array(), 'master, release'))))
- ->appendChild(
- id(new AphrontFormSubmitControl())
- ->setValue(pht('Save Branches'))
- ->addCancelButton($edit_uri));
+ pht('Example: %s', phutil_tag('tt', array(), 'master, release'))));
+ }
+
+ $form->appendChild(
+ id(new AphrontFormSubmitControl())
+ ->setValue(pht('Save Branches'))
+ ->addCancelButton($edit_uri));
$form_box = id(new PHUIObjectBoxView())
->setHeaderText($title)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 21, 11:50 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6916584
Default Alt Text
D7563.diff (2 KB)
Attached To
Mode
D7563: Don't allow "autoclose only" to be set in Mercurial
Attached
Detach File
Event Timeline
Log In to Comment