how to push selected changes only?

Steve Barnes gadgetsteve at hotmail.com
Sat Jan 18 20:17:54 UTC 2014


On 18/01/14 19:38, hamann.w at t-online.de wrote:
>>> On 18/01/14 15:23, hamann.w at t-online.de wrote:
>>>> Hi,
>>>>
>>>> I have come to a point in a project where I wanted to keep a stable / reference version,
>>>> so I cloned the repo and started to experiment on new stuff. At that point I stumbled across
>>>> a few problems that I would like to see fixed in the reference version too.
>>>> These fixes can be expressed either as specific filenames or as specific revision
>>>> numbers. Hg push will accept only a single reviosion number.
>>>> Is there any way to send them back? If not, I would probably have to send
>>>> the modified files as they are now (and have revisions compressed into one step)
>>>>
>>>> Regards
>>>> Wolfgang Hamann
>>>>    
>>>>
>>> If you are on a true clone of the repository you would need to *graft*
>>> your changes on - to quote the help:
>>>
>>> ~$ hg --help graft
>>> hg graft [OPTION]... [-r] REV...
>>>
>>> copy changes from other branches onto the current branch
>>>
> Hi Steve,
>
> I have just upgraded my installation (which was too old to offer graft) and tried it, but
> unfortunately no success.
> The way I am trying is
> cd orig-dir
> hg graft -R ../clone-dir -r 13:14 -r 17:20
> (I had to use the -R because it complained about unknown revisions in orig-dir)
> Should I perhaps run the command from the clone-dir instead?
>
> Regards
> Wolfgang Hamann
>
>
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial
>
>
Hi Wolfgang,

What exact error messages do you get? - from what I can see you are 
going the right way!

I personally would try split the grafts into stages say -r 13:14 as one 
then -r 17:20 I would also add the --verbose --debug and/or --traceback 
flags N.B. you can test with --dry-run until you are happy.

I would also test in a fresh clone of orig-dir first - just to be on the 
safe side.

If you find that the commands work in a new clone but not in the 
original that might be due to the age of hg that you created the 
orig-dir with.

Steve
p.s. I am far from the most expert here so someone else may chip in with 
better advice.




More information about the Mercurial mailing list