Skip to main content

Diff a directory and sync changes.

Project description

ddir

Lint commit message Release Drafter pytest release GitHub license GitHub release

ddir is a command line tool to calculate diffs between two directories and resolve them.

Check out the diff file format as well.

Usage

Initialize

This will create a directory .ddir in the source directory where all diffs will be stored as well as a reference to the destination directory.

ddir init --source <path> --destination <path>

Create diff

This will traverse the source directory, compare it to the destination directory and store ste diff in .ddir.

ddir create --source <path>

Resolve diff

This will iterate through all diffs in a given diff file and apply them according to given modes.

ddir resolve --source <path> --file 2022-05-19-806383729.diff --modes xxxxx

Modes to resolve

The modes work like this: for each type (the order is +, -, >, <, ?) a number in the tuple indicates how to handle diffs of that type. There are the following modes:

  • 0: skip
  • 1: apply (type dependent, see below)
  • 2: choose manually

When choosing to apply diffs, the following will happen:

  • +, >, ?: override destination element with source element
  • <: override source element with destination element
  • -: delete destination element

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ddir-1.0.0-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page