emacs-tangents
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

diff-mode merge tool for e.g. filesystem trees


From: Samuel Wales
Subject: diff-mode merge tool for e.g. filesystem trees
Date: Sat, 3 Sep 2022 22:06:41 -0700

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]