From unknown Thu Jun 19 13:56:53 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#10709 <10709@debbugs.gnu.org> To: bug#10709 <10709@debbugs.gnu.org> Subject: Status: Feature request: vc-hg should activate smerge-mode for conflicts Reply-To: bug#10709 <10709@debbugs.gnu.org> Date: Thu, 19 Jun 2025 20:56:53 +0000 retitle 10709 Feature request: vc-hg should activate smerge-mode for confli= cts reassign 10709 emacs submitter 10709 Wolfgang Schnerring severity 10709 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 11:31:29 2012 Received: (at submit) by debbugs.gnu.org; 3 Feb 2012 16:31:29 +0000 Received: from localhost ([127.0.0.1]:52471 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtM2q-0005UO-IG for submit@debbugs.gnu.org; Fri, 03 Feb 2012 11:31:29 -0500 Received: from eggs.gnu.org ([140.186.70.92]:49040) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtM2n-0005U3-Ph for submit@debbugs.gnu.org; Fri, 03 Feb 2012 11:31:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtM2A-000585-AD for submit@debbugs.gnu.org; Fri, 03 Feb 2012 11:30:47 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([140.186.70.17]:39622) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtM2A-000581-8Y for submit@debbugs.gnu.org; Fri, 03 Feb 2012 11:30:46 -0500 Received: from eggs.gnu.org ([140.186.70.92]:42777) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtM28-0006hX-9Z for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 11:30:46 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RtM1x-00055i-H7 for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 11:30:44 -0500 Received: from pharos.wosc.de ([85.214.124.141]:55444) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RtM1x-00054x-8t for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 11:30:33 -0500 Received: from hlle-4db8adb8.pool.mediaways.net ([77.184.173.184] helo=elzar) by pharos.wosc.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RtM1u-00038Z-7m for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 17:30:30 +0100 Received: from wosc by elzar with local (Exim 4.74) (envelope-from ) id 1RtM1t-000380-LS for bug-gnu-emacs@gnu.org; Fri, 03 Feb 2012 17:30:29 +0100 Date: Fri, 3 Feb 2012 17:30:29 +0100 From: Wolfgang Schnerring To: bug-gnu-emacs@gnu.org Subject: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: <20120203163029.GB1786@elzar.wosc.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, vc-svn has the useful behaviour (via vc-svn-find-file-hook) that when you visit a file with conflicts, it drops you into smerge-mode, and automatically marks the file as resolved once you've removed all conflict markers. This makes for a very seamless editing experience. :-) It would be nice if vc-hg did the same. I guess most of the behaviour can be lifted straight from vc-svn, however I didn't find anything to suggest that vc-hg talks to "hg resolve -l" at the moment, which is needed to find out whether the current file is conflicted. So I guess that would be the starting point. My elisp is rather weak, so I probably won't be of much help here, but do let me know if there's something I can do. Wolfgang --W/nzBZO5zC0uMSeA Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFPLAulYfWCHec7w7QRAj6KAJ4hK/Bkg+It7x3c+1g3zq6w8v9dwQCgqXfP U2lWuZBxKMpo1VKTIHGK4wg= =HAXb -----END PGP SIGNATURE----- --W/nzBZO5zC0uMSeA-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 12:05:32 2012 Received: (at 10709) by debbugs.gnu.org; 3 Feb 2012 17:05:32 +0000 Received: from localhost ([127.0.0.1]:52505 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtMZn-0006Id-W4 for submit@debbugs.gnu.org; Fri, 03 Feb 2012 12:05:32 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:47872 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtMZl-0006IV-I2 for 10709@debbugs.gnu.org; Fri, 03 Feb 2012 12:05:30 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RtMZC-0006Yw-GX; Fri, 03 Feb 2012 12:04:54 -0500 From: Glenn Morris To: Wolfgang Schnerring Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts References: <20120203163029.GB1786@elzar.wosc.de> X-Spook: Project Monarch Blowfish Abbas AIMSX offensive X-Ran: 6n}:z}n5v'/9Kq,u\7>[Erf`$aGP.OD[+\Daq|^8Ett_h (Wolfgang Schnerring's message of "Fri, 3 Feb 2012 17:30:29 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Wolfgang Schnerring wrote: > vc-svn has the useful behaviour (via vc-svn-find-file-hook) that when > you visit a file with conflicts, it drops you into smerge-mode, and > automatically marks the file as resolved once you've removed all > conflict markers. This makes for a very seamless editing experience. :-) > > It would be nice if vc-hg did the same. I guess you need to get hg to generate standard conflict markers. Ref: https://lists.ubuntu.com/archives/bazaar/2012q1/074313.html From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 12:12:34 2012 Received: (at 10709) by debbugs.gnu.org; 3 Feb 2012 17:12:34 +0000 Received: from localhost ([127.0.0.1]:52509 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtMgc-0006T3-0H for submit@debbugs.gnu.org; Fri, 03 Feb 2012 12:12:34 -0500 Received: from fencepost.gnu.org ([140.186.70.10]:48083 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtMga-0006Sv-KJ for 10709@debbugs.gnu.org; Fri, 03 Feb 2012 12:12:33 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RtMg1-0007F0-LU; Fri, 03 Feb 2012 12:11:57 -0500 From: Glenn Morris To: Wolfgang Schnerring Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts References: <20120203163029.GB1786@elzar.wosc.de> X-Spook: quiche ASO White Water SCUD missile nitrate Ft. Meade X-Ran: Y2/wlZ{tult_(2r$rHQU/72I-kqGmA2/Z'wIk2k'qy>]ymD1S*rR4\?xUu6!S (Glenn Morris's message of "Fri, 03 Feb 2012 12:04:54 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) Glenn Morris wrote: > I guess you need to get hg to generate standard conflict markers. Ref: Actually I guess vc-hg would need some changes too. From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 13:28:15 2012 Received: (at 10709) by debbugs.gnu.org; 3 Feb 2012 18:28:15 +0000 Received: from localhost ([127.0.0.1]:52575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtNrq-0008Pb-TG for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:28:15 -0500 Received: from pharos.wosc.de ([85.214.124.141]:50748) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtNrp-0008PT-5v for 10709@debbugs.gnu.org; Fri, 03 Feb 2012 13:28:14 -0500 Received: from hlle-4db8adb8.pool.mediaways.net ([77.184.173.184] helo=elzar) by pharos.wosc.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RtNrF-0003dq-IK; Fri, 03 Feb 2012 19:27:37 +0100 Received: from wosc by elzar with local (Exim 4.74) (envelope-from ) id 1RtNrE-0003nw-TP; Fri, 03 Feb 2012 19:27:36 +0100 Date: Fri, 3 Feb 2012 19:27:36 +0100 From: Wolfgang Schnerring To: Glenn Morris Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: <20120203182736.GC1786@elzar.wosc.de> References: <20120203163029.GB1786@elzar.wosc.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MfFXiAuoTsnnDAfZ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --MfFXiAuoTsnnDAfZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Glenn Morris [2012-02-03 12:11]: > Glenn Morris wrote: > > I guess you need to get hg to generate standard conflict markers. Ref: You could configure diff3 as the default merge program. However, in my experience, using smerge-mode on the "internal:merge" results of hg worked, too. =20 > Actually I guess vc-hg would need some changes too. Yep, I guess you'd need changes on both ends. Wolfgang --MfFXiAuoTsnnDAfZ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFPLCcYYfWCHec7w7QRAozXAKCUnz7oaDReRZjmjfodAZKM7yCUMQCg5Ipm yKdpv2KcmogXQt0xpLlp/Qg= =Eg7j -----END PGP SIGNATURE----- --MfFXiAuoTsnnDAfZ-- From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 13:43:46 2012 Received: (at 10709) by debbugs.gnu.org; 3 Feb 2012 18:43:46 +0000 Received: from localhost ([127.0.0.1]:52603 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtO6s-0000M3-FY for submit@debbugs.gnu.org; Fri, 03 Feb 2012 13:43:46 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.183]:22495) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtO6o-0000LT-6Z for 10709@debbugs.gnu.org; Fri, 03 Feb 2012 13:43:46 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAHApLE9MCqD0/2dsb2JhbABDryaBBoFyAQEBAQIBAQJTIxALDiYSFBQEDSSIDwm4VQSMARICAgMGAgQCAQQCAgwGCgMBhB0BBAQegzkEiESKPJBEhFo X-IronPort-AV: E=Sophos;i="4.73,352,1325480400"; d="scan'208";a="161098769" Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2012 13:43:02 -0500 Received: by pastel.home (Postfix, from userid 20848) id ED26B590EC; Fri, 3 Feb 2012 13:43:01 -0500 (EST) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: References: <20120203163029.GB1786@elzar.wosc.de> Date: Fri, 03 Feb 2012 13:43:01 -0500 In-Reply-To: (Glenn Morris's message of "Fri, 03 Feb 2012 12:04:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Wolfgang Schnerring X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> vc-svn has the useful behaviour (via vc-svn-find-file-hook) that when >> you visit a file with conflicts, it drops you into smerge-mode, and >> automatically marks the file as resolved once you've removed all >> conflict markers. This makes for a very seamless editing experience. :-) >> It would be nice if vc-hg did the same. > I guess you need to get hg to generate standard conflict markers. Ref: > https://lists.ubuntu.com/archives/bazaar/2012q1/074313.html Note: I do not know that hg uses non-standard conflict markers. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Feb 03 14:33:21 2012 Received: (at 10709) by debbugs.gnu.org; 3 Feb 2012 19:33:21 +0000 Received: from localhost ([127.0.0.1]:52701 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtOsr-0001ca-8u for submit@debbugs.gnu.org; Fri, 03 Feb 2012 14:33:21 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:36004) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtOsp-0001cM-Lf for 10709@debbugs.gnu.org; Fri, 03 Feb 2012 14:33:20 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EACo1LE9MCqD0/2dsb2JhbABDryaBBoFyAQEEAVYjEAsOJhIUGA0kiA+4ZowBEgICAwYCBAIBBAICDAYKAwGEHQEEBB6DOQSIRJsAhFo X-IronPort-AV: E=Sophos;i="4.73,352,1325480400"; d="scan'208";a="161105683" Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Feb 2012 14:32:39 -0500 Received: by pastel.home (Postfix, from userid 20848) id C2825590EC; Fri, 3 Feb 2012 14:32:38 -0500 (EST) From: Stefan Monnier To: Wolfgang Schnerring Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: References: <20120203163029.GB1786@elzar.wosc.de> <20120203182736.GC1786@elzar.wosc.de> Date: Fri, 03 Feb 2012 14:32:38 -0500 In-Reply-To: <20120203182736.GC1786@elzar.wosc.de> (Wolfgang Schnerring's message of "Fri, 3 Feb 2012 19:27:36 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> > I guess you need to get hg to generate standard conflict markers. Ref: > You could configure diff3 as the default merge program. > However, in my experience, using smerge-mode on the "internal:merge" > results of hg worked, too. So you're saying that hg uses standard conflict markers in its internal:merge code? Wonderful. >> Actually I guess vc-hg would need some changes too. > Yep, I guess you'd need changes on both ends. Apparently only vc-hg.el needs to be changed, then. Stefan From debbugs-submit-bounces@debbugs.gnu.org Sat Feb 04 04:47:25 2012 Received: (at 10709) by debbugs.gnu.org; 4 Feb 2012 09:47:25 +0000 Received: from localhost ([127.0.0.1]:53120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtcDN-0000vE-0r for submit@debbugs.gnu.org; Sat, 04 Feb 2012 04:47:25 -0500 Received: from pharos.wosc.de ([85.214.124.141]:52866) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RtcDJ-0000v5-FJ for 10709@debbugs.gnu.org; Sat, 04 Feb 2012 04:47:22 -0500 Received: from hlle-4db8bd35.pool.mediaways.net ([77.184.189.53] helo=elzar) by pharos.wosc.de with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RtcCb-0007Qr-Vw; Sat, 04 Feb 2012 10:46:39 +0100 Received: from wosc by elzar with local (Exim 4.74) (envelope-from ) id 1RtcCT-0001GZ-4b; Sat, 04 Feb 2012 10:46:29 +0100 Date: Sat, 4 Feb 2012 10:46:29 +0100 From: Wolfgang Schnerring To: Stefan Monnier Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: <20120204094629.GA1775@elzar.wosc.de> References: <20120203163029.GB1786@elzar.wosc.de> <20120203182736.GC1786@elzar.wosc.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Stefan Monnier [2012-02-03 14:32]: > So you're saying that hg uses standard conflict markers in its > internal:merge code? Wonderful. I've just double-checked: yes, it does. Here's an example of a file with conflicts: <<<<<<< local foo =3D baz =3D=3D=3D=3D=3D=3D=3D foo =3D qux >>>>>>> other This matches the markers defined in smerge-mode, and invoking smerge-mode manually on the example file works just fine, just as I remembered. > >> Actually I guess vc-hg would need some changes too. > > Yep, I guess you'd need changes on both ends. >=20 > Apparently only vc-hg.el needs to be changed, then. Yup, this brings me back to my original chain of thought: vc-hg needs to learn to detect conflicted files, and the vc-find-file-hook needs to be ported/abstracted from vc-svn. Wolfgang --T4sUOijqQbZv57TR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iD8DBQFPLP51YfWCHec7w7QRAvbCAKCvq9GbQTiNyJHVFxJiH+CDu4WbrwCgi2yt 4NaEcsopmrEOk8WOaG8dUhU= =aP5h -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR-- From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 06 08:28:26 2012 Received: (at 10709) by debbugs.gnu.org; 6 Feb 2012 13:28:26 +0000 Received: from localhost ([127.0.0.1]:56486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuOcL-0001hR-KW for submit@debbugs.gnu.org; Mon, 06 Feb 2012 08:28:25 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.181]:6743) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RuOcJ-0001hF-SM for 10709@debbugs.gnu.org; Mon, 06 Feb 2012 08:28:24 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EACnUL09MCqD0/2dsb2JhbABDrziBBoFyAQEEAVYjBQsLDiYSFBgNJIgPuQSMDhICAgMGAgQCAQQCAgwGCgOEHgEEBB6DOQSIRJsDhFo X-IronPort-AV: E=Sophos;i="4.73,370,1325480400"; d="scan'208";a="161427130" Received: from 76-10-160-244.dsl.teksavvy.com (HELO pastel.home) ([76.10.160.244]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 06 Feb 2012 08:27:27 -0500 Received: by pastel.home (Postfix, from userid 20848) id 50F3E58C8C; Mon, 6 Feb 2012 08:27:27 -0500 (EST) From: Stefan Monnier To: Wolfgang Schnerring Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: References: <20120203163029.GB1786@elzar.wosc.de> <20120203182736.GC1786@elzar.wosc.de> <20120204094629.GA1775@elzar.wosc.de> Date: Mon, 06 Feb 2012 08:27:27 -0500 In-Reply-To: <20120204094629.GA1775@elzar.wosc.de> (Wolfgang Schnerring's message of "Sat, 4 Feb 2012 10:46:29 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -1.9 (-) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Glenn Morris X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) >> So you're saying that hg uses standard conflict markers in its >> internal:merge code? Wonderful. > I've just double-checked: yes, it does. Here's an example of a file > with conflicts: > <<<<<<< local > foo = baz > ======= > foo = qux >>>>>>>> other > This matches the markers defined in smerge-mode, and invoking > smerge-mode manually on the example file works just fine, just as I > remembered. >> >> Actually I guess vc-hg would need some changes too. >> > Yep, I guess you'd need changes on both ends. >> >> Apparently only vc-hg.el needs to be changed, then. > Yup, this brings me back to my original chain of thought: vc-hg needs > to learn to detect conflicted files, and the vc-find-file-hook needs > to be ported/abstracted from vc-svn. You can also check vc-bzr.el which has similar code. Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 30 20:15:07 2012 Received: (at 10709) by debbugs.gnu.org; 1 Dec 2012 01:15:07 +0000 Received: from localhost ([127.0.0.1]:47623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tebff-00065G-AU for submit@debbugs.gnu.org; Fri, 30 Nov 2012 20:15:07 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:46119) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tebfc-000655-GC for 10709@debbugs.gnu.org; Fri, 30 Nov 2012 20:15:05 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1TebdW-0001oO-Ou; Fri, 30 Nov 2012 20:12:54 -0500 From: Glenn Morris To: Wolfgang Schnerring Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts References: <20120203163029.GB1786@elzar.wosc.de> X-Spook: infowar brigand Lexis-Nexis DES New World Order Bellcore X-Ran: @?qY/jDOJdh`d8xgfo?kr[}u~O8TdkAvZa2H%<0Lnw-$:OCc0wrFF{teEj,C]!;!*j;us7 X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Fri, 30 Nov 2012 20:12:54 -0500 In-Reply-To: <20120203163029.GB1786@elzar.wosc.de> (Wolfgang Schnerring's message of "Fri, 3 Feb 2012 17:30:29 +0100") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.6 (----) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.6 (----) Wolfgang Schnerring wrote: > vc-svn has the useful behaviour (via vc-svn-find-file-hook) that when > you visit a file with conflicts, it drops you into smerge-mode, and > automatically marks the file as resolved once you've removed all > conflict markers. This makes for a very seamless editing experience. :-) > > It would be nice if vc-hg did the same. I guess most of the behaviour > can be lifted straight from vc-svn, however I didn't find anything to > suggest that vc-hg talks to "hg resolve -l" at the moment, which is > needed to find out whether the current file is conflicted. So I guess > that would be the starting point. Maybe something like this, copied from vc-bzr? The detection of a conflict is poor and Needs Work. With bzr we have .BASE, .OTHER, and .THIS files present. With hg, conflicts don't even seem to show up in "hg status". It's probably not a good idea to call "hg resolve -l" on every single visit to an hg controlled file. Nor is it probably a good idea to search the entirety of every file for <<<< markers without some other clue suggesting a conflict. I used .orig files because I seemed to get one in my two minutes playing with hg. These don't seem to get cleaned up on hg resolve, so maybe vc-hg-resolve-when-done should do that too? However, .orig is a very vague, general file name. *** lisp/vc/vc-hg.el 2012-07-19 14:38:01 +0000 --- lisp/vc/vc-hg.el 2012-12-01 01:01:18 +0000 *************** *** 464,469 **** --- 464,492 ---- (vc-hg-command t 0 file "cat" "-r" rev) (vc-hg-command t 0 file "cat"))))) + (defun vc-hg-resolve-when-done () + "Call \"hg resolve -m\" if the conflict markers have been removed." + (save-excursion + (goto-char (point-min)) + (unless (re-search-forward "^<<<<<<< " nil t) + (vc-hg-command nil 0 buffer-file-name "resolve" "-m") + ;; Remove the hook so that it is not called multiple times. + (remove-hook 'after-save-hook 'vc-hg-resolve-when-done t)))) + + (defun vc-hg-find-file-hook () + (when (and buffer-file-name + (file-exists-p (concat buffer-file-name ".orig")) + ;; FIXME: We should check that "hg resolve -l" says "U". + ;; If "hg resolve -l" says there's a conflict but there are no + ;; conflict markers, it's not clear what we should do. + (save-excursion + (goto-char (point-min)) + (re-search-forward "^<<<<<<< " nil t))) + (smerge-start-session) + (add-hook 'after-save-hook 'vc-hg-resolve-when-done nil t) + (message "There are unresolved conflicts in this file"))) + + ;; Modeled after the similar function in vc-bzr.el (defun vc-hg-workfile-unchanged-p (file) (eq 'up-to-date (vc-hg-state file))) From debbugs-submit-bounces@debbugs.gnu.org Fri Nov 30 23:44:15 2012 Received: (at 10709) by debbugs.gnu.org; 1 Dec 2012 04:44:15 +0000 Received: from localhost ([127.0.0.1]:47770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teew3-0004J6-KR for submit@debbugs.gnu.org; Fri, 30 Nov 2012 23:44:15 -0500 Received: from ironport2-out.teksavvy.com ([206.248.154.182]:34993) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Teew2-0004J0-IC for 10709@debbugs.gnu.org; Fri, 30 Nov 2012 23:44:14 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av0EAG6Zu09FxKh9/2dsb2JhbABEtBGBCIIVAQEEAVYjBQsLDiYSFBgNJIgcBboJkEQDiEKacYFYgwc X-IronPort-AV: E=Sophos;i="4.75,637,1330923600"; d="scan'208";a="208863506" Received: from 69-196-168-125.dsl.teksavvy.com (HELO pastel.home) ([69.196.168.125]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Nov 2012 23:42:04 -0500 Received: by pastel.home (Postfix, from userid 20848) id 71A1859069; Fri, 30 Nov 2012 23:42:04 -0500 (EST) From: Stefan Monnier To: Glenn Morris Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts Message-ID: References: <20120203163029.GB1786@elzar.wosc.de> Date: Fri, 30 Nov 2012 23:42:04 -0500 In-Reply-To: (Glenn Morris's message of "Fri, 30 Nov 2012 20:12:54 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.8 (/) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Wolfgang Schnerring X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -0.0 (/) > The detection of a conflict is poor and Needs Work. With bzr we have Maybe we should ask on a Mercurial list how it can be done (and turn it into a feature request if there's no good answer)? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 20:53:56 2012 Received: (at 10709) by debbugs.gnu.org; 5 Dec 2012 01:53:56 +0000 Received: from localhost ([127.0.0.1]:53879 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg4BQ-0003Lr-6e for submit@debbugs.gnu.org; Tue, 04 Dec 2012 20:53:56 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:53998) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg4BN-0003Lj-46 for 10709@debbugs.gnu.org; Tue, 04 Dec 2012 20:53:54 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tg4BF-0006mH-K8; Tue, 04 Dec 2012 20:53:45 -0500 From: Glenn Morris To: Stefan Monnier Subject: Re: bug#10709: Feature request: vc-hg should activate smerge-mode for conflicts References: <20120203163029.GB1786@elzar.wosc.de> X-Spook: cypherpunk TWA 2600 Magazine bomb ASDIC Mossad domestic X-Ran: ?vbr~~`9c*yJ>{$D0$p@B0_`S>Xt&l(LL+F.ikgm7gseO%cn"MD1xXJzSQABjHv^1AfbP@ X-Hue: green X-Debbugs-No-Ack: yes X-Attribution: GM Date: Tue, 04 Dec 2012 20:53:45 -0500 In-Reply-To: (Stefan Monnier's message of "Fri, 30 Nov 2012 23:42:04 -0500") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: 10709 Cc: 10709@debbugs.gnu.org, Wolfgang Schnerring X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.0 (-----) Stefan Monnier wrote: >> The detection of a conflict is poor and Needs Work. With bzr we have > > Maybe we should ask on a Mercurial list how it can be done (and turn it > into a feature request if there's no good answer)? AFAICS they have set their face against it, eg http://bz.selenic.com/show_bug.cgi?id=2724 # RESOLVED FIXED I think checking for state = 'edited, plus .orig file, plus conflict markers is good enough for a start, so I installed that to trunk and we can see how it works out for people. BTW, I think this stuff should be abstracted to a general vc-find-file-hook/after-save-hook that calls vc-BACKEND-conflicted-p. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 04 20:54:14 2012 Received: (at control) by debbugs.gnu.org; 5 Dec 2012 01:54:14 +0000 Received: from localhost ([127.0.0.1]:53883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg4Bh-0003Mg-Lc for submit@debbugs.gnu.org; Tue, 04 Dec 2012 20:54:14 -0500 Received: from fencepost.gnu.org ([208.118.235.10]:54001) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tg4Bf-0003MY-Nc for control@debbugs.gnu.org; Tue, 04 Dec 2012 20:54:12 -0500 Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1Tg4Ba-0006pU-Rw for control@debbugs.gnu.org; Tue, 04 Dec 2012 20:54:07 -0500 Date: Tue, 04 Dec 2012 20:54:06 -0500 Message-Id: Subject: control message for bug 10709 To: X-Mailer: mail (GNU Mailutils 2.1) From: Glenn Morris X-Spam-Score: -4.2 (----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.2 (----) close 10709 24.4 From unknown Thu Jun 19 13:56:53 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 02 Jan 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator