New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send Mercurial patches to the transplant client for landing #13
Send Mercurial patches to the transplant client for landing #13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few quick comments before you rebase on top of zalun's patch. I will do a full review later.
HG_EXPORT_PATCH_TEMPLATE = """# HG changeset patch | ||
# User {author} | ||
# Date {patchdate} | ||
{commitdesc} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is much more that will have to go into getting commit description. It needs the following format:
Bug #: {Revision Title} r={reviewers}
{Revision Summary}
{Phabricator Revision URL ?}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the doc for details.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is covered by a number of other story cards.
""" | ||
|
||
HG_EXPORT_PATCH_TEMPLATE = """# HG changeset patch | ||
# User {author} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you look at the "Constructing Transplant Patch" doc, this will be more complicated too. We may need to create a Phabricator API extension to expose the patch author emails.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That will be a later story card.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed :)
|
||
HG_EXPORT_PATCH_TEMPLATE = """# HG changeset patch | ||
# User {author} | ||
# Date {patchdate} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will investigate this and try to get back to you in time :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solved in code, see the patch construction design doc comments. I chose dddddddd +0000
as the format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with with a patch and it works great. You're right in that we will not need the human formatted date!
Patch that I tried via hg import
:
# HG changeset patch
# User Israel Madueme <imadueme@mozilla.com>
# Date 1498600861 14400
Bug 123: Add some comments to client.py
diff --git a/client.py b/client.py
--- a/client.py
+++ b/client.py
@@ -1,15 +1,16 @@
#!/usr/bin/python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This is a comment to test diffs
-# This is a very unsafe thing to put in a diff
+# This is a very unsafe thing to put in a diff
+# This is stupid and should be removed
LIBFFI_DIRS = (('js/ctypes/libffi', 'libffi'),)
HG_EXCLUSIONS = ['.hg', '.hgignore', '.hgtags']
CVSROOT_LIBFFI = ':pserver:anoncvs@sources.redhat.com:/cvs/libffi'
import os
import sys
import datetime
Summary: When requesting a landing, Construct 'hg export' formatted patches for the Transplant service client to consume. Bug: 1374701 Differential Revision: https://mozphab.dev.mozaws.net/D8
e5c6ad7
to
f9d6c63
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going to further review
|
||
HG_EXPORT_PATCH_TEMPLATE = """# HG changeset patch | ||
# User {author} | ||
# Date {patchdate} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested with with a patch and it works great. You're right in that we will not need the human formatted date!
Patch that I tried via hg import
:
# HG changeset patch
# User Israel Madueme <imadueme@mozilla.com>
# Date 1498600861 14400
Bug 123: Add some comments to client.py
diff --git a/client.py b/client.py
--- a/client.py
+++ b/client.py
@@ -1,15 +1,16 @@
#!/usr/bin/python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# This is a comment to test diffs
-# This is a very unsafe thing to put in a diff
+# This is a very unsafe thing to put in a diff
+# This is stupid and should be removed
LIBFFI_DIRS = (('js/ctypes/libffi', 'libffi'),)
HG_EXCLUSIONS = ['.hg', '.hgignore', '.hgtags']
CVSROOT_LIBFFI = ':pserver:anoncvs@sources.redhat.com:/cvs/libffi'
import os
import sys
import datetime
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful :')
When requesting a landing, Construct 'hg export' formatted patches for
the Transplant service client to consume.
Todo