Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] workspace management question
From: Terry Dontje (Terry.Dontje_at_[hidden])
Date: 2009-02-19 10:36:56


Eugene Loh wrote:
> Terry Dontje wrote:
>
>> Ralph Castain wrote:
>>
>>> On Feb 19, 2009, at 5:39 AM, Terry Dontje wrote:
>>>
>>>> Eugene Loh wrote:
>>>>
>>>>> Jeff Squyres wrote:
>>>>>
>>>>>> Here's what I typically run to bring down changes from SVN to HG:
>>>>>>
>>>>>> # Ensure all the latest hg repo changes are in the working dir
>>>>>> hg up
>>>>>> # Bring in all the SVN changes
>>>>>> svn up
>>>>>> # Refresh the .hgignore file (may change due to the svn up)
>>>>>> ./contrib/hg/build-hgignore.pl
>>>>>> # Add / remove any files to hg
>>>>>> hg addremove
>>>>>> # Now commit to hg
>>>>>> hg ci -m "Up to SVN rzzzzz"
>>>>>>
>>>>>> Would you mind adding something like this to the wiki page?
>>>>>
>>>>> As it has been spoken, so has it been done:
>>>>> https://svn.open-mpi.org/trac/ompi/wiki/UsingMercurial#SyncingSVNandHGworkspaces
>>>>>
>>>>
>>>> I was looking at the added stuff and it looks to me that the steps
>>>> are missing doing an "hg up" on the SVN/HG workspace before doing
>>>> the svn up. Am I missing something here?
>>>
>>> No - the doc is missing that step, but you should do it (or at
>>> least, I always do, and it "works for me").
>>
>> Ok, I'll add it then.
>
> First of all, thanks for reviewing the content. (I guess Jeff was
> just dazzled by my brilliant diagram!)
>
> But, I'd like to understand this better. Jeff's e-mail above has an
> "hg up" before the "svn up". But, I was trying to organize the steps
> in terms of stuff that propagates "from left to right" (from OMPI
> central repository out to HG clones) and stuff that propagates "from
> right to left" (from HG clones back to central repository). Changes
> could be happening anywhere along the way (people putting code back to
> central repository or combo workspaces while you're doing development
> work in a clone), and so changes have to be propagated in both
> directions. Merges could happen at different points.
>
> Anyhow, I had an "hg up", but it's sitting on the right-to-left
> trail. It's step #2 on the return trail. It's at the bottom middle
> of the diagram. Isn't this sufficient? Doesn't "svn up" bring
> updates from the central repository to the combo workspace, while "hg
> up" brings the changes from the clones into the combo? So, in the
> "left/right" organization, they belong to different directions.
Ok, I guess I was trying to use the instructions more as a template of
what I need to do instead of trying to separate the commands based on
change flow. I agree you are technically correct as to how you
separated the flow but
it was unclear to me that if you wanted to update your svn/hg workspace
from the svn repository that you need to do the "hg up" first before the
"svn up" or else you'd lose the changes made to the hg workspace side.

Note, cleaning up/detecting such a mistake can be a really big pain in
the butt. We've ran into this issue multiple times internally in Sun
(hahaha, who do you work for again?) where we've svn up'd a release
workspace before hg up'ing thus losing changes. It's not that big of
deal to try and rollback (mostly dog work), probably the bigger issue is
it becomes very confusing to one when all of a sudden a certain feature
has disappeared especially when several other putbacks have then occurred.

--td