Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm hosting a small php-based website through Bitbucket. I have some files under version control that I don't want to deploy in production (helpful scripts, .xcf files, etc). Is there some way to just send the files I want to the production server?

share|improve this question
    
Was my answer helpful to you? Then please remember to mark it accepted. – Martin Geisler Jan 29 '12 at 15:25
    
@MartinGeisler User hasn't been online for several months now. – slhck Jan 29 '12 at 15:27
    
@slhck: right, I didn't think of that. He was online on Stack Overflow yesterday, though, so maybe he sees the message while browsing there. – Martin Geisler Jan 29 '12 at 15:30
    
@MartinGeisler: Sorry, I forgot I even asked this question. I accepted your answer, a little bit late :) – AaronM Mar 13 '13 at 23:56
    
@AaronM: thanks, better late than never :-) – Martin Geisler Mar 16 '13 at 14:59
up vote 3 down vote accepted

No, you cannot make Mercurial send only some files. By "send", I guess you mean hg pull or maybe wget https://bitbucket.org/<user>/<repo>/get/default.zip.

The normal way to solve this is to make a dedicated script for deployment. Something like:

cd repo
hg pull
hg archive -r production -X util -X imgs/*.xcf site
rsync -av site server:public_html

where I'm imagining that you have a named branch called production that you want to publish to the server.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .