diff --git a/Library/Homebrew/dev-cmd/pr-upload.rb b/Library/Homebrew/dev-cmd/pr-upload.rb
index 39dfd145badc69f3451417ee791a8f450d7a3453..9453428e91f751c7c289600ed49df9b416cfe357 100644
--- a/Library/Homebrew/dev-cmd/pr-upload.rb
+++ b/Library/Homebrew/dev-cmd/pr-upload.rb
@@ -15,6 +15,9 @@ module Homebrew
       EOS
       switch "--no-publish",
              description: "Apply the bottle commit and upload the bottles, but don't publish them."
+      switch "--keep-old",
+             description: "If the formula specifies a rebuild version, " \
+                          "attempt to preserve its value in the generated DSL."
       switch "-n", "--dry-run",
              description: "Print what would be done rather than doing it."
       switch "--warn-on-upload-failure",
@@ -38,6 +41,7 @@ module Homebrew
     bottle_args = ["bottle", "--merge", "--write"]
     bottle_args << "--verbose" if args.verbose?
     bottle_args << "--debug" if args.debug?
+    bottle_args << "--keep-old" if args.keep_old?
     bottle_args << "--root-url=#{args.root_url}" if args.root_url
     odie "No JSON files found in the current working directory" if Dir["*.json"].empty?
     bottle_args += Dir["*.json"]
diff --git a/docs/Manpage.md b/docs/Manpage.md
index aaabdb46e682d3761db70a9736eb2058d63fe1d7..2aa5bc9ed3140912dfca84f3e46a563a7c398c61 100644
--- a/docs/Manpage.md
+++ b/docs/Manpage.md
@@ -924,6 +924,8 @@ Apply the bottle commit and publish bottles to Bintray.
 
 * `--no-publish`:
   Apply the bottle commit and upload the bottles, but don't publish them.
+* `--keep-old`:
+  If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.
 * `-n`, `--dry-run`:
   Print what would be done rather than doing it.
 * `--warn-on-upload-failure`:
diff --git a/manpages/brew.1 b/manpages/brew.1
index 49727912891b654bd3910dcb9dc9653d5ee83fc4..525eeddfd8a78af8034b92717a2dcfde236b5ce6 100644
--- a/manpages/brew.1
+++ b/manpages/brew.1
@@ -1211,6 +1211,10 @@ Apply the bottle commit and publish bottles to Bintray\.
 Apply the bottle commit and upload the bottles, but don\'t publish them\.
 .
 .TP
+\fB\-\-keep\-old\fR
+If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL\.
+.
+.TP
 \fB\-n\fR, \fB\-\-dry\-run\fR
 Print what would be done rather than doing it\.
 .