Mercurial > hg
comparison hgext/rebase.py @ 6964:b3239badc711
i18n: mark strings for translation in rebase extension
author | Martin Geisler <mg@daimi.au.dk> |
---|---|
date | Sun, 31 Aug 2008 16:12:03 +0200 |
parents | ebf1462f2145 |
children | 9df67ee30ef5 |
comparison
equal
deleted
inserted
replaced
6963:71da881b259e | 6964:b3239badc711 |
---|---|
168 # Update the state | 168 # Update the state |
169 if newrev is not None: | 169 if newrev is not None: |
170 state[rev] = repo[newrev].rev() | 170 state[rev] = repo[newrev].rev() |
171 else: | 171 else: |
172 if not collapse: | 172 if not collapse: |
173 repo.ui.note('no changes, revision %d skipped\n' % rev) | 173 repo.ui.note(_('no changes, revision %d skipped\n') % rev) |
174 repo.ui.debug('next revision set to %s\n' % p1) | 174 repo.ui.debug(_('next revision set to %s\n') % p1) |
175 skipped[rev] = True | 175 skipped[rev] = True |
176 state[rev] = p1 | 176 state[rev] = p1 |
177 | 177 |
178 def defineparents(repo, rev, target, state, targetancestors): | 178 def defineparents(repo, rev, target, state, targetancestors): |
179 'Return the new parent relationship of the revision that will be rebased' | 179 'Return the new parent relationship of the revision that will be rebased' |
207 def updatemq(repo, state, skipped, **opts): | 207 def updatemq(repo, state, skipped, **opts): |
208 'Update rebased mq patches - finalize and then import them' | 208 'Update rebased mq patches - finalize and then import them' |
209 mqrebase = {} | 209 mqrebase = {} |
210 for p in repo.mq.applied: | 210 for p in repo.mq.applied: |
211 if repo[p.rev].rev() in state: | 211 if repo[p.rev].rev() in state: |
212 repo.ui.debug('revision %d is an mq patch (%s), finalize it.\n' % | 212 repo.ui.debug(_('revision %d is an mq patch (%s), finalize it.\n') % |
213 (repo[p.rev].rev(), p.name)) | 213 (repo[p.rev].rev(), p.name)) |
214 mqrebase[repo[p.rev].rev()] = p.name | 214 mqrebase[repo[p.rev].rev()] = p.name |
215 | 215 |
216 if mqrebase: | 216 if mqrebase: |
217 repo.mq.finish(repo, mqrebase.keys()) | 217 repo.mq.finish(repo, mqrebase.keys()) |
220 mq = mqrebase.keys() | 220 mq = mqrebase.keys() |
221 mq.sort() | 221 mq.sort() |
222 mq.reverse() | 222 mq.reverse() |
223 for rev in mq: | 223 for rev in mq: |
224 if rev not in skipped: | 224 if rev not in skipped: |
225 repo.ui.debug('import mq patch %d (%s)\n' % (state[rev], | 225 repo.ui.debug(_('import mq patch %d (%s)\n') |
226 mqrebase[rev])) | 226 % (state[rev], mqrebase[rev])) |
227 repo.mq.qimport(repo, (), patchname=mqrebase[rev], | 227 repo.mq.qimport(repo, (), patchname=mqrebase[rev], |
228 git=opts.get('git', False),rev=[str(state[rev])]) | 228 git=opts.get('git', False),rev=[str(state[rev])]) |
229 repo.mq.save_dirty() | 229 repo.mq.save_dirty() |
230 | 230 |
231 def storestatus(repo, originalwd, target, state, collapse, external): | 231 def storestatus(repo, originalwd, target, state, collapse, external): |