[Openmp-dev] Splitting version changes
Cownie, James H
james.h.cownie at intel.com
Fri Oct 10 01:50:54 PDT 2014
Excellent, thanks. I thought git should be the answer, and I should have looked for an emacs-mode, since I've been using it since 1984 or so. (Back when the joke was that it stood for "Eight Megabytes And Constantly Swapping").
James Cownie <james.h.cownie at intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438
From: Steven Noonan [mailto:steven at uplinklabs.net]
Sent: Thursday, October 09, 2014 11:05 PM
To: Hal Finkel
Cc: Cownie, James H; openmp-dev at dcs-maillist2.engr.illinois.edu
Subject: Re: [Openmp-dev] Splitting version changes
On Thu, Oct 9, 2014 at 2:23 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- Original Message -----
> > From: "James H Cownie" <james.h.cownie at intel.com>
> > To: openmp-dev at dcs-maillist2.engr.illinois.edu
> > Cc: "Hal Finkel (hfinkel at anl.gov)" <hfinkel at anl.gov>
> > Sent: Wednesday, October 8, 2014 2:51:44 AM
> > Subject: Splitting version changes
> > Over on the commits list Hal pointed out that
> > > These things, and the license headers, should really be committed
> > > separately.
> > > There are several different ways to separate a patch file into
> > > separate commits (and at least several of us here who have
> > > experience doing surgery on patches).
> > > Feel free to ask for advice (might as well do it on the dev list:
> > > it is a common problem), and you shall receive it.
> > So, Hal, please enlighten us.
> I'll preface this by saying that there may yet be better ways, but here's what I've used...
> First, I'd be remiss were I to neglect to mention that emacs has a really-nice patch-editing mode. Here's some documentation:
> ml and if you really need to do some non-trivial surgery directly on a
> patch file, I've not found a better alternative (I normally use vim, but this is the one thing for which I use emacs). To use this for splitting, you'd make several copies of the patch file and, in each, delete the non-relevant parts from each.
> Next, I'll strongly recommend that you use 'git svn' to manage your interaction with the upstream subversion repository instead of using svn directly. I should mention that, since the OpenMP repository does not have much history, you can just do a full clone:
> git svn clone https://llvm.org/svn/llvm-project/openmp/trunk
We have a git mirror too: http://llvm.org/git/openmp.git
Changes should really be based on top of that rather than a fresh git-svn clone. :)
> if you try this with LLVM or Clang, it will take a *long* time because it tries to replay the remote repository one commit at a time. For this, add -r HEAD so that it will just start at the latest commit. There's lots of information out there on using git svn, including:
> To the topic at hand, once you're using git locally, you can read "Splitting up commits the easy way" (http://cbx33.github.io/gitt/afterhours5-1.html) which talks about how to use git's interactive staging feature to split up a large patch file and commit it in separate pieces. This can be done both using command-line tools and also using 'git gui' if you'd prefer the GUI-based interface.
> If you'd like more information and/or help on any of these, please feel free to ask.
I find that people are always surprised when they learn about 'git add -p', which I heartily recommend to everyone who uses git regularly.
It's essential for creating logical patches.
Jim, I'd be happy to help as well, just send me an email and I'll be able to suggest some ways to make things better.
> Thanks again,
> > -- Jim
> > James Cownie <james.h.cownie at intel.com> SSG/DPD/TCAR (Technical
> > Computing, Analyzers and Runtimes)
> > Tel: +44 117 9071438
> > --------------------------------------------------------------------
> > -
> > Intel Corporation (UK) Limited
> > Registered No. 1134945 (England)
> > Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47
> > This e-mail and any attachments may contain confidential material
> > for the sole use of the intended recipient(s). Any review or
> > distribution by others is strictly prohibited. If you are not the
> > intended recipient, please contact the sender and delete all copies.
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory
> Openmp-dev mailing list
> Openmp-dev at dcs-maillist2.engr.illinois.edu
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
More information about the Openmp-dev