Mercurial > hg
comparison tests/test-convert-hg-source.t @ 25697:1538e72209fd
convert: fix bug with converting the same commit twice
Convert had a bug where it relied on repo.tip() to be the newly committed
commit. This was not the case if the commit already existed in the repository
(since repo.commitctx() did nothing, the tip() referenced some random other
commit and the revmap got corrupted).
This fixes it by using the node returned by repo.commitctx().
author | Durham Goode <durham@fb.com> |
---|---|
date | Mon, 29 Jun 2015 13:39:05 -0700 |
parents | 884ef09cf658 |
children | 75be14993fda |
comparison
equal
deleted
inserted
replaced
25696:c1cac25ad1a6 | 25697:1538e72209fd |
---|---|
81 Different hash because no x bit | 81 Different hash because no x bit |
82 $ hg bookmarks | 82 $ hg bookmarks |
83 premerge1 3:973ef48a98a4 | 83 premerge1 3:973ef48a98a4 |
84 premerge2 8:3537b15eaaca | 84 premerge2 8:3537b15eaaca |
85 #endif | 85 #endif |
86 $ cd .. | 86 |
87 Test that redoing a convert results in an identical graph | |
88 $ cd ../ | |
89 $ rm new/.hg/shamap | |
90 $ hg convert --datesort orig new 2>&1 | grep -v 'subversion python bindings could not be loaded' | |
91 scanning source... | |
92 sorting... | |
93 converting... | |
94 8 add foo bar | |
95 7 change foo | |
96 6 make bar and baz copies of foo | |
97 5 merge local copy | |
98 4 merge remote copy | |
99 3 Added tag that for changeset 88586c4e9f02 | |
100 2 Removed tag that | |
101 1 Added tag this for changeset c56a7f387039 | |
102 0 mark baz executable | |
103 updating bookmarks | |
104 $ hg -R new log -G -T '{rev} {desc}' | |
105 o 8 mark baz executable | |
106 | | |
107 o 7 Added tag this for changeset c56a7f387039 | |
108 | | |
109 o 6 Removed tag that | |
110 | | |
111 o 5 Added tag that for changeset 88586c4e9f02 | |
112 | | |
113 o 4 merge remote copy | |
114 |\ | |
115 +---o 3 merge local copy | |
116 | |/ | |
117 | o 2 make bar and baz copies of foo | |
118 | | | |
119 o | 1 change foo | |
120 |/ | |
121 o 0 add foo bar | |
122 | |
87 | 123 |
88 check shamap LF and CRLF handling | 124 check shamap LF and CRLF handling |
89 | 125 |
90 $ cat > rewrite.py <<EOF | 126 $ cat > rewrite.py <<EOF |
91 > import sys | 127 > import sys |