You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mark Knoop <ma...@rawcane.net> on 2008/01/31 22:34:46 UTC

Is it possible to 'unimport'?

Hi

If I import a large file into a repository by accident is it possible to 
reverse the action so as not to permanently increase the size of the 
repository?

Regards
Mark 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Blair Zajac <bl...@orcaware.com>.
Sohail Somani wrote:
> On Thu, 31 Jan 2008 14:55:03 -0800, Blair Zajac wrote:
> 
>> Mark Knoop wrote:
>>>> On Jan 31, 2008, at 16:34, Mark Knoop wrote:
>>>>
>>>>> If I import a large file into a repository by accident is it possible
>>>>> to reverse the action so as not to permanently increase  the size of
>>>>> the repository?
> [snip]
>> That's why I recommend never using import.  Create the top level
>> directory where you want to "import" your files, check out this
>> directory, then copy the files into it you want to use, then add them. 
>> Finally, do a commit.
> 
> I don't see how the two are even remotely related. If you add files and 
> you want to reverse the action so as to not permanently increase the size 
> of the repository (i.e., fantasy_svn obliterate) you still have to do the 
> svndumpfilter magic.

There is no separate commit step with import, as it does a commit immediately 
when it's finished.  With add, it's two steps, so you can verify your work 
before you do the commit.

If you get a typo or anything wrong in an import, and you aren't quick with that 
Control-C, then it's been committed :)

Blair

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Andy Levy <an...@gmail.com>.
On Jan 31, 2008 7:06 PM, Sohail Somani <so...@taggedtype.net> wrote:
> On Thu, 31 Jan 2008 14:55:03 -0800, Blair Zajac wrote:
>
> > Mark Knoop wrote:
> >>>
> >>> On Jan 31, 2008, at 16:34, Mark Knoop wrote:
> >>>
> >>>> If I import a large file into a repository by accident is it possible
> >>>> to reverse the action so as not to permanently increase  the size of
> >>>> the repository?
> [snip]
> > That's why I recommend never using import.  Create the top level
> > directory where you want to "import" your files, check out this
> > directory, then copy the files into it you want to use, then add them.
> > Finally, do a commit.
>
> I don't see how the two are even remotely related. If you add files and
> you want to reverse the action so as to not permanently increase the size
> of the repository (i.e., fantasy_svn obliterate) you still have to do the
> svndumpfilter magic.

But by doing the "in-place import", you have an extra chance to check
your work and undo the add before committing. As opposed to just
importing the whole directory in one shot.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Sohail Somani <so...@taggedtype.net>.
On Thu, 31 Jan 2008 14:55:03 -0800, Blair Zajac wrote:

> Mark Knoop wrote:
>>>
>>> On Jan 31, 2008, at 16:34, Mark Knoop wrote:
>>>
>>>> If I import a large file into a repository by accident is it possible
>>>> to reverse the action so as not to permanently increase  the size of
>>>> the repository?
[snip]
> That's why I recommend never using import.  Create the top level
> directory where you want to "import" your files, check out this
> directory, then copy the files into it you want to use, then add them. 
> Finally, do a commit.

I don't see how the two are even remotely related. If you add files and 
you want to reverse the action so as to not permanently increase the size 
of the repository (i.e., fantasy_svn obliterate) you still have to do the 
svndumpfilter magic.

-- 
Sohail Somani
http://uint32t.blogspot.com


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Mark Knoop <ma...@rawcane.net>.
>
> That's why I recommend never using import.  Create the top level directory 
> where you want to "import" your files, check out this directory, then copy 
> the files into it you want to use, then add them.  Finally, do a commit.
>
> Much safer that way.

Ok this makes sense. It seems I need to consider carefully what needs to go 
into subversion rather than throw everything in just in case. If I am forced 
to tidy things up first and think about it (and even document it) then I 
suspect it will make my life a lot easier in more ways than one. 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Blair Zajac <bl...@orcaware.com>.
Mark Knoop wrote:
>>
>> On Jan 31, 2008, at 16:34, Mark Knoop wrote:
>>
>>> If I import a large file into a repository by accident is it  
>>> possible to reverse the action so as not to permanently increase  the 
>>> size of the repository?
>>
>> You would have to take the repository offline, "svnadmin dump" it to  
>> a text file, "svndumpfilter exclude" to exclude the part you don't  
>> want to keep, "svnadmin load" it into a new repository, bring the  
>> server back up, and then have everybody check out new working copies  
>> (if they had working copies of a revision greater than or equal to  
>> the one you wanted to filter)
>>
>> http://subversion.tigris.org/faq.html#removal
>>
> 
> Ah. I read that but was hoping there was an easier way that I just 
> hadn't been able to find. I'm just playing at the moment so is not a big 
> deal I can just delete the repository and start again. Will be more 
> careful what I import in future!

That's why I recommend never using import.  Create the top level directory where 
you want to "import" your files, check out this directory, then copy the files 
into it you want to use, then add them.  Finally, do a commit.

Much safer that way.

You can also do an inplace checkout using

$ cd into/the/top/of/my/code
$ svn co http://hostname/new/directory .
$ svn add *
$ svn commit

Regards,
Blair


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Mark Knoop <ma...@rawcane.net>.
> 
> On Jan 31, 2008, at 16:34, Mark Knoop wrote:
>
>> If I import a large file into a repository by accident is it  possible to 
>> reverse the action so as not to permanently increase  the size of the 
>> repository?
>
> You would have to take the repository offline, "svnadmin dump" it to  a 
> text file, "svndumpfilter exclude" to exclude the part you don't  want to 
> keep, "svnadmin load" it into a new repository, bring the  server back up, 
> and then have everybody check out new working copies  (if they had working 
> copies of a revision greater than or equal to  the one you wanted to 
> filter)
>
> http://subversion.tigris.org/faq.html#removal
>

Ah. I read that but was hoping there was an easier way that I just hadn't 
been able to find. I'm just playing at the moment so is not a big deal I can 
just delete the repository and start again. Will be more careful what I 
import in future!

Thanks
Mark 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Is it possible to 'unimport'?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jan 31, 2008, at 16:34, Mark Knoop wrote:

> If I import a large file into a repository by accident is it  
> possible to reverse the action so as not to permanently increase  
> the size of the repository?

You would have to take the repository offline, "svnadmin dump" it to  
a text file, "svndumpfilter exclude" to exclude the part you don't  
want to keep, "svnadmin load" it into a new repository, bring the  
server back up, and then have everybody check out new working copies  
(if they had working copies of a revision greater than or equal to  
the one you wanted to filter)

http://subversion.tigris.org/faq.html#removal



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org