Hiding old data from new users

Jan Vrany jan.vrany at fit.cvut.cz
Thu Oct 20 14:19:21 UTC 2016


On Thu, 2016-10-20 at 10:08 -0400, Bob Eby wrote:
> Hi Mercurial experts,
> 
> This may sound strange but we've checked a secret into one of our
> repositories and now we want to share pretty much everything but that
> with an outside consultant.
> 
> I tried creating a partial repo of a "cleaned" branch with:
> 
> hg clone -b
> 
> Problem is, this included all the parents which pulled in the old
> default branch that had the secret.
> 
> Aside from copying a current checked out file set into a brand
> spanking new repository, is there a way to create a partial
> repository
> suitable for intermediate push/pull upstream from client repositories
> that can act as a "secrecy buffer" against some old default file?
> 
> I'd like to give them some but not all of the repo history, or does
> it
> not even make sense to want to share that extra history?

A rather crazy idea:
* make a full clone of original repo (with secret)
* use evolve extension to amend the commit that checked in the secret
  (replace the secret with ***, whatever). 
* hand over the rewritten repo
* after work is done in that rewritten copy, export all new changesets
  and import them in original repo containing the secret. 

Note, that rewriting the history would changes changeset ids so you
need to track original changeset id to "rewritten" changeset id. 
This could be done by matching commit messages and other metadata...
or simply take a note on what were heads in both repositories 
before handing them over. 

HTH, Jan

> 
> Thanks for any and all input,
> Robert Eby
> _______________________________________________
> Mercurial mailing list
> Mercurial at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial
> 



More information about the Mercurial mailing list