Re: [ANNOUNCE] pg - A patch porcelain for GIT
From: Sam Vilain <hidden>
Date: 2016-06-15 22:42:19
Shawn Pearce wrote:
quoted
quoted
I just posted the first public version of pg, a GIT porcelain for managing patches. Think StGIT, but better in some ways: Feature Summary: - Maximum compatibility with other GIT porcelains. - Simplified command line user interface.How do I edit the description of an existing patch using pg? Perhaps an option to pg-push ?There isn't any description associated with a patch beyond its name (which can be changed with pg-rename). Unlike StGIT pg currently doesn't store a description with each patch. This is partly because I want pg to extract the comments given to pg-ci to make the description of the patch during an export with pg-export - but I haven't written the code to walk back along the related commits and extract each comment. On the other hand this might not be the best description for a patch. :-)
ok. Well, perhaps a nice solution might be just to aggregate the
comments as each new commit is made. ie, the previous comment is
prepended to the new comment unless you use the editor or a special
-M (or whatever) option that replaces the running comment.
I tried importing a patchset into pg, and made some changes to it to see
the patch revisioning going on. However, I can't see this happening.
Can you perhaps include this information in your tutorial?
As far as other, more general critiques of the software goes: What
about merging? stgit has a very nice way of merging; I specify how to
merge using a config file, and when I rebase my patches with "stg pull",
it fires up my custom editor. All I really want is a way to specify how
to handle merges, with the ancestor/left/right files on hand. I want to
use something as simple as this script:
#!/bin/sh
branch1="$1"
branch2="$2"
ancestor="$3"
output="$4"
echo "Merging:"
echo
echo " $branch1"
echo " - $ancestor"
echo
echo " with:"
echo
echo " $branch2"
echo " - $ancestor"
echo
echo " to: $output"
echo ""
echo -n "Trying diff3..."
if diff3 -L local -L older -L remote -m -E "$branch1" "$ancestor" \
"$branch2" > "$output"
then
echo "OK"
else
echo "failed"
echo "falling back to ediff-merge"
emacs --eval "(ediff-merge-files-with-ancestor \"${branch1}\"
\"${branch2}\" \"${ancestor}\" nil \"${output}\")"
fi
Those commands I got from the default .stgitrc config.
That's all the features I'm really after.
Sam.