comparison tests/test-git-workflow.t @ 844:fffe8883960b

git_handler: mark source for rename info as Git or Mercurial See inline comments for why the additional metadata needs to be stored. This literally breaks all the hashes because of the additional metadata. The changing of hashes is unfortunate but necessary to preserve bidirectionality. While this could be broken up into multiple commits, there was no way to do that while preserving bidirectionality. Following the principle that every intermediate commit must result in a correct state, I decided to combine the commits.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 02 Dec 2014 14:17:09 -0800
parents f16eaf601496
children 93689e8f27ac
comparison
equal deleted inserted replaced
843:da804eac2b00 844:fffe8883960b
45 45
46 get things back to hg 46 get things back to hg
47 $ hg gimport 47 $ hg gimport
48 importing git objects into hg 48 importing git objects into hg
49 $ hg log --graph --debug | grep -v ': *master' | grep -v phase: 49 $ hg log --graph --debug | grep -v ': *master' | grep -v phase:
50 o changeset: 1:7108ae7bd184226a29b8203619a8253d314643bf 50 o changeset: 1:9f124f3c1fc29a14f5eb027c24811b0ac9d5ff10
51 | tag: tip 51 | tag: tip
52 | parent: 0:0221c246a56712c6aa64e5ee382244d8a471b1e2 52 | parent: 0:0221c246a56712c6aa64e5ee382244d8a471b1e2
53 | parent: -1:0000000000000000000000000000000000000000 53 | parent: -1:0000000000000000000000000000000000000000
54 | manifest: 1:f0bd6fbafbaebe4bb59c35108428f6fce152431d 54 | manifest: 1:f0bd6fbafbaebe4bb59c35108428f6fce152431d
55 | user: test <test@example.org> 55 | user: test <test@example.org>
56 | date: Mon Jan 01 00:00:11 2007 +0000 56 | date: Mon Jan 01 00:00:11 2007 +0000
57 | files+: beta 57 | files+: beta
58 | extra: branch=default 58 | extra: branch=default
59 | extra: hg-git-rename-source=git
59 | description: 60 | description:
60 | add beta 61 | add beta
61 | 62 |
62 | 63 |
63 o changeset: 0:0221c246a56712c6aa64e5ee382244d8a471b1e2 64 o changeset: 0:0221c246a56712c6aa64e5ee382244d8a471b1e2
72 add alpha 73 add alpha
73 74
74 75
75 gimport should have updated the bookmarks as well 76 gimport should have updated the bookmarks as well
76 $ hg bookmarks 77 $ hg bookmarks
77 master 1:7108ae7bd184 78 master 1:9f124f3c1fc2
78 79
79 gimport support for git.mindate 80 gimport support for git.mindate
80 $ cat >> .hg/hgrc << EOF 81 $ cat >> .hg/hgrc << EOF
81 > [git] 82 > [git]
82 > mindate = 2014-01-02 00:00:00 +0000 83 > mindate = 2014-01-02 00:00:00 +0000
87 > GIT_COMMITTER_DATE="2009-01-01 00:00:00 +0000" \ 88 > GIT_COMMITTER_DATE="2009-01-01 00:00:00 +0000" \
88 > git commit -m oldcommit > /dev/null || echo "git commit error" 89 > git commit -m oldcommit > /dev/null || echo "git commit error"
89 $ hg gimport 90 $ hg gimport
90 no changes found 91 no changes found
91 $ hg log --graph 92 $ hg log --graph
92 o changeset: 1:7108ae7bd184 93 o changeset: 1:9f124f3c1fc2
93 | bookmark: master 94 | bookmark: master
94 | tag: tip 95 | tag: tip
95 | user: test <test@example.org> 96 | user: test <test@example.org>
96 | date: Mon Jan 01 00:00:11 2007 +0000 97 | date: Mon Jan 01 00:00:11 2007 +0000
97 | summary: add beta 98 | summary: add beta
108 > GIT_COMMITTER_DATE="2014-01-02 00:00:00 +0000" \ 109 > GIT_COMMITTER_DATE="2014-01-02 00:00:00 +0000" \
109 > git commit -m newcommit > /dev/null || echo "git commit error" 110 > git commit -m newcommit > /dev/null || echo "git commit error"
110 $ hg gimport 111 $ hg gimport
111 importing git objects into hg 112 importing git objects into hg
112 $ hg log --graph 113 $ hg log --graph
113 o changeset: 3:865f98279824 114 o changeset: 3:3d10b7289d79
114 | bookmark: master 115 | bookmark: master
115 | tag: tip 116 | tag: tip
116 | user: test <test@example.org> 117 | user: test <test@example.org>
117 | date: Wed Jan 01 00:00:00 2014 +0000 118 | date: Wed Jan 01 00:00:00 2014 +0000
118 | summary: newcommit 119 | summary: newcommit
119 | 120 |
120 o changeset: 2:b6cde64c110c 121 o changeset: 2:befdecd14df5
121 | user: test <test@example.org> 122 | user: test <test@example.org>
122 | date: Sat Mar 01 00:00:00 2014 +0000 123 | date: Sat Mar 01 00:00:00 2014 +0000
123 | summary: oldcommit 124 | summary: oldcommit
124 | 125 |
125 o changeset: 1:7108ae7bd184 126 o changeset: 1:9f124f3c1fc2
126 | user: test <test@example.org> 127 | user: test <test@example.org>
127 | date: Mon Jan 01 00:00:11 2007 +0000 128 | date: Mon Jan 01 00:00:11 2007 +0000
128 | summary: add beta 129 | summary: add beta
129 | 130 |
130 o changeset: 0:0221c246a567 131 o changeset: 0:0221c246a567