##// END OF EJS Templates
tag: record tag we're superseding, if any (issue 1102)
Matt Mackall -
r6671:938eddd7 default
parent child Browse files
Show More
@@ -0,0 +1,16 b''
1 #!/bin/sh
2
3 rm -rf a
4 hg init a
5 cd a
6 echo a > a
7 hg ci -Am0
8 hg tag t1 # 1
9 hg tag --remove t1 # 2
10
11 hg co 1
12 hg tag -r0 t1
13 hg tags
14
15
16
@@ -0,0 +1,4 b''
1 adding a
2 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3 tip 3:a49829c4fc11
4 t1 0:f7b1eb17ad24
@@ -147,7 +147,11 b' class localrepository(repo.repository):'
147 if prevtags and prevtags[-1] != '\n':
147 if prevtags and prevtags[-1] != '\n':
148 fp.write('\n')
148 fp.write('\n')
149 for name in names:
149 for name in names:
150 fp.write('%s %s\n' % (hex(node), munge and munge(name) or name))
150 m = munge and munge(name) or name
151 if self._tagstypecache and name in self._tagstypecache:
152 old = self.tagscache.get(name, nullid)
153 fp.write('%s %s\n' % (hex(old), m))
154 fp.write('%s %s\n' % (hex(node), m))
151 fp.close()
155 fp.close()
152
156
153 prevtags = ''
157 prevtags = ''
@@ -303,9 +307,8 b' class localrepository(repo.repository):'
303 n = nh[0]
307 n = nh[0]
304 if n != nullid:
308 if n != nullid:
305 self.tagscache[k] = n
309 self.tagscache[k] = n
306 self._tagstypecache[k] = tagtypes[k]
310 self._tagstypecache[k] = tagtypes[k]
307 self.tagscache['tip'] = self.changelog.tip()
311 self.tagscache['tip'] = self.changelog.tip()
308
309 return self.tagscache
312 return self.tagscache
310
313
311 def tagtype(self, tagname):
314 def tagtype(self, tagname):
@@ -36,7 +36,9 b' 868cc8fbb43b754ad09fa109885d243fc49adae7'
36 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk
36 868cc8fbb43b754ad09fa109885d243fc49adae7 gawk
37 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
37 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
38 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
38 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
39 3807bcf62c5614cb6c16436b514d7764ca5f1631 gack
39 0000000000000000000000000000000000000000 gack
40 0000000000000000000000000000000000000000 gack
41 868cc8fbb43b754ad09fa109885d243fc49adae7 gorp
40 0000000000000000000000000000000000000000 gorp
42 0000000000000000000000000000000000000000 gorp
41 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
43 3ecf002a1c572a2f3bb4e665417e60fca65bbd42 bleah1
42 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
44 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -45,16 +45,16 b' 1 files updated, 0 files merged, 0 files'
45 created new head
45 created new head
46 tip 4:36195b728445
46 tip 4:36195b728445
47 bar 1:b204a97e6e8d
47 bar 1:b204a97e6e8d
48 changeset: 5:57e1983b4a60
48 changeset: 5:1f98c77278de
49 tag: tip
49 tag: tip
50 user: test
50 user: test
51 date: Mon Jan 12 13:46:40 1970 +0000
51 date: Mon Jan 12 13:46:40 1970 +0000
52 summary: Removed tag bar
52 summary: Removed tag bar
53
53
54 tip 5:57e1983b4a60
54 tip 5:1f98c77278de
55 % remove nonexistent tag
55 % remove nonexistent tag
56 abort: tag 'foobar' does not exist
56 abort: tag 'foobar' does not exist
57 changeset: 5:57e1983b4a60
57 changeset: 5:1f98c77278de
58 tag: tip
58 tag: tip
59 user: test
59 user: test
60 date: Mon Jan 12 13:46:40 1970 +0000
60 date: Mon Jan 12 13:46:40 1970 +0000
General Comments 0
You need to be logged in to leave comments. Login now