Merge "Documentation for the assignee Rest API endpoints"
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java
index 632ddd8..70d43e4 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/changes/ChangeApi.java
@@ -39,11 +39,12 @@
     call(id, "abandon").post(input, cb);
   }
 
-  /** Create a new change.
+  /**
+   * Create a new change.
    *
-   * The new change is created as DRAFT unless the draft workflow is disabled
-   * by `change.allowDrafts = false` in the configuration, in which case the
-   * new change is created as NEW.
+   * The new change is created as DRAFT unless the draft workflow is disabled by
+   * `change.allowDrafts = false` in the configuration, in which case the new
+   * change is created as NEW.
    *
    */
   public static void createChange(String project, String branch, String topic,
@@ -178,12 +179,14 @@
   public static RestApi hashtags(int changeId) {
     return change(changeId).view("hashtags");
   }
+
   public static RestApi hashtag(int changeId, String hashtag) {
     return change(changeId).view("hashtags").id(hashtag);
   }
 
   /** Submit a specific revision of a change. */
-  public static void cherrypick(int id, String commit, String destination, String message, AsyncCallback<ChangeInfo> cb) {
+  public static void cherrypick(int id, String commit, String destination,
+      String message, AsyncCallback<ChangeInfo> cb) {
     CherryPickInput cherryPickInput = CherryPickInput.create();
     cherryPickInput.setMessage(message);
     cherryPickInput.setDestination(destination);
@@ -199,13 +202,15 @@
   }
 
   /** Submit a specific revision of a change. */
-  public static void submit(int id, String commit, AsyncCallback<SubmitInfo> cb) {
+  public static void submit(int id, String commit,
+      AsyncCallback<SubmitInfo> cb) {
     JavaScriptObject in = JavaScriptObject.createObject();
     call(id, commit, "submit").post(in, cb);
   }
 
   /** Publish a specific revision of a draft change. */
-  public static void publish(int id, String commit, AsyncCallback<JavaScriptObject> cb) {
+  public static void publish(int id, String commit,
+      AsyncCallback<JavaScriptObject> cb) {
     JavaScriptObject in = JavaScriptObject.createObject();
     call(id, commit, "publish").post(in, cb);
   }
@@ -216,7 +221,8 @@
   }
 
   /** Delete a specific draft patch set. */
-  public static void deleteRevision(int id, String commit, AsyncCallback<JavaScriptObject> cb) {
+  public static void deleteRevision(int id, String commit,
+      AsyncCallback<JavaScriptObject> cb) {
     revision(id, commit).delete(cb);
   }
 
@@ -238,7 +244,8 @@
   }
 
   /** Rebase a revision onto the branch tip or another change. */
-  public static void rebase(int id, String commit, String base, AsyncCallback<ChangeInfo> cb) {
+  public static void rebase(int id, String commit, String base,
+      AsyncCallback<ChangeInfo> cb) {
     RebaseInput rebaseInput = RebaseInput.create();
     rebaseInput.setBase(base);
     call(id, commit, "rebase").post(rebaseInput, cb);
@@ -275,8 +282,9 @@
     public final native void topic(String t) /*-{ if(t)this.topic=t; }-*/;
     public final native void project(String p) /*-{ if(p)this.project=p; }-*/;
     public final native void subject(String s) /*-{ if(s)this.subject=s; }-*/;
-    public final native void baseChange(String b) /*-{ if(b)this.base_change=b; }-*/;
-    public final native void status(String s)  /*-{ if(s)this.status=s; }-*/;
+    public final native void status(String s) /*-{ if(s)this.status=s; }-*/;
+    public final native void baseChange(
+        String b) /*-{ if(b)this.base_change=b; }-*/;
 
     protected CreateChangeInput() {
     }
@@ -286,7 +294,9 @@
     static CherryPickInput create() {
       return (CherryPickInput) createObject();
     }
+
     final native void setDestination(String d) /*-{ this.destination = d; }-*/;
+
     final native void setMessage(String m) /*-{ this.message = m; }-*/;
 
     protected CherryPickInput() {
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeUpdate.java b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeUpdate.java
index 88b167a..6e95348 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeUpdate.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/notedb/ChangeUpdate.java
@@ -344,7 +344,7 @@
     checkArgument(c.revId != null, "RevId required for comment: %s", c);
     checkArgument(c.author.getId().equals(getAccountId()),
         "The author for the following comment does not match the author of"
-        + " this ChangeDraftUpdate (%s): %s", getAccountId(), c);
+        + " this ChangeUpdate (%s): %s", getAccountId(), c);
 
   }
 
diff --git a/tools/download_file.py b/tools/download_file.py
index bd67b50..39e4307 100755
--- a/tools/download_file.py
+++ b/tools/download_file.py
@@ -26,10 +26,6 @@
 
 GERRIT_HOME = path.expanduser('~/.gerritcodereview')
 CACHE_DIR = path.join(GERRIT_HOME, 'buck-cache', 'downloaded-artifacts')
-# LEGACY_CACHE_DIR is only used to allow existing workspaces to move already
-# downloaded files to the new cache directory.
-# Please remove after 3 months (2015-10-07).
-LEGACY_CACHE_DIR = path.join(GERRIT_HOME, 'buck-cache')
 LOCAL_PROPERTIES = 'local.properties'
 
 
@@ -78,16 +74,6 @@
   name = '%s-%s' % (path.basename(args.o), h)
   return path.join(CACHE_DIR, name)
 
-# Please remove after 3 months (2015-10-07). See LEGACY_CACHE_DIR above.
-def legacy_cache_entry(args):
-  if args.v:
-    h = args.v
-  else:
-    h = sha1(args.u.encode('utf-8')).hexdigest()
-  name = '%s-%s' % (path.basename(args.o), h)
-  return path.join(LEGACY_CACHE_DIR, name)
-
-
 opts = OptionParser()
 opts.add_option('-o', help='local output file')
 opts.add_option('-u', help='URL to download')
@@ -105,19 +91,8 @@
 
 redirects = download_properties(root_dir)
 cache_ent = cache_entry(args)
-legacy_cache_ent = legacy_cache_entry(args)
 src_url = resolve_url(args.u, redirects)
 
-# Please remove after 3 months (2015-10-07). See LEGACY_CACHE_DIR above.
-if not path.exists(cache_ent) and path.exists(legacy_cache_ent):
-  try:
-    safe_mkdirs(path.dirname(cache_ent))
-  except OSError as err:
-    print('error creating directory %s: %s' %
-          (path.dirname(cache_ent), err), file=stderr)
-    exit(1)
-  shutil.move(legacy_cache_ent, cache_ent)
-
 if not path.exists(cache_ent):
   try:
     safe_mkdirs(path.dirname(cache_ent))