How to "push" manually?
Brodie Rao
dackze at gmail.com
Sun Apr 5 20:38:56 CDT 2009
On Apr 5, 2009, at 8:01 PM, skip at pobox.com wrote:
>>> Apparently so. You have one or more heads in your local repository
>>> that the remote repository doesn't. If you pushed everything, the
>>> remote repository would have heads that it previously didn't. That's
>>> 1r|creating remote heads1r}.
>
> I don't get it. Is a Mercurial head like a branch?
Yes. It's an unmerged branch.
> I want the changeset from Ben Finney in my local repository, but not
> on my
> web server. Going back to my original attempt to push, should I have
> explicitly just pushed rev/changeset 82:20939e395812?
Why did you pull it into your local repository? You can save yourself
some trouble in the future by not pulling changes into a repository
unless you're planning on merging them. If you'd like to test Ben's
changes, clone his repository and test it separately.
> Ok. Is there not a simple Mercurial concept sheet somewhere?
http://www.selenic.com/mercurial/wiki/index.cgi/UnderstandingMercurial
> If it's unbelievably handy, why isn't it enabled by default? That's a
> rhetorical question. A little poking around showed me that it comes
> with
> Mercurial. How do I find out what other extensions came with
> Mercurial but
> are disabled by default? Is there a common set of "unbelievably
> handy"
> extensions the Mercurial aficianados always enable?
http://www.selenic.com/mercurial/wiki/index.cgi/UsingExtensions
> *sigh* Again, I remind you that this whole thing is not Mother's
> Milk to me.
> What is "rebase"?
I wouldn't worry about rebase until you're more acquainted with the
semantics of Mercurial's history model. It's not necessary in this
case, at any rate.
> At this point we've established that I somehow messed up my repo (at
> least
> w.r.t. the repo on my web server). It appears all I wanted to do was
>
> hg push -r 20939e395812 ssh://www.smontanaro.net//home/skip/public_html/python/lockfile
>
> After getting rid of the repo on my web server and moving the old
> one back
> in place, the above command worked. So I'm back in business. For
> now.
> Could I have simply removed Ben's head from the web server repo
> (that sounds
> violent - thankfully it's only a virtual decapitation)?
I can't say I've ever manually pushed a specific revision. When I see
the "remote heads" warning, I merge the heads before pushing. If I
only have one head in my repository, I pull the remote head and then
merge. There may be cases where you'd do that, but I don't think
that's the case here.
You may find these wiki pages useful:
http://www.selenic.com/mercurial/wiki/index.cgi/WorkingPractices
http://www.selenic.com/mercurial/wiki/index.cgi/MultipleCommitters
The Hg book is also a good read: http://hgbook.red-bean.com/read/
More information about the Mercurial
mailing list