From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Samuel Wales Newsgroups: gmane.emacs.tangents Subject: diff-mode merge tool for e.g. filesystem trees Date: Sat, 3 Sep 2022 22:06:41 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12314"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-tangents@gnu.org Original-X-From: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Sun Sep 04 07:07:43 2022 Return-path: Envelope-to: get-emacs-tangents@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 1oUhrD-000330-BB for get-emacs-tangents@m.gmane-mx.org; Sun, 04 Sep 2022 07:07:43 +0200 Original-Received: from localhost ([::1]:60882 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oUhrC-0002cf-8F for get-emacs-tangents@m.gmane-mx.org; Sun, 04 Sep 2022 01:07:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51426) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oUhqO-0002Ra-Hu for emacs-tangents@gnu.org; Sun, 04 Sep 2022 01:06:52 -0400 Original-Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:38408) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oUhqI-0001k4-FO for emacs-tangents@gnu.org; Sun, 04 Sep 2022 01:06:52 -0400 Original-Received: by mail-lj1-x22d.google.com with SMTP id s15so6161421ljp.5 for ; Sat, 03 Sep 2022 22:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=ARfVHn8di/zQSq0b8ngA1zW1T5CQ9QmOfFz4QiBNe8g=; b=iHx2F2zx7w6vbq+aMDTS2m/815mQUibAtybZLI7dUmslErb3Hu/iN7of1JiyTSbxxP iXfHqoo1vr5jTlVTQXeB1ntGYJc8CvbaaMRMBzn85pEk4oNWw3IjZFp/XT06qv1N+Rix Nm2evIiT51C4zUXs3cr5j18TODR6dSHTLrH967mef1c03gjLSmVbKI7TGollOuOo7ZZ4 t8TxlWLgoOSGrHryd9d92V8xc/Lqe+ixwAXMRoZR+4dEdkgViN8VYP6QppmH+8Wmk9d6 zkq/ck8+djWri4cWQVQWMqMLA19paLOK3gHt2PYznUVe7AJcev/Nd7CG1/gITRHJ7NJ/ qdFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=ARfVHn8di/zQSq0b8ngA1zW1T5CQ9QmOfFz4QiBNe8g=; b=oh4j0a8aMpCzzwIYnKxn/gYVsm3TFRnHyLlqJ0juO/xr09JDU1AmMBSBpYyNkEGknS 1gg1qu8ies8zpLoYiZXA/L3vEjy3mqfItJwifSt0r3MFTKd2jktde4wFf/pVfdFMclRC YIbnUDJUp6e34OUfwBaJtSe+iWWhdVL/XvywZABrWCMa5L/+dpZVF/AnZ9X0dbmrrYu5 fzG9stTgt3ieIHSv93LUcUkZY6OrUzqfRweKDaNIaE4DAf2OWFkFesB6Pv26WUsV5U/j hNZRxvAxXPK1LHplXZkHtgPsXm2P8kE0/lp+Pr48S0nj0S5egh7SXBCoRImI+p8d2WIB 0D2w== X-Gm-Message-State: ACgBeo2y33tHwtXpBZissxGQK8KEP21iZFiKL1SIYMy3I26yfcqmgxs7 T3o0xHUpGjIopUBv+nx8R9AxkxT6VEc80ee1XYCs0LOaNA587Q== X-Google-Smtp-Source: AA6agR7/DPlbBPTP0d0uwF3q+SJrkd1dS/HH61d899j/ewDMCssyGUj/Mk79vDdl9fX+ZpyhYoJ+gSfjlBha/oRvHWg= X-Received: by 2002:a2e:b282:0:b0:25e:46b6:ff33 with SMTP id 2-20020a2eb282000000b0025e46b6ff33mr12637747ljx.503.1662268003270; Sat, 03 Sep 2022 22:06:43 -0700 (PDT) Original-Received: by 2002:a05:6520:709:b0:215:af4a:870d with HTTP; Sat, 3 Sep 2022 22:06:41 -0700 (PDT) Received-SPF: pass client-ip=2a00:1450:4864:20::22d; envelope-from=samologist@gmail.com; helo=mail-lj1-x22d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-tangents@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Emacs news and miscellaneous discussions outside the scope of other Emacs mailing lists List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-tangents-bounces+get-emacs-tangents=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-tangents" Xref: news.gmane.io gmane.emacs.tangents:912 Archived-At: i seem to recall a package flew by that merges files using diff mode. i can't seem to find it anywhere. anybody recall? i was interested because i once designed a filesystem tree differ and thought perhaps the new package could too. i vaguely recall that both the new package and my design use the diff gutter for marks. both view fs trees as text. p.s. fwiw, here are my notes on /my/ design. i don't know the new package. for unrelated reasons i cannot implement this. just a design. anybody is very welcome to of course. === pathnames are after the first tab. metadata can be displayed before the first tab. for example: "---rw-r--r--,34668 ./boot/grub/gcry_camellia.mod" "+--rw-r--r--,5 ./boot/grub/gcry_camellia.mod" you can perform operations. operations only apply to the b tree. that is, unlike most mergers, we are not trying to modify a, but instead make b perfect. === operations on dirs will apply to everything under them also. operations on - or + will apply to the opposite also. - k :: dim with `' - ' :: delete dimmed and context - \ :: ediff -+ using my algo - d :: mark delete in b - e :: mark ediff a b files - c :: mark copy a to b - u :: unmark - U :: unmark - x :: execute - s :: put a shell script in a new buffer advanced: - t :: dim stuff underneath (act as a truncating differ like diff -ur) - ? :: dim not in both - ? :: dim all in both - ? :: reduce dirname (see command) ********* REF use case: merging a SUBSET into an older full fileset this is an example of a problem we are trying to solve using these merging capabilities. === suppose you back up your computer nightly. but the backup drive is too small, so you only backup a SUBSET of your files. then your computer crashes. you start running from SUBSET. you do not have access to your ORIGINAL (a.k.a. the FULL FILESET) because ORIGINAL is on internal drives that cannot be physically extracted. you make a lot of changes to what started out as SUBSET. you finally get access to ORIGINAL. now merge SUBSET into ORIGINAL so that you get full set of files with your changes. this is the problem we try to solve.