Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=pacman-tools.git;a=commitdiff;h=fdece42f29b9762033eac46b91c2c60013a2c990

commit fdece42f29b9762033eac46b91c2c60013a2c990
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date:   Sat Jun 21 19:20:06 2008 +0200

dg send: add --cc option

diff --git a/darcs-git.py b/darcs-git.py
index 09a2206..c7f099e 100755
--- a/darcs-git.py
+++ b/darcs-git.py
@@ -720,7 +720,7 @@ The recommended workflow is:

1) darcs-git format-patch
Optionally you can now edit the patches to add custom headers like
-          Cc and In-Reply-To ones.
+          In-Reply-To ones and/or custom message between --- and the diffstat.
2) darcs-git send --to="M A Intener <[EMAIL PROTECTED]>" *.patch

Use "darcs-git help send-email" for more information.
@@ -728,7 +728,8 @@ Use "darcs-git help send-email" for more information.
Options:
-d  --dry-run                      don't actually take the action
-h  --help                         shows brief description of command and its 
arguments
-  -t  --to                           specify destination email"""
+  -t  --to                           specify destination EMAIL
+  -c  --cc                           additional EMAIL(s)."""
sys.exit(ret)

class Options:
@@ -736,11 +737,12 @@ Options:
self.dryrun = ""
self.help = False
self.to = ""
+                       self.cc = ""
self.gitopts = ""
options = Options()

try:
-               opts, args = getopt.getopt(argv, "dt:", ["dry-run", "to="])
+               opts, args = getopt.getopt(argv, "c:dt:", ["cc=", "dry-run", 
"to="])
except getopt.GetoptError:
usage(1)
optind = 0
@@ -751,6 +753,8 @@ Options:
options.help = True
elif opt in ("-t", "--to"):
options.to = '--to="%s"' % arg
+               elif opt in ("-c", "--cc"):
+                       options.cc += ' --cc="%s"' % arg
optind += 1
if optind < len(argv):
options.gitopts = " ".join(argv[optind:])
@@ -762,7 +766,7 @@ Options:
sock = os.popen("git config user.email")
author += " <%s>" % sock.readline().strip()
sock.close()
-       return os.system("""git send-email --envelope-sender "%s" --from "%s" 
--suppress-from %s %s %s""" % (author, author, options.dryrun, options.to, 
options.gitopts))
+       return os.system("""git send-email --envelope-sender "%s" --from "%s" 
--suppress-from %s %s %s %s""" % (author, author, options.dryrun, options.to, 
options.cc, options.gitopts))

def get(argv):
def usage(ret):
diff --git a/darcs-git.txt b/darcs-git.txt
index 008827f..0ddfff1 100644
--- a/darcs-git.txt
+++ b/darcs-git.txt
@@ -85,7 +85,7 @@ Y pull          Copy and apply patches from another 
repository to this one.
A unpull        Opposite of pull; unsafe if patch is not in remote repository.
A obliterate    Delete selected patches from the repository. (UNSAFE!)
Y push          Copy and apply patches from this repository to another one.
-A send          Send by email a bundle of one or more patches.
+Y send          Send by email a bundle of one or more patches.
W apply         Apply patches (from an email bundle) to the repository.
A get           Create a local copy of another repository.
N put           Makes a copy of the repository
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to