Loosing revision history after rename and compress/rebase
Becker, Mischa J
mischa.becker at fredmeyer.com
Tue Jan 7 23:53:20 UTC 2014
> -----Original Message-----
> From: Weichelt David J [mailto:WeicheltDavid at JohnDeere.com]
> Sent: Tuesday, January 07, 2014 1:10 PM
> Subject: RE: Loosing revision history after rename and compress/rebase
>
> Response below:
>
> -----Original Message-----
> From: Becker, Mischa J [mailto:mischa.becker at fredmeyer.com]
> Sent: Tuesday, January 07, 2014 2:50 PM
> Subject: RE: Loosing revision history after rename and compress/rebase
>
> > -----Original Message-----
> > From: Weichelt David J
> > Sent: Tuesday, January 07, 2014 9:09 AM
> > Subject: RE: Loosing revision history after rename and compress/rebase
> >
> > Response below.
> > -----Original Message-----
> > From: Matt Mackall [mailto:mpm at selenic.com]
> > Sent: Friday, January 03, 2014 6:13 PM
> > Subject: Re: Loosing revision history after rename and compress/rebase
> >
> > On Fri, 2014-01-03 at 22:53 +0000, Weichelt David J wrote:
> > > I'm looking for support on this problem we have seen. The scenario
> > was confirmed with other developers and it perhaps needs to be fixed
> > by the Mercurial community... we don't know how to work around this.
> > Not cool to loose revision history from code that we are moving around
> > and changing.
> > >
> > > Steps to reproduce:
> > > 1. Have a committed file with a revision history
> > > 2. Hg rename the file from one directory to a new one (with
> > > renaming the file in my testing)
> > > 3. Commit the changes
> > > 4. Compress the changes (also can see same problem with rebase)
> >
> > This is not a term in our jargon. Perhaps you mean rebase --collapse?
> > Or perhaps the THG project has taken to introducing their own jargon.
> > <David> THG has compress and rebase as two different options.
>
> THG has a Compress History right-click option if you've selected two
> changesets. Is that the one you mean?
>
> <David> Yes.
>
> > > 5. (optional) Strip the original changset that was compressed
> > > 6. Notice that the revision history is missing on the new changeset
> >
> > Are you saying that the renamed file does not have any evidence of
> > linkage to the original file? How are you determining this?
> >
> > <David> Yes, the renamed file doesn't have evidence of linkage to the
> > original file (and thus the history of the original file). It appears
> > that the renamed file is a new file with only 1 changeset.
>
> Assuming you are using Compress History, all it does is:
>
> % hg update --clean --rev [ancestor]
> % hg revert --all --rev [descendant]
>
> It then opens the commit screen and prepopulates the commit message with
> all messages from the revisions you are compressing. You can make any
> changes you want before hitting the commit button.
>
> I've been playing around with a test repo but the only way I can make
> the compressed changeset not know about the rename is if it was never
> marked as a rename in the first place. Can you recreate the problem?
>
> Mischa
>
> <David> Thanks for the help... I'm actually not sure about the
> commandline as we have been using TortoiseHg.
The bottom half of the Compress dialog box shows the Hg command line. After you click Compress but before you click Commit, you can scroll up and see the Hg commands highlighted in gray. And in the Workbench, you can click View - Show Output Log to see the actual Hg commands that TortoiseHg is doing.
> I just sent the question
> to that support mailing list as well. We did recreate the problem
> multiple times. One time we make some simple changes to just see if we
> could and thus I recorded the steps. Here are steps I sent to the THG
> group (slightly clarified from my previous steps:
>
> Steps to reproduce using TortoiseHg:
> 1. Pick a committed file with a significant revision history
> 2. Right click on file and under TortoiseHg, rename the file from one
> directory to a new one (with renaming the file also is what I tried in
> my testing)
> 3. Commit the changes
> 4. Compress the new changes onto a base revision to create a new
> changeset. Alternatively: also rebase the changeset on the base
> revision (with the same results)
> 5. Optional if used compress: Strip the original changeset that was
> compressed (that is no longer needed)
> 6. Notice that the old revision history is missing from the file (and
> there is only 1 changeset instead of the full revision history with
> multiple changesets)
Aside from renaming to another folder, that is exactly what I was doing. Even with that change I still can't recreate your problem. Unfortunately, I can only give a couple other suggestions of things to check. Hopefully someone on the other list can give more help.
+ Are you using the most recent version of TortoiseHg? (I did my testing on v2.10.1 for Windows 64bit.)
+ Do you have any hooks or extensions that might be affecting the commits? (In the workbench, click File - Settings.)
+ Check every step of the way to figure out when the rename is being forgotten. (After step 3, in the middle of step 4 after you compress but before you commit, after step 4, after step 5.) You can check this on the commit and revision detail screens, if you select the renamed file on the left, does TortoiseHg say 'renamed from' or 'was added'.
Mischa
________________________________
This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and may contain information that is confidential and protected by law from unauthorized disclosure. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140107/0b34a722/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Picture (Device Independent Bitmap) 1.jpg
Type: image/jpeg
Size: 631 bytes
Desc: Picture (Device Independent Bitmap) 1.jpg
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20140107/0b34a722/attachment-0002.jpg>
More information about the Mercurial
mailing list