##// END OF EJS Templates
patch: support diff data loss detection and upgrade...
patch: support diff data loss detection and upgrade In worst case, generating diff in upgrade mode can be two times more expensive than generating it in git mode directly: we may have to regenerate the whole diff again whenever a git feature is detected. Also, the first diff attempt is completely buffered instead of being streamed. That said, even without having profiled it yet, I am convinced we can fast-path the upgrade mode if necessary were it to be used in regular diff commands, and not only in mq where avoiding data loss is worth the price.

File last commit:

r5764:8a5d8fb5 default
r10189:e451e599 default
Show More
test-issue660.out
49 lines | 1.0 KiB | text/plain | TextLexer
/ tests / test-issue660.out
Maxim Dounin
Fix file-changed-to-dir and dir-to-file commits (issue660)....
r5487 adding a
adding b/b
% file replaced with directory
% should fail - would corrupt dirstate
abort: file 'a' in dirstate clashes with 'a/a'
% removing shadow
% should succeed - shadow removed
% directory replaced with file
% should fail - would corrupt dirstate
abort: directory 'b' already in dirstate
% removing shadow
% should succeed - shadow removed
% look what we got
A a/a
A b
R a
R b/b
% revert reintroducing shadow - should fail
abort: file 'b' in dirstate clashes with 'b/b'
% revert all - should succeed
undeleting a
forgetting a/a
forgetting b
undeleting b/b
% addremove
removing a
adding a/a
adding b
removing b/b
A a/a
A b
R a
R b/b
% commit
Matt Mackall
Backed out changeset c2a21fe60994...
r5764 C a/a
C b
Maxim Dounin
Fix file-changed-to-dir and dir-to-file commits (issue660)....
r5487 % long directory replaced with file
adding d/d/d
% should fail - would corrupt dirstate
abort: directory 'd' already in dirstate
% removing shadow
% should succeed - shadow removed
Maxim Dounin
Fix dir-changed-to-file updates on clean workdir....
r5516 % update should work at least with clean workdir
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Mackall
Backed out changeset c2a21fe60994...
r5764 C a
C b/b
Maxim Dounin
Fix dir-changed-to-file updates on clean workdir....
r5516 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
Matt Mackall
Backed out changeset c2a21fe60994...
r5764 C a/a
C b