##// END OF EJS Templates
rename: properly report removed and added file as modified (issue4458)...
Pierre-Yves David -
r23402:2963d5c9 stable
parent child Browse files
Show More
@@ -1337,8 +1337,10 b' class workingctx(committablectx):'
1337 else:
1337 else:
1338 wlock = self._repo.wlock()
1338 wlock = self._repo.wlock()
1339 try:
1339 try:
1340 if self._repo.dirstate[dest] in '?r':
1340 if self._repo.dirstate[dest] in '?':
1341 self._repo.dirstate.add(dest)
1341 self._repo.dirstate.add(dest)
1342 elif self._repo.dirstate[dest] in 'r':
1343 self._repo.dirstate.normallookup(dest)
1342 self._repo.dirstate.copy(source, dest)
1344 self._repo.dirstate.copy(source, dest)
1343 finally:
1345 finally:
1344 wlock.release()
1346 wlock.release()
@@ -76,8 +76,8 b' Test overlapping renames (issue2388)'
76 $ hg qrename patchb patchc
76 $ hg qrename patchb patchc
77 $ hg qrename patcha patchb
77 $ hg qrename patcha patchb
78 $ hg st --mq
78 $ hg st --mq
79 M patchb
79 M series
80 M series
80 A patchb
81 A patchc
81 A patchc
82 R patcha
82 R patcha
83 $ cd ..
83 $ cd ..
@@ -571,15 +571,24 b' overwriting with renames (issue1959)'
571 $ hg rename d1/a d1/c
571 $ hg rename d1/a d1/c
572 $ hg rename d1/b d1/a
572 $ hg rename d1/b d1/a
573 $ hg status -C
573 $ hg status -C
574 A d1/a
574 M d1/a
575 d1/b
575 d1/b
576 A d1/c
576 A d1/c
577 d1/a
577 d1/a
578 R d1/b
578 R d1/b
579 $ hg diff --git
579 $ hg diff --git
580 diff --git a/d1/b b/d1/a
580 diff --git a/d1/a b/d1/a
581 rename from d1/b
581 --- a/d1/a
582 rename to d1/a
582 +++ b/d1/a
583 @@ -1,1 +1,1 @@
584 -d1/a
585 +d1/b
586 diff --git a/d1/b b/d1/b
587 deleted file mode 100644
588 --- a/d1/b
589 +++ /dev/null
590 @@ -1,1 +0,0 @@
591 -d1/b
583 diff --git a/d1/a b/d1/c
592 diff --git a/d1/a b/d1/c
584 copy from d1/a
593 copy from d1/a
585 copy to d1/c
594 copy to d1/c
@@ -390,3 +390,49 b' warning message about such pattern.'
390 #endif
390 #endif
391
391
392 $ cd ..
392 $ cd ..
393
394 Status after move overwriting a file (issue4458)
395 =================================================
396
397
398 $ hg init issue4458
399 $ cd issue4458
400 $ echo a > a
401 $ echo b > b
402 $ hg commit -Am base
403 adding a
404 adding b
405
406
407 with --force
408
409 $ hg mv b --force a
410 $ hg st --copies
411 M a
412 b
413 R b
414 $ hg revert --all
415 reverting a
416 undeleting b
417 $ rm *.orig
418
419 without force
420
421 $ hg rm a
422 $ hg st --copies
423 R a
424 $ hg mv b a
425 $ hg st --copies
426 M a
427 b
428 R b
429
430 Other "bug" highlight, the revision status does not report the copy information.
431 This is buggy behavior.
432
433 $ hg commit -m 'blah'
434 $ hg st --copies --change .
435 M a
436 R b
437
438 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now