Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem with hg push (reverting file to previous version)

6 views
Skip to first unread message

Eduardo Trápani

unread,
Oct 14, 2008, 2:57:03 PM10/14/08
to
Hi,

I made a mistake and commited it. Since I knew there where problems with hg after 3.1b1 I did the following on a clean directory:

$ hg clone http://hg.mozilla.org/l10n-central/eo

then I changed the one file that was wrong and did

$ hg commit -m "...."
$ hg push

And I got:

pushing to ssh://hg.mozilla.org/l10n-central/eo
searching for changes
abort: push creates new remote branches!
(did you forget to merge? use push -f to force)

The modified file is equal to the previous version. I wonder if that is the problem. It's as if I had applied the patch with -R.

Any ideas on what to do to revert the file to the previous version?

Thanks, Eduardo.

Axel Hecht

unread,
Oct 14, 2008, 4:47:57 PM10/14/08
to

Mind doing

hg branch
hg ident
hg heads default

and paste the output here?

I somehow expect that you ran into a problem when trying to do the
clone, and the previous clone was still there, so that aborted. But
that's just me guessing.

Axel

Eduardo Trápani

unread,
Oct 15, 2008, 8:04:35 AM10/15/08
to
> Mind doing
>
> hg branch
> hg ident
> hg heads default
>
> and paste the output here?
>
> I somehow expect that you ran into a problem when trying to do the
> clone, and the previous clone was still there, so that aborted. But
> that's just me guessing.

I did it again. I created a new directory, cloned l10n-central/eo again, modified .hg/hgrc (and did a cat so that you can see it). Then I applied the patch to the file I'm trying to modify. Hg commit and push. Same error. I added an hg outgoing at the end.

~$ mkdir newhg

~$ cd newhg

~/newhg$ hg clone http://hg.mozilla.org/l10n-central/eo
destination directory: eo
requesting all changes
adding changesets
adding manifests
adding file changes
added 12 changesets with 305 changes to 250 files
241 files updated, 0 files merged, 0 files removed, 0 files unresolved

~/newhg$ cd eo

~/newhg/eo$ hg branch
default

~/newhg/eo$ hg ident
6defce71f1a5 FIREFOX_3_1b1_BUILD1/FIREFOX_3_1b1_RELEASE

~/newhg/eo$ hg heads default
changeset: 9:6defce71f1a5
tag: FIREFOX_3_1b1_BUILD1
tag: FIREFOX_3_1b1_RELEASE
user: Eduardo Trápani <edu...@esperanto.org.uy>
date: Tue Sep 30 16:40:05 2008 -0300
summary: Fix errors in compare-locales

~/newhg/eo$ patch -p5 < /tmp/hgrc.patch
missing header for unified diff at line 3 of patch
patching file .hg/hgrc

~/newhg/eo$ cat .hg/hgrc
[paths]
default = http://hg.mozilla.org/l10n-central/eo
default-push = ssh://hg.mozilla.org/l10n-central/eo

~/newhg/eo$ cd browser/chrome/browser-region/

~/newhg/eo/browser/chrome/browser-region$ patch < /tmp/region.properties.patch
patching file region.properties

~/newhg/eo/browser/chrome/browser-region$ cd -

~/newhg/eo$ hg commit -m "Bug 459865. Reverting region.properties as per Bug 453108"

~/newhg/eo$ hg push


pushing to ssh://hg.mozilla.org/l10n-central/eo
searching for changes
abort: push creates new remote branches!
(did you forget to merge? use push -f to force)

~/newhg/eo$ hg outgoing
comparing with ssh://hg.mozilla.org/l10n-central/eo
searching for changes
changeset: 12:0b5165fa1383
tag: tip
parent: 9:6defce71f1a5
user: Eduardo Trápani <edu...@esperanto.org.uy>
date: Wed Oct 15 09:53:13 2008 -0200
summary: Bug 459865. Reverting region.properties as per Bug 453108

~/newhg/eo$

Axel Hecht

unread,
Oct 15, 2008, 10:34:30 AM10/15/08
to

Yet another hg bug we trigger. djc promises a fix for hg 1.1. Other
issues are on Benjamin's blog,
http://benjamin.smedbergs.us/blog/2008-10-09/release-branches-in-mozilla-central/.

Even though I used push -f in this case (Yep, I did), please be overly
cautious when tempted to do so yourself. In most common cases, there's
something like a forgotten merge or somesuch that you're actually
supposed to fix before pushing. In this particular case, hg forgot about
the head on the "default" branch. That didn't affect many localizations,
as you gave me sourcestamps, and those were already kinda old by the
time we actually hit the release automation, mostly tagging older
revisions. Thus, "default" had grown a different head by that time, and
hg had both the head for default and the relbranch, and everything was
fine. And yes, don't merge default and relbranches ;-)

HTH

Axel

0 new messages