- Change Summary:
-
Used the proper revision for parent_base.
- Depends On:
-
- Diff:
Revision 2 (+68 -37)
Support parent diffs with Mercurial
Review Request #5207 — Created Jan. 7, 2014 and submitted
This patch adds support for parent diffs to Mercurial.
Wrote some new tests. Executed tests locally and everything appears to work as expected!
- Change Summary:
-
Updated description.
Anyway, here's the deal with this patch. It works. But it's not very efficient. Under the hood, rbt is performing a lot of
hg outgoing
andhg parents
invocations, especially when parent diffs are involved. When working with the Firefox repository (160000+ commits), the run time of rbt is painfully slow. While this patch could probably land as is (after tests are written, of course), some future optimization will be necessary.I see two options:
1) Add caching of known changesets, parents, outgoing revisions, etc.
2) Use http://selenic.com/repo/python-hglib to establish a "pipe" to the Mercurial repo so all access is through a single process. The Mercurial process will cache certain lookups, so redundant access should be fast. Furthermore, we'll have fewer process invocations and less string parsing to worry about.I think #2 is the most robust solution. But that would introduce a new package dependency for RBTools. Not sure if that's acceptable.
- Description:
-
This is a preliminary patch for supporting parent diffs with Mercurial.
It's not ready for checkin because it needs tests. But it does appear to work in my setup.
- - This patch includes the patch for review #5066. I'll rebase once 5066 lands. I wanted to have a version of this patch available when #5066 is considered so you can see where I'm going with the API changes.
- Change Summary:
-
Wrote some tests. Improved the patch a little. I'm optimistic it's very close to shipping.
- Description:
-
~ This is a preliminary patch for supporting parent diffs with Mercurial.
~ This patch adds support for parent diffs to Mercurial.
- - It's not ready for checkin because it needs tests. But it does appear to work in my setup.
- Testing Done:
-
~ Just local manuael testing so far.
~ Wrote some new tests. Executed tests locally and everything appears to work as expected!
- Diff:
-
Revision 4 (+108 -35)
- Bugs:
-
This is looking pretty great!
-
I think that this needs to be addressed as part of this change.
I'd like to use the
--tracking-branch
argument for users to specify their upstream branch (and we should really rename it to--upstream-branch
to get away from the very git-specific name). -
Can you pass the format arguments as additional arguments to
logging.*()
? Otherwise we do two format operations where only one is wanted.
- Depends On:
- Change Summary:
-
Rebased on top of master. Fixed the issue about logging formatting. Updated some comments.
I think the issue about fixing --tracking-branch and the TODO about parent diffs can be addressed by a followup. This patch is a step in the right direction and I don't think we should let perfection stand in the way of better.
- Depends On:
-
- Diff:
Revision 5 (+115 -39)
-
I'm getting several failures when running the tests for MercurialClient after this change. Did you run the entire test suite or just the new ones?
$ nosetests -v -- rbtools.clients.tests:MercurialClientTests
- Change Summary:
-
Using {branch} instead of {branches} (avoids longstanding Mercurial bug).
FWIW, Mercurial only stores one branch per changeset. {branches} is effectively {branch} in list form. We should have been using {branch} all along.
- Diff:
-
Revision 6 (+113 -39)