Mercurial > hg
comparison tests/test-rename.t @ 23401:fd1bab28a8cc stable
manifest: fix a bug where working copy file 'add' mark was buggy
Because the same dictionary was used to (1) get node from parent and (2) store
annotated version, we could end up with buggy values. For example with a chain
of renames:
$ hg mv b c
$ hg mv a b
The value from 'b' would be updated as "<old-a>a", then the value of c would be
updated as "<old-b>a'. With the current dictionary sharing this ends up with:
'<new-c>' == '<old-a>aa'
This value is double-wrong as we should use '<old-b>' and a single 'a'.
We now use a read-only value for lookup. The 'test-rename.t' test is impacted
because such a chained added file is suddenly detected as such.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 26 Nov 2014 14:54:16 -0800 |
parents | ef60083b5536 |
children | 2963d5c9d90b |
comparison
equal
deleted
inserted
replaced
23400:3bd577a3283e | 23401:fd1bab28a8cc |
---|---|
582 rename to d1/a | 582 rename to d1/a |
583 diff --git a/d1/a b/d1/c | 583 diff --git a/d1/a b/d1/c |
584 copy from d1/a | 584 copy from d1/a |
585 copy to d1/c | 585 copy to d1/c |
586 $ hg update -C | 586 $ hg update -C |
587 2 files updated, 0 files merged, 1 files removed, 0 files unresolved | 587 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
588 $ rm d1/c # The file was marked as added, so 'hg update' action was 'forget' | |
588 | 589 |
589 check illegal path components | 590 check illegal path components |
590 | 591 |
591 $ hg rename d1/d11/a1 .hg/foo | 592 $ hg rename d1/d11/a1 .hg/foo |
592 abort: path contains illegal component: .hg/foo (glob) | 593 abort: path contains illegal component: .hg/foo (glob) |