Patchwork [1,of,6,v3] convert: Use convert_revision for P4 imports

login
register
mail settings
Submitter David Soria Parra
Date Dec. 7, 2016, 9:51 p.m.
Message ID <1f9a627a126694d67f36.1481147511@devbig415.prn1.facebook.com>
Download mbox | patch
Permalink /patch/17872/
State Superseded
Headers show

Comments

David Soria Parra - Dec. 7, 2016, 9:51 p.m.
# HG changeset patch
# User David Soria Parra <davidsp@fb.com>
# Date 1480895549 28800
#      Sun Dec 04 15:52:29 2016 -0800
# Node ID 1f9a627a126694d67f3664dae387d8b98fa44ddb
# Parent  48bf03a8f718f870256f79cbdf10550ca92c7f25
convert: Use convert_revision for P4 imports

We are using convert_revisions in other importers. In order to unify this
we are also using convert_revision for Perforce in addition to the original
'p4'.
Sean Farley - Dec. 7, 2016, 10:08 p.m.
David Soria Parra <davidsp@fb.com> writes:

> # HG changeset patch
> # User David Soria Parra <davidsp@fb.com>
> # Date 1480895549 28800
> #      Sun Dec 04 15:52:29 2016 -0800
> # Node ID 1f9a627a126694d67f3664dae387d8b98fa44ddb
> # Parent  48bf03a8f718f870256f79cbdf10550ca92c7f25
> convert: Use convert_revision for P4 imports

Seems like you've got a bad shift key ;-)

Patch

diff --git a/hgext/convert/p4.py b/hgext/convert/p4.py
--- a/hgext/convert/p4.py
+++ b/hgext/convert/p4.py
@@ -151,7 +151,7 @@ 
             c = common.commit(author=self.recode(d["user"]),
                               date=util.datestr(date, '%Y-%m-%d %H:%M:%S %1%2'),
                               parents=parents, desc=desc, branch=None,
-                              extra={"p4": change})
+                              extra={"p4": change, "convert_revision": change})
 
             files = []
             copies = {}