How do I recover a lost ports directory with svn?
Bob Willcox
bob at immure.com
Tue Dec 26 20:20:41 UTC 2017
On Tue, Dec 26, 2017 at 05:49:56PM +0000, Matthew Seaman wrote:
> On 26/12/2017 16:58, Matthias Apitz wrote:
> > On Tuesday, 26 December 2017 17:27:54 CET, Bob Willcox <bob at immure.com>
> > wrote:
> >> I accidently removed one of my ports subdirectories, devel/swig13, and
> >> need to check it back out from svn. Unfortunately the documentation for
> >> svn seems skimpy (at best) and I'm not able to come up with a command
> >> and arguments that will allow me to check out this port's directory.
> >>
> >> Is there some way to do this (w/o removing everything and checking it
> >> all out again)? Any help much appreciated.
> >>
> >> Thanks,
> >> Bob
> >>
> >
> > cd /usr/ports
> > svn up
> >
> > or
> >
> > svn up -rnnnnnn
> >
>
> Careful now. bapt removed the devel/swig13 port in r456846 about 5 days
> ago now.
>
> If the OP has a checked out ports tree from before r456846 ('svn info'
> will show what revision you have) where he has accidentally deleted
> devel/swig13, then he can do:
>
> # svn revert -R devel/swig13
>
> If he's got a newer version than r456846 but wants to restore the last
> version of devel/swig13 before it was removed, then he can either check
> out a specific version of the entire tree:
>
> # svn up -r456800
>
> or just the devel/swig13 subdirectory, leaving the rest of the tree alone:
>
> # svn up -r456800 devel/swig13
>
> (you need to cd to the top directory, typically /usr/ports, for any of
> these commands.)
>
> Note that 'svn up' will revert both of the last two commands. None of
> these commands should need to pull down vast quantities of data from the
> repository, as there's a pristine copy of the data in /usr/ports/.svn
> including the revision history, so it's pretty easy to get an older
> version of the tree checked out.
>
> Cheers,
>
> Matthew
>
Ok, so maybe that was why when I ran 'svn up' I didn't get it back as I
thought I would (bapt's removal of it being thee reason). That makes sense
then.
I really didn't need the swig13 port. The reason I wound up removing the
directory was due to complaints from synth about it, and in the process of
checking into that I deleted it. :(
Thanks,
Bob
--
Bob Willcox | If everything is coming your way, you're in the
bob at immure.com | wrong lane.
Austin, TX |
More information about the freebsd-questions
mailing list