mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
Use "# Date" instead of "# Timestamp" for dated export/import of patches.
And don't break up list for % formatting.
This commit is contained in:
parent
2a19fd683a
commit
be2a7bb68c
@ -120,8 +120,8 @@ class queue:
|
||||
# parse values when importing the result of an hg export
|
||||
if line.startswith("# User "):
|
||||
user = line[7:]
|
||||
elif line.startswith("# Timestamp "):
|
||||
date = line[12:]
|
||||
elif line.startswith("# Date "):
|
||||
date = line[7:]
|
||||
elif not line.startswith("# ") and line:
|
||||
message.append(line)
|
||||
format = None
|
||||
|
@ -1392,7 +1392,7 @@ def doexport(ui, repo, changeset, seqno, total, revwidth, opts):
|
||||
|
||||
fp.write("# HG changeset patch\n")
|
||||
fp.write("# User %s\n" % change[1])
|
||||
fp.write("# Timestamp %d %d\n" % (change[2][0], change[2][1]))
|
||||
fp.write("# Date %d %d\n" % change[2])
|
||||
fp.write("# Node ID %s\n" % hex(node))
|
||||
fp.write("# Parent %s\n" % hex(prev))
|
||||
if len(parents) > 1:
|
||||
@ -1705,8 +1705,8 @@ def import_(ui, repo, patch1, *patches, **opts):
|
||||
if line.startswith("# User "):
|
||||
user = line[7:]
|
||||
ui.debug(_('User: %s\n') % user)
|
||||
elif line.startswith("# Timestamp "):
|
||||
date = line[12:]
|
||||
elif line.startswith("# Date "):
|
||||
date = line[7:]
|
||||
elif not line.startswith("# ") and line:
|
||||
message.append(line)
|
||||
hgpatch = False
|
||||
|
Loading…
Reference in New Issue
Block a user