Mercurial > hg
comparison tests/test-subrepo.t @ 24858:a99931201d1b stable
subrepo: don't write .hgsubstate lines with empty subrepo state (issue4622)
The '' that is used to represent the state of a not-yet-committed
subrepo cannot be written to the file, because the code that parses
the file splits on ' ' and expects two parts.
Given that the .hgsubstate file is automatically rewritten on commit, it seems
a little strange that the file is written out during a merge.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Fri, 24 Apr 2015 23:23:55 -0400 |
parents | 1ff35d76421c |
children | 5135c2be6959 |
comparison
equal
deleted
inserted
replaced
24857:d8505bfe4825 | 24858:a99931201d1b |
---|---|
1023 no changes found | 1023 no changes found |
1024 comparing with issue1852c/sub/repo | 1024 comparing with issue1852c/sub/repo |
1025 searching for changes | 1025 searching for changes |
1026 no changes found | 1026 no changes found |
1027 [1] | 1027 [1] |
1028 | |
1029 Check that merge of a new subrepo doesn't write the uncommitted state to | |
1030 .hgsubstate (issue4622) | |
1031 | |
1032 $ hg init issue1852a/addedsub | |
1033 $ echo zzz > issue1852a/addedsub/zz.txt | |
1034 $ hg -R issue1852a/addedsub ci -Aqm "initial ZZ" | |
1035 | |
1036 $ hg clone issue1852a/addedsub issue1852d/addedsub | |
1037 updating to branch default | |
1038 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1039 | |
1040 $ echo def > issue1852a/sub/repo/foo | |
1041 $ hg -R issue1852a ci -SAm 'tweaked subrepo' | |
1042 adding tmp/sub/repo/foo_p | |
1043 committing subrepository sub/repo (glob) | |
1044 | |
1045 $ echo 'addedsub = addedsub' >> issue1852d/.hgsub | |
1046 $ echo xyz > issue1852d/sub/repo/foo | |
1047 $ hg -R issue1852d pull -u | |
1048 pulling from $TESTTMP/issue1852a (glob) | |
1049 searching for changes | |
1050 adding changesets | |
1051 adding manifests | |
1052 adding file changes | |
1053 added 1 changesets with 2 changes to 2 files | |
1054 subrepository sub/repo diverged (local revision: f42d5c7504a8, remote revision: 46cd4aac504c) | |
1055 (M)erge, keep (l)ocal or keep (r)emote? m | |
1056 pulling subrepo sub/repo from $TESTTMP/issue1852a/sub/repo (glob) | |
1057 searching for changes | |
1058 adding changesets | |
1059 adding manifests | |
1060 adding file changes | |
1061 added 1 changesets with 1 changes to 1 files | |
1062 subrepository sources for sub/repo differ (glob) | |
1063 use (l)ocal source (f42d5c7504a8) or (r)emote source (46cd4aac504c)? l | |
1064 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
1065 $ cat issue1852d/.hgsubstate | |
1066 f42d5c7504a811dda50f5cf3e5e16c3330b87172 sub/repo | |
1028 | 1067 |
1029 Check status of files when none of them belong to the first | 1068 Check status of files when none of them belong to the first |
1030 subrepository: | 1069 subrepository: |
1031 | 1070 |
1032 $ hg init subrepo-status | 1071 $ hg init subrepo-status |