Skip to main content

Track changes between two git repositories

Project description

This is a tool that makes it easier to track source code changes between two repositories. This tool was originally developed for use by the RobotPy project, and made it easier for me to maintain a python port of various Java libraries.

This tool assumes there is an ‘original’ git repository, and a ‘destination’ git repository that is being validated. There is assumed a one to one relationship between various original and destination files. This tool provides quick and easy shortcuts to allow you to record metadata in the destination files that allow you to track changes in the source files:

  • Record which file it comes from

  • Mark the latest manually verified revision in the destination

  • Allow viewing the latest modifications to the source file (if any)

  • Update the revision metadata in the destination file

Install

pip install git-source-track

Configuration

Create a file called ‘.gittrack’ in the root of the destination git repository that has the following ini-style format:

[git-source-track]

# Original files
upstream_root = ../path/to/files

# Commit in original repository
upstream_commit = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

# Files that are being validated
validation_root = path/to_files

# (optional) Commits to exclude from git log output
exclude_commits_file = foo/exclude_commits.txt

# (optional) Specify location to place validation line (first or last)
default_location = first

# (optional) Primary branch of upstream repository
upstream_branch = main

Now you can issue git commands and magic will happen!

Usage

See the help command for more information.

$ git source-track help

Known issues

  • Tool mostly tested using Python 3, but should work on Python 2

  • Probably won’t work on Windows, due to the use of the ‘sh’ package and because there are dependencies on unix-style tools * May work in Windows 10 posix environment

  • Assumes destination files are python files

  • Emits python style comments on destination files

Pull requests are welcome to fix any of these problems. :)

Author

Dustin Spicuzza (dustin@virtualroadside.com)

Project details


Download files

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

Source Distribution

git-source-track-0.4.0.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

git_source_track-0.4.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file git-source-track-0.4.0.tar.gz.

File metadata

  • Download URL: git-source-track-0.4.0.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for git-source-track-0.4.0.tar.gz
Algorithm Hash digest
SHA256 65e48fccc0ca1521359ac23d920ac82778f8dda8969bebd15cb226780075e380
MD5 c8240e947d7bcbe0245003db69da82e5
BLAKE2b-256 5f741aa3a1a5843d45037dc12df3fc0bd4dbeb521d6b17cc69fc6fb919b3d0d3

See more details on using hashes here.

File details

Details for the file git_source_track-0.4.0-py3-none-any.whl.

File metadata

File hashes

Hashes for git_source_track-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6b4f3e0714108b0038cb1e7465d8ad7be6ca2eb97815a14a008bd015b56a287
MD5 06a30a45bc9bf9c32a2ade0bdfe3a3f7
BLAKE2b-256 b0669df390dbc47c9271b1bbd6b91cddaf29915bb86557bdc02aec0e5f04f8cf

See more details on using hashes here.

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