<br><br><div><span class="gmail_quote">On 11/4/06, <b class="gmail_sendername">Marius Kruger</b> <<a href="mailto:amanic@gmail.com">amanic@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<span class="q">On 11/3/06, <b class="gmail_sendername">Hanns-Steffen Eichenberg</b> <<a href="mailto:scameronde@googlemail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">scameronde@googlemail.com
</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
>From our 100 developers about 40 are programming Java using Eclipse. No, no. I am not calling for an Eclipse Plugin :-) We know how to operate on the command line. But it is very common work to refactor code from within Eclipse. This includes moving and renaming of files. What we need is a way to tell bzr, that a file under version control HAS BEEN MOVED. It is no option to move the file using bzr, since this would interrupt the workflow in Eclipse and would make unnecessary synchronizations necessary. The dvcs Mercury uses the option '--after' to tell the vcs to update the repository to reflect the actual situation in the working tree.
<br><br>I really would like to see an option like '--after' for the mv command. It shouldn't be too complicated (in fact i hacked bzr 0.13.0dev0 to accept the --after option for the mv command and just update the repository, not the working tree. I do not know if i have done it correct, but it works for me). It works like:
<br><br> $ bzr mv text1.txt text2.txt --after<br><br>telling bzr that someone has moved test1.txt to text2.txt.<br><br>Has this feature been discussed before? Is the idea good or am i missing something that makes it just plain silly?
<br><br></blockquote></div><br><br></span>hi,<br>Being a eclipse user I know your pain!<br>It is probably the most anoying bzr problem for me at the moment.<br>We have discussed it before on the mailing list, and the is a bug noted in launchpad (sort of):
<br><a href="https://launchpad.net/bugs/5158" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">https://launchpad.net/bugs/5158</a><br><br>But yes it will make me soooo happy if someone will just fix this, even if it is with a flag for now,
<br>we could always continue to debate if it should be automatic in future.
</blockquote><div><br>My current patch (draft version, not made public yet) uses a flag or the following logic:<br><br> - source present and versioned, target not present and not versioned: mv file and change repo (regular mv)
<br> - source not present and versioned, target present and not versioned: only change repo (new mv)<br> - source present and versioned, target present and not versioned: you have to use the flag or it is an error<br> (for situations like:
<br> mv a b; touch a; bzr mv a b ==> ERROR<br> mv a b; touch a; bzr mv a b --after ==> OK<br> )<br>
</div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">also see the following email posted on the mailing list.<br>regards <br>marius<br>
<br>
<br>
---------- Forwarded message ----------<br>
<span class="gmail_quote">From: <b class="gmail_sendername">Michael Ellerman</b> <<a href="mailto:michael@ellerman.id.au" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">michael@ellerman.id.au</a>
><br>Date: Jul 20, 2006 2:23 AM<br>Subject: [Bug 5158] Re: rfc: don't treat missing files as deleted
<br>To: <a href="mailto:amanic@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">amanic@gmail.com</a><br><br></span>It should be an easy patch to change bzr mv to cope with the source and<br>
destination already being moved. It just probably requires a little<br>
thought as to whether it should spit out a warning, or require a special<br>
flag etc. It'd be a good first patch for some keen bzr newbie.</blockquote><div><br>Hey, that is me ;-)<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I've got the beginings of an auto-rename plugin at:<br>
<br>
<a href="http://michael.ellerman.id.au/bzr/plugins/auto-rename" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://michael.ellerman.id.au/bzr/plugins/auto-rename</a><br><br>It tries to match files based on their SHA1, and if that fails does a
<br>fuzzy match based on the number of lines changed between the two
<br>versions. It needs a bit of polish, but it's 50% there.</blockquote><div><br>I thought about something like this, too. Good that there seems to be a<br>starting point. I will have a look at the code as soon as i have some time.
<br>Maybe it is something that i can do.<br><br>I think when using the fuzzy match the user must be the one who finally decides<br>if a match is correct or not. Maybe the auto-rename could open an editor with<br>its suggestions. That would allow for easy control and confirmation of mass
<br>renames.<br><br>Ciao,<br> Steffen<br><br></div></div>