Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F24330878
bin/arc-delete-remote-ops-branch
No One
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
dereckson
Sat, Feb 14, 12:25
2026-02-14 12:25:53 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
bin/arc-delete-remote-ops-branch
View Options
#!/bin/sh
#
# Usage: arc-delete-remote-branch [branch]
# Default value: master
#
set
-e
# -------------------------------------------------------------
# Parse arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
if
[
"
$#
"
-gt
1
]
;
then
branch
=
$1
shift
else
branch
=
master
fi
# Assumes origin is the Arcanist clone
remote
=
origin
# -------------------------------------------------------------
# Find repository code on Phabricator instance
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
REPO_PATH
=
$(
git rev-parse --show-toplevel
)
REPO_RETCODE
=
$?
if
[
$REPO_RETCODE
-ne
0
]
;
then
exit
$REPO_RETCODE
fi
;
ARC_CONFIG
=
$REPO_PATH
/.arcconfig
if
[
! -f
$ARC_CONFIG
]
;
then
echo
"Can't find Arcanist configuration:
$ARC_CONFIG
"
>
&
2
exit
2
fi
repo_callsign
=
$(
cat
$ARC_CONFIG
|
jq -r
'.["repository.callsign"]'
)
jq -n --arg callsign
"
$repo_callsign
"
'{
transactions: [
{
type: "allowDangerousChanges",
value: true
}
],
objectIdentifier: ("r" + $callsign)
}'
|
arc call-conduit -- diffusion.repository.edit
git push
$remote
--delete
$branch
jq -n --arg callsign
"
$repo_callsign
"
'{
transactions: [
{
type: "allowDangerousChanges",
value: false
}
],
objectIdentifier: ("r" + $callsign)
}'
|
arc call-conduit -- diffusion.repository.edit
File Metadata
Details
Attached
Mime Type
text/plain; charset=utf-8
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3451874
Default Alt Text
bin/arc-delete-remote-ops-branch (1 KB)
Attached To
Mode
P383 bin/arc-delete-remote-branch
Attached
Detach File
Event Timeline
Log In to Comment