You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by Shalin Shekhar Mangar <sh...@gmail.com> on 2008/12/19 15:30:52 UTC

SVN magic for Renaming/Deprecating sources?

Hi,

I want to rename NamedListCodec to JavaBinCodec but also preserve the svn
history. I was wondering about the svn sorcery needed to do this and I don't
want to play with the repository.

Should I
"svn mv NamedListCodec JavaBinCodec" and then commit and then add a
deprecated NamedListCodec.java?
OR
"svn cp NamedListCodec JavaBinCodec", deprecate NamedListCodec and change
all references in the code to JavaBinCodec?

This is my first time doing such a thing so can a kind soul help me out? I
promise to update the CommitterInfo wiki with the help I get here.

-- 
Regards,
Shalin Shekhar Mangar.

Re: SVN magic for Renaming/Deprecating sources?

Posted by Chris Hostetter <ho...@fucit.org>.
: Ok, the only drawback is that I won't be able to use Idea to change existing
: code to use the new class automatically.

i think you can use idea to do all the refactoring including old.java->new.java, then 
manually...
  mv new.java tmp.java
  svn cp old.java new.java
  mv tmp.java new.java.
  svn commit.

worst case scenerio: do the svn cp first, then commit, then manually 
delete (so svn thinks it's missing) and then do all your refacotring (so 
idea recreates the file) and then commit.


-Hoss  (the guy that still does all his refactoring by hand in emacs)


Re: SVN magic for Renaming/Deprecating sources?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Sat, Dec 20, 2008 at 11:46 AM, Chris Hostetter
<ho...@fucit.org>wrote:

>
> you're only renaming one file right?  ... "svn cp" is a much better
> choice.  do the copy, then edit the "original" to include all of hte
> deprecation info.
>
> that way the history is preserved in *both* files, and hte "last" commit
> on the old file shows the creation of the new file.


Ok, the only drawback is that I won't be able to use Idea to change existing
code to use the new class automatically.

-- 
Regards,
Shalin Shekhar Mangar.

Re: SVN magic for Renaming/Deprecating sources?

Posted by Chris Hostetter <ho...@fucit.org>.
: So I guess the svn mv is the easiest option then. I'll go ahead and make the
: changes. Thanks!

you're only renaming one file right?  ... "svn cp" is a much better 
choice.  do the copy, then edit the "original" to include all of hte 
deprecation info.

that way the history is preserved in *both* files, and hte "last" commit 
on the old file shows the creation of the new file.


-Hoss


Re: SVN magic for Renaming/Deprecating sources?

Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
So I guess the svn mv is the easiest option then. I'll go ahead and make the
changes. Thanks!

On Fri, Dec 19, 2008 at 8:44 PM, Ryan McKinley <ry...@gmail.com> wrote:

> The last time i did a massive refactoring, i just used eclipse.  That
> generated svn mv commands.  After committing once, then i back-filled the
> missing now deprecated classes.
>
> If you have the patience for the svn cp method, it would have a nicer
> history -- but i think either way is fine.
>
> ryan
>
>
>
> On Dec 19, 2008, at 9:30 AM, Shalin Shekhar Mangar wrote:
>
>  Hi,
>>
>> I want to rename NamedListCodec to JavaBinCodec but also preserve the svn
>> history. I was wondering about the svn sorcery needed to do this and I
>> don't
>> want to play with the repository.
>>
>> Should I
>> "svn mv NamedListCodec JavaBinCodec" and then commit and then add a
>> deprecated NamedListCodec.java?
>> OR
>> "svn cp NamedListCodec JavaBinCodec", deprecate NamedListCodec and change
>> all references in the code to JavaBinCodec?
>>
>> This is my first time doing such a thing so can a kind soul help me out? I
>> promise to update the CommitterInfo wiki with the help I get here.
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>
>


-- 
Regards,
Shalin Shekhar Mangar.

Re: SVN magic for Renaming/Deprecating sources?

Posted by Ryan McKinley <ry...@gmail.com>.
The last time i did a massive refactoring, i just used eclipse.  That  
generated svn mv commands.  After committing once, then i back-filled  
the missing now deprecated classes.

If you have the patience for the svn cp method, it would have a nicer  
history -- but i think either way is fine.

ryan


On Dec 19, 2008, at 9:30 AM, Shalin Shekhar Mangar wrote:

> Hi,
>
> I want to rename NamedListCodec to JavaBinCodec but also preserve  
> the svn
> history. I was wondering about the svn sorcery needed to do this and  
> I don't
> want to play with the repository.
>
> Should I
> "svn mv NamedListCodec JavaBinCodec" and then commit and then add a
> deprecated NamedListCodec.java?
> OR
> "svn cp NamedListCodec JavaBinCodec", deprecate NamedListCodec and  
> change
> all references in the code to JavaBinCodec?
>
> This is my first time doing such a thing so can a kind soul help me  
> out? I
> promise to update the CommitterInfo wiki with the help I get here.
>
> -- 
> Regards,
> Shalin Shekhar Mangar.