unofficial mirror of emacs-tangents@gnu.org
 help / color / mirror / Atom feed
* diff-mode merge tool for e.g. filesystem trees
@ 2022-09-04  5:06 Samuel Wales
  2022-09-04  5:15 ` Samuel Wales
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2022-09-04  5:06 UTC (permalink / raw)
  To: emacs-tangents

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.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: diff-mode merge tool for e.g. filesystem trees
  2022-09-04  5:06 diff-mode merge tool for e.g. filesystem trees Samuel Wales
@ 2022-09-04  5:15 ` Samuel Wales
  2022-09-04  6:15   ` Emanuel Berg
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Wales @ 2022-09-04  5:15 UTC (permalink / raw)
  To: emacs-tangents

and i discovered the name just after pressing send.

the thing i recall is probably diffsync.el.  it is very different from
my design.


On 9/3/22, Samuel Wales <samologist@gmail.com> wrote:
> 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.
>


-- 
The Kafka Pandemic

A blog about science, health, human rights, and misopathy:
https://thekafkapandemic.blogspot.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: diff-mode merge tool for e.g. filesystem trees
  2022-09-04  5:15 ` Samuel Wales
@ 2022-09-04  6:15   ` Emanuel Berg
  0 siblings, 0 replies; 3+ messages in thread
From: Emanuel Berg @ 2022-09-04  6:15 UTC (permalink / raw)
  To: emacs-tangents

Samuel Wales wrote:

> and i discovered the name just after pressing send.
>
> the thing i recall is probably diffsync.el. it is very
> different from my design.

In MELPA, and here:

  https://github.com/ber-ro/diffsync

-- 
underground experts united
https://dataswamp.org/~incal




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-04  6:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-04  5:06 diff-mode merge tool for e.g. filesystem trees Samuel Wales
2022-09-04  5:15 ` Samuel Wales
2022-09-04  6:15   ` Emanuel Berg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).