Re: Dry run?
Todd Wilson <[email protected]> Thu, 12 Mar 2026 15:52:20 -0700
| Newsgroups | gmane.network.unison.general |
|---|---|
| Message-ID | <CA+-99oKerfNeqsbCkB8-pqvRDiceeBtOh3uqVN2NZU0n=vZBCQ@mail.gmail.com> |
Just to confirm (sorry for reiterating if I was clear enough before): I explicitly don't want to sync anything and don't want to be asked about whether to sync. I just want a batch list of what would have been synced (or skipped by default) if I had selected "Go" in the UI. You can imagine that I have a cron job that wakes up every night at midnight and records the sync state of my two roots into a dated file. Since you mentioned `rsync`, I just looked at its manual, which has this: > --dry-run, -n perform a trial run with no changes made Yes, this is exactly like what I'm looking for (assuming that rsync still outputs everything to stdout). Since asking my question, I've noticed some unison flags that might address what I'm looking for: -nocreation xxx prevent file creations on one replica -nodeletion xxx prevent file deletions on one replica -noupdate xxx prevent file updates and deletions on one replica but it's not clear from these descriptions if this will achieve my aim precisely. In any case, a --dry-run or -n flag would be perfect. Thanks, Todd Wilson On Thu, Mar 12, 2026 at 9:27=E2=80=AFAM Greg Troxel <[email protected]> wrote: > > Todd Wilson <[email protected]> writes: > > > Is there a way to perform a dry-run from the command line, where Unison > > prints all the changes it would have made during a batch sync without > > actually performing them? This is similar to running the UI, reviewing = the > > list, and then closing the window without hitting "Go," but I want the = list > > of changes printed to stdout so that I can capture them in a file or pi= pe > > them to another program. > > This is the default, in that it asks for confirmation before acting. > > It's a fair question if there is something like "-n" in rsync, and if > not it seems reasonable to add. > > I use CLI and don't use -batch (but do use -auto), so in my usage I see > the list of things to change and then type y. To unsubscribe from this group and stop receiving emails from it, send an e= mail to [email protected].