upload: add support for setting hashtags

This allows users to specify custom hashtags when uploading, both via
the CLI and via the same gitconfig settings as other upload options.

Bug: https://crbug.com/gerrit/11174
Change-Id: Ia0959e25b463e5f29d704e4d06e0de793d4fc77c
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/255855
Reviewed-by: David Pursehouse <dpursehouse@collab.net>
Tested-by: Mike Frysinger <vapier@google.com>
diff --git a/project.py b/project.py
index e0e9b7f..06606fa 100644
--- a/project.py
+++ b/project.py
@@ -199,6 +199,7 @@
 
   def UploadForReview(self, people,
                       auto_topic=False,
+                      hashtags=(),
                       draft=False,
                       private=False,
                       notify=None,
@@ -209,6 +210,7 @@
     self.project.UploadForReview(self.name,
                                  people,
                                  auto_topic=auto_topic,
+                                 hashtags=hashtags,
                                  draft=draft,
                                  private=private,
                                  notify=notify,
@@ -1331,6 +1333,7 @@
   def UploadForReview(self, branch=None,
                       people=([], []),
                       auto_topic=False,
+                      hashtags=(),
                       draft=False,
                       private=False,
                       notify=None,
@@ -1388,6 +1391,7 @@
     opts = []
     if auto_topic:
       opts += ['topic=' + branch.name]
+    opts += ['t=%s' % p for p in hashtags]
 
     opts += ['r=%s' % p for p in people[0]]
     opts += ['cc=%s' % p for p in people[1]]