From patchwork Wed Oct 4 21:40:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [remotenames-ext] remotenames: push anonymous head if --force is given From: Pulkit Goyal <7895pulkit@gmail.com> X-Patchwork-Id: 24519 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Thu, 05 Oct 2017 03:10:11 +0530 # HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1507153197 -19800 # Thu Oct 05 03:09:57 2017 +0530 # Node ID b3cf58915bc36b7e01470f6a55dc5bd8b8f4cc9a # Parent e7cce2b6198ace7769e2c68a5b67eddde794cfeb remotenames: push anonymous head if --force is given If force is passed, we should not care whether --anon is passed or not as the user forced the push and we should push the anonymous head also. I noticed this when I enabled the extension and got the anonymous head warning. Whenever I push to my personal repo and see error while, I just pass -f but this time, passing -f didn't work which should. diff --git a/remotenames.py b/remotenames.py --- a/remotenames.py +++ b/remotenames.py @@ -853,7 +853,7 @@ if not pushop.to: ret = exchange._pushdiscoverybookmarks(pushop) - if not pushop.allowanon: + if not pushop.allowanon and not pushop.force: # check to make sure we don't push an anonymous head if pushop.revs: revs = set(pushop.revs)