tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: pkgsrc-wip: how much CVS history imported to git?
* On 2015-09-28 at 18:41 BST, Thomas Klausner wrote:
> On Mon, Sep 28, 2015 at 11:08:35AM -0500, John D. Baker wrote:
> > I've been taking my first steps with the new pkgsrc-wip setup. Having
> > never used 'git' before, I'm slowly getting a handle on how to do things.
> > Once I feel sufficiently competent with it (at least for my immediate
> > needs), I'll likely request commit access.
> >
> > One thing I've not quite figured out is how much of the old CVS revision
> > history was imported to the 'git' repository? Or was it just a current-
> > state snapshot?
>
> The whole history from CVS has been imported except for the branches.
> Branches in wip were not useful. Most of them are just the result from
> 'cvs import', the old method of creating packages.
>
> > There's one package I'd like to roll back to an earlier state than at
> > the HEAD of the master branch, but I've not figured out how to do that
> > or if it's even possible.
>
> cd /usr/pkgsrc/wip/foo
> git log .
>
> This will give you the history of that directory, including lines like
> "commit $HASH".
>
> git checkout $HASH
>
> will give you the state of the wip tree at a particular point in time.
> Copy the files away and go back to the current newest with "git
> checkout master". Copy the saved versions into the wip tree and "git
> commit".
>
> Probably there are other ways, but this one should work.
I'd go with (assuming up-to-date and on master):
$ cd wip
$ git log foo # find the sha you want to revert to
$ git diff <sha>.. -- foo | git apply -R
$ git commit foo
That is, show diffs between the version you want to go back to and
current, apply a reverse diff to get back to it and commit that.
Saves having to do any intermediate copies or mess with the tree
state.
--
Jonathan Perkin - Joyent, Inc. - www.joyent.com
Home |
Main Index |
Thread Index |
Old Index