Issue1423

Title rebase loses rename data
Priority bug Status resolved
Superseder Nosy List astratto, djc, jcoomes, mpm, sid0, tonfa, trev
Assigned To astratto Topics rebase

Created on 2008-12-08.08:32:23 by djc, last changed 2009-04-04.11:15:35 by astratto.

Files
File name Uploaded Type Edit Remove
rebase_issue1423_renames.patch astratto, 2009-03-30.16:48:03 text/x-diff
Messages
msg8986 (view) Author: astratto Date: 2009-04-04.11:15:34
Fixed in b969611064ae
msg8967 (view) Author: astratto Date: 2009-04-02.10:30:08
Patch sent in ml.
http://article.gmane.org/gmane.comp.version-control.mercurial.devel/21324
msg8932 (view) Author: astratto Date: 2009-03-30.16:48:03
I've had some time to take a deeper look at this.
It seems that rebase loses rename data, damn!
I've simplified the test and wrote the expected output, I hope to solve this as
well.

I'm changing title and topics since this issue doesn't involve mq.
msg8450 (view) Author: trev Date: 2009-01-20.23:49:00
Unfortunately, I only noticed that issue after restructuring the repository -
now finding history of the files is rather complicated, |log -f -C| won't work.
Just confirmed that this happened because of rebase.
msg8239 (view) Author: djc Date: 2008-12-16.09:11:09
BTW, I don't think this is dependent on mq usage, I've heard some more reports.
msg8112 (view) Author: astratto Date: 2008-12-08.14:53:14
I wrote a test for this issue, that's the only thing I can do at the moment.
I'll investigate further as soon as possible.

Feel free to correct/simplify that test.
msg8110 (view) Author: sid0 Date: 2008-12-08.14:14:44
I'd initially reported the bug in mozilla's #hg channel -- thanks djc for filing it.

FWIW this is on Windows, with msys, and by losing rename data I mean that hg
qdiff shows that file1's been deleted and file2's been added.

A workaround is to |hg mv file2 file1; hg qref; hg mv file1 file2; hg qref| but
this can get annoying fast.
msg8105 (view) Author: djc Date: 2008-12-08.08:32:21
With this hgrc:

[defaults]
diff = -U 8 -p
qdiff = -U 8 -p
qimport = --git
qrefresh = --git

[diff]
git = 1

[extensions]
hgext.mq =
hgext.extdiff =
hgext.rebase =

[extdiff]
cmd.diffw = diff
opts.diffw = -w -r -N -p -U 8

This is the transcript:

  610  hg init testrepo1
  611  cd testrepo1/
  612  vim file1
...
  616  hg add
  617  hg commit -m "Add file1"
  618  cd ..
  619  hg clone testrepo1/ repo2
  620  cd repo2/
  621  ls
  622  hg qinit
  623  hg qnew move-file1
  624  vim file1
  625  ls
  626  hg qapp
  627  hg mv file1 file2
  628  hg qdiff
(this shows the rename)
  629  hg qref
  630  hg log
  631  cd ../testrepo1/
  632  vim file4
  633  hg add
  634  hg commit -m "adding file4"
  635  hg log
  636  cd ../repo2/
  637  hg pull --rebase
  638  hg qdiff
(this doesn't)

I don't have time to look into this right now, so here's an issue.
History
Date User Action Args
2009-04-04 11:15:35astrattosetstatus: in-progress -> resolved
nosy: mpm, tonfa, djc, jcoomes, astratto, sid0, trev
messages: + msg8986
2009-04-02 10:30:08astrattosetnosy: mpm, tonfa, djc, jcoomes, astratto, sid0, trev
messages: + msg8967
2009-04-01 21:55:16astrattosetstatus: chatting -> in-progress
nosy: mpm, tonfa, djc, jcoomes, astratto, sid0, trev
2009-03-30 23:25:43jcoomessetnosy: + jcoomes
2009-03-30 16:48:10astrattosetfiles: + rebase_issue1423_renames.patch
title: rebase + mq loses rename data? -> rebase loses rename data
nosy: mpm, tonfa, djc, astratto, sid0, trev
messages: + msg8932
topic: - mq
assignedto: astratto
2009-03-30 16:47:20astrattosetfiles: - test-rebase-rename.err
nosy: mpm, tonfa, djc, astratto, sid0, trev
2009-03-30 16:47:04astrattosetfiles: - test-rebase-rename
nosy: mpm, tonfa, djc, astratto, sid0, trev
2009-01-20 23:49:12trevsetnosy: + trev
messages: + msg8450
2008-12-16 09:11:10djcsetnosy: + mpm
messages: + msg8239
2008-12-08 14:53:50astrattosetfiles: + test-rebase-rename.err
nosy: tonfa, djc, astratto, sid0
2008-12-08 14:53:16astrattosetstatus: unread -> chatting
nosy: tonfa, djc, astratto, sid0
messages: + msg8112
files: + test-rebase-rename
2008-12-08 14:17:09sid0setstatus: chatting -> unread
nosy: tonfa, djc, astratto, sid0
2008-12-08 14:14:45sid0setstatus: unread -> chatting
nosy: + sid0
messages: + msg8110
2008-12-08 08:32:23djccreate