{"thread":{"id":"3184","subject":"[PATCH] cvsexportcommit: add some examples to the documentation","startedAt":"2006-01-30T06:12:32Z","lastAt":"2006-01-30T06:25:56Z","messageCount":2,"participants":["Martin Langhoff","Randal L. Schwartz"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15242","messageId":"11386015522537-git-send-email-martin@catalyst.net.nz","threadId":"3184","inReplyTo":null,"subject":"[PATCH] cvsexportcommit: add some examples to the documentation","fromName":"Martin Langhoff","fromEmail":"martin@catalyst.net.nz","sentAt":"2006-01-30T06:12:32Z","receivedAt":"2006-01-30T06:12:32Z","isPatch":true,"sender":{"key":"martin@laptop.org","avatar":null},"body":"Signed-off-by: Martin Langhoff <martin@catalyst.net.nz>\n\n\n---\n\n Documentation/git-cvsexportcommit.txt |   21 +++++++++++++++++++++\n 1 files changed, 21 insertions(+), 0 deletions(-)\n\n69c980351a6d74d033a8d70fb37970c71ff8e855\ndiff --git a/Documentation/git-cvsexportcommit.txt b/Documentation/git-cvsexportcommit.txt\nindex 13cbf3b..e2540fb 100644\n--- a/Documentation/git-cvsexportcommit.txt\n+++ b/Documentation/git-cvsexportcommit.txt\n@@ -17,6 +17,7 @@ Exports a commit from GIT to a CVS check\n to merge patches from a git repository into a CVS repository. \n \n Execute it from the root of the CVS working copy. GIT_DIR must be defined. \n+See examples below.\n \n It does its best to do the safe thing, it will check that the files are \n unchanged and up to date in the CVS checkout, and it will not autocommit \n@@ -41,6 +42,26 @@ OPTIONS\n -v::\n \tVerbose.\n \n+EXAMPLES\n+--------\n+\n+Merge one patch into CVS::\n++\n+------------\n+$ export GIT_DIR=~/project/.git\n+$ cd ~/project_cvs_checkout\n+$ git-cvsexportcommit -v <commit-sha1>\n+$ cvs commit -F .mgs <files> \n+------------\n+\n+Merge pending patches into CVS automatically -- only if you really know what you are doing ::\n++\n+------------\n+$ export GIT_DIR=~/project/.git\n+$ cd ~/project_cvs_checkout\n+$ git-cherry cvshead myhead | grep '^+' | sed 's/^+ //' | xargs -l1 git-cvsexportcommit -c -p -v\n+------------\n+\n Author\n ------\n Written by Martin Langhoff <martin@catalyst.net.nz>\n-- \n1.1.6.g170f-dirty\n"},{"id":"15243","messageId":"86slr6i64r.fsf@blue.stonehenge.com","threadId":"3184","inReplyTo":"11386015522537-git-send-email-martin@catalyst.net.nz","subject":"Re: [PATCH] cvsexportcommit: add some examples to the documentation","fromName":"Randal L. Schwartz","fromEmail":"merlyn@stonehenge.com","sentAt":"2006-01-30T06:25:56Z","receivedAt":"2006-01-30T06:25:56Z","isPatch":true,"sender":{"key":"merlyn@stonehenge.com","avatar":"https://gravatar.com/avatar/dc528d210743ff0333e6213f9ee7b33b23f1b7bc1f3c5a8c2d819074ecd7ab19?d=mp&s=160"},"body":">>>>> \"Martin\" == Martin Langhoff <martin@catalyst.net.nz> writes:\n\nMartin> +$ git-cherry cvshead myhead | grep '^+' | sed 's/^+ //' | xargs -l1 git-cvsexportcommit -c -p -v\n\nMy idiom for that grep/sed would be:\n\n  ... | sed -n 's/^+ //p' | ...\n\nThen the grep is not needed, because you're printing only the ones\nthat you've also modified in a useful way.\n\nYes, I did a heckuva lot more shell programming long before Perl existed. :)\n\n-- \nRandal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095\n<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>\nPerl/Unix/security consulting, Technical writing, Comedy, etc. etc.\nSee PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!\n"}]}