[issue3407] rebase --collapse is confused by copies

Patrick Mézard bugs at mercurial.selenic.com
Sun Apr 29 11:03:20 CDT 2012


New submission from Patrick Mézard <patrick at mezard.eu>:

$ cat >> $HGRCPATH <<EOF
  > [extensions]
  > graphlog=
  > rebase=
  > [alias]
  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
  > EOF

Modify 'a' in one branch

  $ hg init repo
  $ cd repo
  $ echo a > a
  $ hg ci -Am adda
  adding a
  $ echo a >> a
  $ hg ci -m changea

Move it to 'b' then to 'c' in another branch

  $ hg up 0
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
  $ hg mv a b
  $ hg ci -m movea
  created new head
  $ hg mv b c
  $ hg ci -m moveb
  $ hg tglog
  @  3: 'moveb'
  |
  o  2: 'movea'
  |
  | o  1: 'changea'
  |/
  o  0: 'adda'

Rebase the moves onto the modifying branch
  
  $ hg rebase --collapse -d 1
  merging a and b to b
   local changed b which remote deleted
  use (c)hanged version or (d)elete? c
  saved backup bundle to $TESTTMP/repo/.hg/strip-backup/ead0c916ddbf-backup.hg

We expect to see 'c' with modified 'a' content. Unfortunately:

  $ hg st --copies --change .
  A b
  A c
    a
  R a
  $ hg st

OK, 'b' and 'c' are both there, how do they look like?

  $ ls
  b
  c
  $ cat b
  a
  a
  $ cat c
  a

Confusing.

----------
messages: 19803
nosy: pmezard
priority: bug
status: unread
title: rebase --collapse is confused by copies
topic: rebase

____________________________________________________
Mercurial issue tracker <bugs at mercurial.selenic.com>
<http://mercurial.selenic.com/bts/issue3407>
____________________________________________________


More information about the Mercurial-devel mailing list