@@ -73,6 +73,7 @@ def setUp(self):
73
73
commit 1 -> fork after -> remote 2
74
74
tag1
75
75
commit 2
76
+ annotated tag2
76
77
*remote2 (clone remote 1)
77
78
commit 1
78
79
commit 3
@@ -94,6 +95,8 @@ def setUp(self):
94
95
subprocess .check_call (['git' , 'tag' , 'tag1' ], cwd = self .remote1 )
95
96
self .commit_2_sha = git_write_commit (
96
97
self .remote1 , 'tracked' , "last" , msg = "last commit" )
98
+ subprocess .check_call (['git' , 'tag' , '-am' , 'foo' , 'tag2' ],
99
+ cwd = self .remote1 )
97
100
self .commit_3_sha = git_write_commit (
98
101
self .remote2 , 'tracked2' , "remote2" , msg = "new commit" )
99
102
subprocess .check_call (['git' , 'checkout' , '-b' , 'b2' ],
@@ -121,6 +124,24 @@ def test_minimal(self):
121
124
last_rev = git_get_last_rev (self .cwd )
122
125
self .assertEqual (last_rev , self .commit_1_sha )
123
126
127
+ def test_annotated_tag (self ):
128
+ remotes = [{
129
+ 'name' : 'r1' ,
130
+ 'url' : self .url_remote1
131
+ }]
132
+ merges = [{
133
+ 'remote' : 'r1' ,
134
+ 'ref' : 'tag2'
135
+ }]
136
+ target = {
137
+ 'remote' : 'r1' ,
138
+ 'branch' : 'agg1'
139
+ }
140
+ repo = Repo (self .cwd , remotes , merges , target )
141
+ repo .aggregate ()
142
+ last_rev = git_get_last_rev (self .cwd )
143
+ self .assertEqual (last_rev , self .commit_2_sha )
144
+
124
145
def test_simple_merge (self ):
125
146
remotes = [{
126
147
'name' : 'r1' ,
0 commit comments