My take on that is that you could look at what Debian does with its Git packaging workflow employing the git-buildpackage
tool.
The workflow provided by this tool is agnostic with regard to VCS used by upstream vendor, and is organized (roughly) like this:
- You have (at least) two branches:
upstream
and master
.
upstream
holds snapshots of (unmodified) upstream sources usually taken from release tarballs provided by the upstream vendor. That is, each commit on this branch results from these steps:
- The
upstream
branch is checked out.
- All existing files are deleted (
git rm -rf .
).
- The new version of upstream sources is unwrapped and copied over to the work tree, and then added (
git add .
).
- A new commit is then recorded (and a tag
upstream/vX.Y.Z
is created pointing to this commit).
master
contains what's on upstream
plus a set of files providing the infrastructure to build the Debian package (actually, this is just a single directory named "debian").
Each time a new version of upstream sources is imported to the upstream
branch, that branch is merged into master
, and the package maintainer then works on master tailoring their "debianization" to match the changes introduced by upstream.
I think this approach might well be used in your case using plain Git:
- Maintain such an "upstream" branch (you might call it "vendor" or "that_framework" etc). It should receive only new versions of upstream sources (and may be also occasional upstream patches etc).
- After importing the new versions of upstream sources to that branch merge it to your
master
(or whatever branch suits better in your workflow).
Working with Mercurial and Subversion could also be done using their respective Git shims, but I suspect (while not being exactly sure) that this would rather complicate matters, not simplify.