Skip to main content

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)

Metadata

Release files for git-source-track 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-source-track 0.4.1
File Size Uploaded
git_source_track-0.4.1.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-source-track 0.4.1
File Interpreter ABI Platform
git_source_track-0.4.1-py3-none-any.whl Python 3 none any Details

Total release size: 30.7 kB

Release files / git_source_track-0.4.1.tar.gz

Download URL git_source_track-0.4.1.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
9c65c5307bae6c742d107ce4331221fad78058011db38961df2e47d87502b587
BLAKE2b-256 checksum
How to use checksums
f314bb100fee38c2eb2fe716eb2bb641779ee3a77ef76f1a485d73b1aa7a038a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Release files / git_source_track-0.4.1-py3-none-any.whl

Download URL git_source_track-0.4.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
572caaa35ce5d1567d9edcec1d7aa82d322c4dbb5b619fb4aa7f7ec82cea0952
BLAKE2b-256 checksum
How to use checksums
09063909d5d532c1aebcdb378be1b3d5ad396868627b3f141af53c9255c74300
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.6

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.8

1 release file

0.3.7

1 release file

0.3.6

1 release file

0.3.5

1 release file

0.3.4

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page