From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: [patch: first impression] Date: Tue, 18 Oct 2022 17:47:25 +0300 Message-ID: <5df61fcd-f085-c59a-1389-2573fdce40d7@yandex.ru> References: <87fsgyuyh7.fsf@mat.ucm.es> <871qrq9240.fsf@mat.ucm.es> <396309ef-2040-ec3c-af19-3fc6a0d587a0@yandex.ru> <87k05cw3ps.fsf@mat.ucm.es> <32439d3e-e40b-c2c2-5f5a-34785a1a5790@yandex.ru> <87v8os9o8q.fsf@mat.ucm.es> <877d177mri.fsf_-_@mat.ucm.es> <520c15a0-a82b-657f-c47f-8f030521980a@yandex.ru> <87fsfv1yau.fsf@mat.ucm.es> <43e67d5a-e3f4-3e7d-cd0e-819a08279d7e@yandex.ru> <877d16khai.fsf@mat.ucm.es> <878rlmim4q.fsf@mat.ucm.es> <7ae1356e-ff81-5445-ab6f-bf431678bf69@yandex.ru> <877d16fgfr.fsf@mat.ucm.es> <0cc26283-3e36-d418-6f72-99fa31304a9d@yandex.ru> <87sfjmgoya.fsf@mat.ucm.es> <87v8oh63oq.fsf@mat.ucm.es> <084455a1-cd60-1350-6947-964f255f912e@yandex.ru> <87o7u945xu.fsf@mat.ucm.es> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14492"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: emacs-devel@gnu.org, Arne Babenhauserheide , georges.racinet@octobus.net To: Uwe Brauer Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 18 16:54:02 2022 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oknyk-0003ds-HU for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Oct 2022 16:54:02 +0200 Original-Received: from localhost ([::1]:40886 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oknyj-0001rh-9P for ged-emacs-devel@m.gmane-mx.org; Tue, 18 Oct 2022 10:54:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49460) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oknsj-0004JD-NE for emacs-devel@gnu.org; Tue, 18 Oct 2022 10:47:54 -0400 Original-Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]:39569) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oknsZ-0001Ko-Tl for emacs-devel@gnu.org; Tue, 18 Oct 2022 10:47:49 -0400 Original-Received: by mail-wr1-x42e.google.com with SMTP id f11so23876937wrm.6 for ; Tue, 18 Oct 2022 07:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=LM4tZNvr30ocDpYRarudPRQGH4rhRbEqJTW/34QaOyg=; b=MG6jlef+sx4KMJe+wjRjOZDoWYpMouiAKRUHZ6/zWKP2ivQRkyKDNklVpBsoOXVdkI wp1Mb1mzCxYkH/6VTpc/RP5qBvqkmkrcdvdiRrwZJ5YZ1ZAdfzZhOq2S1pwSJ+s6scDx CbRk9+3Z4JRKnK0+6lvAfQuQaeMuURIaV32RRUemDIBsoBIqWz8+VKMEtn8mpGRxbqfw gUG8N8P8+w7+bvApweIwxYK9bwW+d+pt+jVDjfH+OjDCjB9i9Dwr2eOY3++pC8xowWw9 JyRvzNfP/co3rbrEKGQPs7KV2dvBZZAjhtMxv67/S2t6ugl7HYYzxlHT1J4g2YtipXOk yEUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LM4tZNvr30ocDpYRarudPRQGH4rhRbEqJTW/34QaOyg=; b=2MNmSbxFmowo5BwESXpRFh02PVtdbKTBmQfRm0XsPyLCvUiZ80iH8vDHTY30GEMvuP QGllLFkCr/DDRxNsUzM/LnblFUZqE4Z/8xe9lVdfiFI5nI2mYvh9seZC1eie3DHyxawy PhLIiqhzii0LsENtZvS79/snQONfRcCfoBghijjRhkIQRUkXK3ZBixlYgbbx3B8tj1CT 8PpfMJ7+D/c0QAYU/GFXQ4TSgBD3KSIct8uktEYoc/JOjgqm7c92FYAEeOxIva/c/MHg NGbqRP906/VnuA+O17N4/rciPgxqmNS1lqUxWGFB3bZ7v0XUl/8gHNTVWA6z7Ed+IsnW czGg== X-Gm-Message-State: ACrzQf2v0i+LeAPGl3JGlaTDQSRpQPgnekbYYj3l72rZDJXwbJlPSOqb +Z+xADZFnapLiYolkGzCyFM= X-Google-Smtp-Source: AMsMyM6FlR4eslSjA7NRk6bPeFHRGjgCBRu/H/4hgSC7g8ehwFz7JhNt2HM5ArACif1AV2yEkDDFRw== X-Received: by 2002:a5d:588f:0:b0:231:c661:5cee with SMTP id n15-20020a5d588f000000b00231c6615ceemr2270089wrf.18.1666104447431; Tue, 18 Oct 2022 07:47:27 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id z9-20020a5d44c9000000b00228d7078c4esm11327299wrr.4.2022.10.18.07.47.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Oct 2022 07:47:27 -0700 (PDT) Content-Language: en-US In-Reply-To: <87o7u945xu.fsf@mat.ucm.es> Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:298051 Archived-At: On 18.10.2022 16:28, Uwe Brauer wrote: > I did the same, reverted to files edit the diff and then commited > > 1. Lisp implementation 8 sec > > 2. Commit-patch 4 sec > > > Not sure what is the conclusion here. Well in general hg is slower especially if there are a lot of named branches, but the emacs-hg repository has one the default > and hg has 2, default and stable > > Strange indeed. Try this modification: diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el index df51f52bc7..3e78b8cfe9 100644 --- a/lisp/vc/vc.el +++ b/lisp/vc/vc.el @@ -1715,9 +1715,6 @@ vc-default-checkin-patch "--no-backup-if-mismatch" "-i" "-")) (user-error "Patch failed: %s" (buffer-string)))) - (dolist (f files) - (with-current-buffer (get-file-buffer f) - (revert-buffer t t t))) (vc-call-backend backend 'checkin files comment)) (dolist (f files) (copy-file (expand-file-name f tmpdir) This step is probably unnecessary, and might take up extra time. >> But of course it depends on the number of files and their sizes, I suppose. > >>> Conclusion, for most practical purpose the lisp implementation is >>> enough. I just considered an extreme case. > >> Wish we managed to implement something faster for Hg. > >> 'hg import --bypass' seemed the most promising option, but the 'hg >> update tip' step that you suggested can end up in conflict. > > > It is not clear to me why? The patch you might be committing can have changes conflicting with the existing modifications inside the same files. We decided to allow that (because diff-mode definitely permits such modification). But 'hg update', when the file has certain changes in the same area that should be updated with the switch between revisions, drops you into merge mode. >> I've searched for some "plumbing" Hg command corresponding to 'git >> reset --soft' and couldn't find it. > > git reset --soft > should be > > hg revert > > if I am not mistaken No, 'hg revert' is the same as 'git checkout FILE' or 'git restore FILE'. It affects the file contents. Whereas 'git reset --soft' only switches the current HEAD to a different revision, without touching the file contents on disk (those outside of .git directory, of course).