Show More
@@ -14,7 +14,6 b' import copy' | |||||
14 | from mercurial import hg, util, cmdutil, scmutil, match as match_, \ |
|
14 | from mercurial import hg, util, cmdutil, scmutil, match as match_, \ | |
15 | archival, pathutil, revset |
|
15 | archival, pathutil, revset | |
16 | from mercurial.i18n import _ |
|
16 | from mercurial.i18n import _ | |
17 | from mercurial.node import hex |
|
|||
18 |
|
17 | |||
19 | import lfutil |
|
18 | import lfutil | |
20 | import lfcommands |
|
19 | import lfcommands | |
@@ -900,24 +899,8 b' def overridearchive(orig, repo, dest, no' | |||||
900 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) |
|
899 | archiver = archival.archivers[kind](dest, mtime or ctx.date()[0]) | |
901 |
|
900 | |||
902 | if repo.ui.configbool("ui", "archivemeta", True): |
|
901 | if repo.ui.configbool("ui", "archivemeta", True): | |
903 | def metadata(): |
|
902 | write('.hg_archival.txt', 0644, False, | |
904 | base = 'repo: %s\nnode: %s\nbranch: %s\n' % ( |
|
903 | lambda: archival.buildmetadata(ctx)) | |
905 | hex(repo.changelog.node(0)), hex(node), ctx.branch()) |
|
|||
906 |
|
||||
907 | tags = ''.join('tag: %s\n' % t for t in ctx.tags() |
|
|||
908 | if repo.tagtype(t) == 'global') |
|
|||
909 | if not tags: |
|
|||
910 | repo.ui.pushbuffer() |
|
|||
911 | opts = {'template': '{latesttag}\n{latesttagdistance}', |
|
|||
912 | 'style': '', 'patch': None, 'git': None} |
|
|||
913 | cmdutil.show_changeset(repo.ui, repo, opts).show(ctx) |
|
|||
914 | ltags, dist = repo.ui.popbuffer().split('\n') |
|
|||
915 | tags = ''.join('latesttag: %s\n' % t for t in ltags.split(':')) |
|
|||
916 | tags += 'latesttagdistance: %s\n' % dist |
|
|||
917 |
|
||||
918 | return base + tags |
|
|||
919 |
|
||||
920 | write('.hg_archival.txt', 0644, False, metadata) |
|
|||
921 |
|
904 | |||
922 | for f in ctx: |
|
905 | for f in ctx: | |
923 | ff = ctx.flags(f) |
|
906 | ff = ctx.flags(f) |
General Comments 0
You need to be logged in to leave comments.
Login now