hg newbie

Tom Anderson tom.anderson at timgroup.com
Mon Aug 13 09:33:50 UTC 2012


On 10/08/12 20:06, maxxtraxx wrote:
> I've followed the great tutorial at http://hginit.com/ but have a 
> workflow question. I'm working on a file that has multiple edits and 
> some of these changes I would like to push to my live server but 
> others I'm not ready to post live. Can I still commit my changes and 
> just push a particular revision to the live server? And if so what 
> would the syntax be for such an operation?

I don't believe there's a way to do that in core Mercurial. Here's how i 
do it, for a file called foo:

1. hg revert foo; this puts the content of foo back to what it was at 
the last commit, and creates a file foo.orig with all my work
2. meld foo foo.orig; where meld is a comparison editor - you could 
probably use vimdiff, or something in an IDE
3. Copy over the changes i want to commit from foo.orig to foo (this 
entails clicking a button for each change in the editors i use)
4. hg commit -I foo; this commits the changes i have copied over
5. mv foo.orig foo; this restores the file to contain all my work

tom

-- 

Tom Anderson | Developer | +44 20 7826 4312 | timgroup.com 
<http://timgroup.com/>

STATEMENT OF CONFIDENTIALITY: The information contained in this 
electronic message and any attachments to this message are intended for 
the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If you are not the intended recipient, please 
notify Tom Anderson at TIM Group at tom.anderson at timgroup.com and 
destroy all copies of this message and any attachments.

TIM Group is the trading name for YouDevise Limited. YouDevise Limited 
is registered in England, No. 3331176. Registered office: 3 Copthall 
Avenue, London, EC2R 7BH.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20120813/7eacdf58/attachment-0002.html>


More information about the Mercurial mailing list