From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Stephen J. Turnbull" Newsgroups: gmane.emacs.devel Subject: Re: 23 branch - can't push - lock Date: Sun, 19 Jun 2011 22:42:07 +0900 Message-ID: <87y60yj5u8.fsf@uwakimon.sk.tsukuba.ac.jp> References: <1C745F22-51D9-4FE6-A8EF-5D621109E656@gmail.com> <83boxxy9de.fsf@gnu.org> <65EAEB6A-294A-4B8F-8BCA-F37C5914E5D6@gmail.com> <83aadhy1vg.fsf@gnu.org> <2B735F1F-756A-461D-A4D0-562AAC9BE17A@gmail.com> <83sjr8wjow.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1308490955 26991 80.91.229.12 (19 Jun 2011 13:42:35 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 19 Jun 2011 13:42:35 +0000 (UTC) Cc: David Reitter , emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 19 15:42:29 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QYIGi-0000bh-TO for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2011 15:42:29 +0200 Original-Received: from localhost ([::1]:35298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYIGi-0002TU-5I for ged-emacs-devel@m.gmane.org; Sun, 19 Jun 2011 09:42:28 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:51282) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYIGV-0002TN-O1 for emacs-devel@gnu.org; Sun, 19 Jun 2011 09:42:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QYIGU-0002uH-Uj for emacs-devel@gnu.org; Sun, 19 Jun 2011 09:42:15 -0400 Original-Received: from mgmt1.sk.tsukuba.ac.jp ([130.158.97.223]:34144) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QYIGT-0002t4-OX; Sun, 19 Jun 2011 09:42:13 -0400 Original-Received: from uwakimon.sk.tsukuba.ac.jp (uwakimon.sk.tsukuba.ac.jp [130.158.99.156]) by mgmt1.sk.tsukuba.ac.jp (Postfix) with ESMTP id 909BA3FA0703; Sun, 19 Jun 2011 22:42:04 +0900 (JST) Original-Received: by uwakimon.sk.tsukuba.ac.jp (Postfix, from userid 1000) id BBD5E1A316C; Sun, 19 Jun 2011 22:42:07 +0900 (JST) In-Reply-To: <83sjr8wjow.fsf@gnu.org> X-Mailer: VM 8.1.93a under 21.5 (beta31) "ginger" 6b3caa55668c XEmacs Lucid (x86_64-unknown-linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 130.158.97.223 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:140671 Archived-At: Eli Zaretskii writes: > > Is there a way to reset a branch to a previous commit, i.e., the equivalent of "git reset --hard"? > > That's git talk, and I don't really know what it means. It means moving the tip pointer of the current branch to point at a different revision (usually older, but not necessarily so), and simultaneously checkout the workspace corresponding to that revision. The answer is yes, Robert Collins told me how to do it about three years ago, but in vanilla bzr there was no simple equivalent to git tag tmp git reset --hard somewhere-else so the bzr equivalent was necessarily destructive unless you extract the rev-id and save it away by hand. (Of course this is scriptable.) I found that sufficiently painful that I just avoid the need, and don't recall that necessary arcana. Depending on the use case there are various commands that have the same effect that "git --reset hard" does, but none of them work across the board. Look up the docs for update, revert, and uncommit. I would assume that colo-enabled versions of bazaar have something similar to git reset, though, and if not it shouldn't be hard to implement.