On Fri, Sep 18, 2009 at 11:52 AM, nathan binkert <[email protected]> wrote: >>> - In hindsight, one may see the items in this patch as unrelated, >>> but I initially created this patch with the sole goal of adding >>> large memory support to Ruby. It turned out I encountered a lot of >>> issues throughout the code, and there are more to come. That being >>> said, I have no problem using the "-X" option to separate these out >>> to multiple changesets when I commit them. >> >> What I do when that happens is refresh my current patch, pop it, write >> a patch that fixes whatever the issue is, refresh it, and then push my >> first patch back on. Then everything stays seperated into minimal >> logical units which makes history diving a lot nicer. > > Another thing that you can do if lots of things wind up in the same > patch is to manually pull the patch apart into multiple patches. It > sounds like a pain, but it's really not that hard to do. Also, I > don't think the -X option works when you're using mq because when you > convert an applied patch to a changeset (using hg qdel -r), you're not > actually doing a commit.
To clarify Nate's statement (since it confused me at first): 'hg qdel -r' (which appears to be aliased to the much more logically named 'hg qfinish' in recent versions) does a commit (in the sense of having the same effect of committing a changeset as if you had done an 'hg commit'), but it does not do it literally via 'hg commit' so you don't have the opportunity to use the '-X' flag. Note that -X doesn't solve the entire problem anyway, since there may be multiple changes in a single file that logically belong to independent changesets. Gabe's description of popping your current patch off, fixing the underlying problem in a separate patch, and then pushing your current patch back on is the best way to do things when you're trying to do X and discover that in the process of doing X you have to first do subtask Y or fix bug Z. Then you not only have your bits nicely separated for separate committing, but you can test them independently as well. So that's something to strive for in the future. When you've already got a big monolithic patch like Brad does and want to split it up, then you are stuck with the somewhat manual task of pulling it apart. Some of the patchutils programs like filterdiff and splitdiff can help with this. Steve _______________________________________________ m5-dev mailing list [email protected] http://m5sim.org/mailman/listinfo/m5-dev
