diff tests/test-up-local-change.t @ 30200:a2804ddcf9ae

update: enable copy tracing for backwards and non-linear updates As a followup to the issue4028 series, this fixes a variant of the issue that can occur when updating with uncommited local changes. The duplicated .hgsub warning is coming from wc.dirty(). We would previously skip this call because it's only relevant when we're going to perform copy tracing, which we didn't do before. The change to the update summary line is because we now treat the rename as a proper rename (which counts as a change), rather than an add+delete pair (which counts as a change and a delete).
author G?bor Stefanik <gabor.stefanik@nng.com>
date Thu, 25 Aug 2016 22:02:26 +0200
parents 35861cc1076e
children 69ffbbe73dd0
line wrap: on
line diff
--- a/tests/test-up-local-change.t	Mon Sep 26 10:47:37 2016 +0200
+++ b/tests/test-up-local-change.t	Thu Aug 25 22:02:26 2016 +0200
@@ -67,6 +67,10 @@
   summary:     2
   
   $ hg --debug up 0
+  starting 4 threads for background file closing (?)
+    searching for copies back to rev 0
+    unmatched files in local (from topological common ancestor):
+     b
   resolving manifests
    branchmerge: False, force: False, partial: False
    ancestor: 1e71731e6fbb, local: 1e71731e6fbb+, remote: c19d34741b0a
@@ -222,4 +226,20 @@
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg st
 
+test updating backwards through a rename
+
+  $ hg mv a b
+  $ hg ci -m b
+  $ echo b > b
+  $ hg up -q 0
+  $ hg st
+  M a
+  $ hg diff --nodates
+  diff -r cb9a9f314b8b a
+  --- a/a
+  +++ b/a
+  @@ -1,1 +1,1 @@
+  -a
+  +b
+
   $ cd ..