Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F147879109
D54024.1784661952.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D54024.1784661952.diff
View Options
diff --git a/tools/tools/git/git-arc.sh b/tools/tools/git/git-arc.sh
--- a/tools/tools/git/git-arc.sh
+++ b/tools/tools/git/git-arc.sh
@@ -59,7 +59,7 @@
Commands:
create [-l] [-r <reviewer1>[,<reviewer2>...]] [-s subscriber[,...]] [<commit>|<commit range>]
list <commit>|<commit range>
- patch [-c] <diff1> [<diff2> ...]
+ patch [-bc] <diff1> [<diff2> ...]
stage [-b branch] [<commit>|<commit range>]
update [-l] [-m message] [<commit>|<commit range>]
@@ -75,8 +75,11 @@
create -- Create new Differential revisions from the specified commits.
list -- Print the associated Differential revisions for the specified
commits.
- patch -- Try to apply a patch from a Differential revision to the
- currently checked out tree.
+ patch -- Try to apply a patch from one or more Differential revisions.
+ By default, the patch is applied to the currently checked-out
+ tree unless the -b option is supplied. With -b, a new branch is
+ created for each revision. The -c option commits the applied
+ patch using the review's metadata.
stage -- Prepare a series of commits to be pushed to the upstream FreeBSD
repository. The commits are cherry-picked to a branch (main by
default), review tags are added to the commit log message, and
@@ -146,6 +149,11 @@
$ git arc patch -c D12345
+ Apply the patch in review D12345 to a new branch, and commit it using the
+ review's title, summary and author.
+
+ $ git arc patch -bc D12345
+
List the status of reviews for all the commits in the branch "feature":
$ git arc list main..feature
@@ -626,15 +634,20 @@
gitarc__patch()
{
- local rev commit
+ local rev commit nobranch
if [ $# -eq 0 ]; then
err_usage
fi
+ nobranch="--nobranch"
commit=false
- while getopts c o; do
+ while getopts bc o; do
case "$o" in
+ b)
+ require_clean_work_tree "patch -b"
+ nobranch=""
+ ;;
c)
require_clean_work_tree "patch -c"
commit=true
@@ -647,9 +660,10 @@
shift $((OPTIND-1))
for rev in "$@"; do
- arc patch --skip-dependencies --nocommit --nobranch --force "$rev"
+ if ! arc patch --skip-dependencies ${nobranch:+$nobranch} --nocommit --force "$rev"; then
+ break
+ fi
echo "Applying ${rev}..."
- [ $? -eq 0 ] || break
if ${commit}; then
patch_commit $rev
fi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Jul 21, 7:25 PM (2 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29220451
Default Alt Text
D54024.1784661952.diff (2 KB)
Attached To
Mode
D54024: git-arc: Add patch -b option
Attached
Detach File
Event Timeline
Log In to Comment