##// END OF EJS Templates
mq: add qparent tag (first parent of qbase)
Brendan Cully -
r4219:6cb5be6b default
parent child Browse files
Show More
@@ -2085,14 +2085,15 b' def reposetup(ui, repo):'
2085 2085 if not q.applied:
2086 2086 return tagscache
2087 2087
2088 mqtags = [(patch.rev, patch.name) for patch in q.applied]
2088 mqtags = [(revlog.bin(patch.rev), patch.name) for patch in q.applied]
2089 2089 mqtags.append((mqtags[-1][0], 'qtip'))
2090 2090 mqtags.append((mqtags[0][0], 'qbase'))
2091 mqtags.append((self.changelog.parents(mqtags[0][0])[0], 'qparent'))
2091 2092 for patch in mqtags:
2092 2093 if patch[1] in tagscache:
2093 2094 self.ui.warn('Tag %s overrides mq patch of the same name\n' % patch[1])
2094 2095 else:
2095 tagscache[patch[1]] = revlog.bin(patch[0])
2096 tagscache[patch[1]] = patch[0]
2096 2097
2097 2098 return tagscache
2098 2099
@@ -262,6 +262,9 b' echo bar > foo'
262 262 hg qpush -a
263 263 hg st
264 264
265 echo % mq tags
266 hg log --template '{rev} {tags}\n' -r qparent:qtip
267
265 268 cat >>$HGRCPATH <<EOF
266 269 [diff]
267 270 git = True
@@ -265,6 +265,10 b' patch failed, rejects left in working di'
265 265 Errors during apply, please fix and refresh bar
266 266 ? foo
267 267 ? foo.rej
268 % mq tags
269 0 qparent
270 1 qbase foo
271 2 qtip bar tip
268 272 new file
269 273
270 274 diff --git a/new b/new
General Comments 0
You need to be logged in to leave comments. Login now