[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: how to check-in to a deleted repository?

From: THOMAS DAVID VAUGHAN <tom_at_vaughan.to>
Date: 2005-09-27 03:31:02 CEST

On Mon, 2005-09-26 at 19:54 -0400, Christopher Ness wrote:
> On Mon, 2005-09-26 at 16:39 -0700, THOMAS DAVID VAUGHAN wrote:
> > i have a repository that i deleted. for example, let's say i did:
> >
> > svn co https://server/repos/foo/tag/1 foo-1
> > svn rm foo-1
> >
> > but then, later, i also did:
> >
> > svn co -r 263 https://server/repos/foo/tag/1 foo-1
> >
> > where 263 is the revision number just prior to the delete. and now i've
> > found that i need to update a file. but i can't because i've deleted
>
> Do a reverse merge to bring back the deleted data on the server using
> the URL. Then update your working copy to the revision the reverse
> merge creates, make your changes and commit.
>
> svn merge -r264:263 https://server/repos/foo/tag/1
> ## Now your repository is at the same state as 263
> svn up foo-1
> ## Brings your repository to HEAD which should likely be 256
> ## so you can make your changes and commit

Hm. Actually the HEAD is now at something like 780. What I *really* have
is a layout like:

        server
                tags
                branches
                trunk
        client
                tags
                branches
                trunk
        library1
                tags
                branches
                trunk
        library2
                tags
                branches
                trunk

And at some point in time (around revision number 260) each of these
modules were copied to "tags/milestone-1" respectively. Currently when
we reach a milestone everything is tagged. At some point though the
modules will take on a life of their own and have their own milestone
builds independent of the other modules.

And then development continued. And we now have a small number of
milestone builds. And consequently a revision number like 780. But we
also discovered that library1 wasn't needed and so it was deleted.
Thinking of course that it's still technically in the repository and can
be brought back as needed. Each of these modules is in the same
repository (sorry, not sure if that's the correct term. suffice it to
say that they all share the same revision number.).

so to bring back the deleted library i need to use "-r 263" when i check
out. not a big deal, i thought. until i needed to check something back
in.

what i don't understand is... the last revision number, effectively, on
"[module]/tags/milestone-1" is 263. this is true for all of the modules
in the repository. and i have a build script that assumes it's the same
number for all the modules. so can i safely merge all the modules to the
HEAD? (i still think in cvs terms too much...) since the modules have
been "svn copy'd" i won't really be updating the contents, just the
revision number. but then does this also mean that the deleted module is
back on the HEAD? well, i don't mean "undeleted", just that i don't need
to specify "-r ###". Or do i need to replace "-r 263" with "-r 781" in
my build scripts?

>
> > this repository (the idea being that it would just be deleted from the
> > trunk, but still in the repository for historical retrieval). and ci
> > doesn't take a "-r 263". i would expect the "-r 263" to be sticky
> > anyway. so how do i do this?
>
> Then you can delete the path (not the repository, but that's a
> terminology nit) from the repository again.
>
> You do not control revision numbers, they control you. :)
>
> > also, is there anyway to set FOO_1 to revision number 263?
>
> I don't understand. Do you mean like a macro to replace instances of
> `FOO_1' in a file with the revision number of that file?

no. i mean being able to say "-r FOO_1" instead of "-r 263". effectively
creating another type of tag scheme. :) i can hear the cries of derision
now...

thanks much!

-tom

>
> If so, see the FAQ:
> http://subversion.tigris.org/faq.html#version-value-in-source
>
> Cheers,
> Chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Sep 27 03:32:27 2005

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.