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