Mercurial > hg
comparison mercurial/tags.py @ 42567:4eaf7197a740
cleanup: use named constants for second arg to .seek()
Differential Revision: https://phab.mercurial-scm.org/D6556
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 20 Jun 2019 14:33:42 -0400 |
parents | 6770df6e4365 |
children | 2372284d9457 |
comparison
equal
deleted
inserted
replaced
42566:f802a75da585 | 42567:4eaf7197a740 |
---|---|
11 # tags too. | 11 # tags too. |
12 | 12 |
13 from __future__ import absolute_import | 13 from __future__ import absolute_import |
14 | 14 |
15 import errno | 15 import errno |
16 import io | |
16 | 17 |
17 from .node import ( | 18 from .node import ( |
18 bin, | 19 bin, |
19 hex, | 20 hex, |
20 nullid, | 21 nullid, |
560 if name in branches: | 561 if name in branches: |
561 repo.ui.warn(_("warning: tag %s conflicts with existing" | 562 repo.ui.warn(_("warning: tag %s conflicts with existing" |
562 " branch name\n") % name) | 563 " branch name\n") % name) |
563 | 564 |
564 def writetags(fp, names, munge, prevtags): | 565 def writetags(fp, names, munge, prevtags): |
565 fp.seek(0, 2) | 566 fp.seek(0, io.SEEK_END) |
566 if prevtags and not prevtags.endswith('\n'): | 567 if prevtags and not prevtags.endswith('\n'): |
567 fp.write('\n') | 568 fp.write('\n') |
568 for name in names: | 569 for name in names: |
569 if munge: | 570 if munge: |
570 m = munge(name) | 571 m = munge(name) |