Skip to content
This repository was archived by the owner on Jul 23, 2024. It is now read-only.
This repository was archived by the owner on Jul 23, 2024. It is now read-only.

git-push-to-hg msys issues #54

@avih

Description

@avih

[1] Using latest mozilla-build (2.1RC1) and latest git-for-windows (2.6.3), the following code:

if [[ $OSTYPE == "msys" ]]; then
  # mozbuild uses msys (which uses "/c/somedir" paths), but git seems to be
  # based on cygwin (which uses "c:/somedir") - but markh *actually* sees
  # "c:/somedir\filename" - which upsets most $0 usage.
  # So fix it up and store the result in $this
  this="/${this/:/}" # change "c:" to "/c/"
  this="${this/\\//}" # change "\" to "/"
fi

PATH="$(dirname $this):$PATH"

Produces $this as //c/some/path (two slashes instead of one). If I remove this msys workaround, then it continues correctly.

[2] Once it continues past that part, I'm seeing (specific to my command):

51e64c0d2c7e6f74786413331db6ebcc943f7004..HEAD
On branch before1167601.
82cf98e instrument BOT
/usr/bin/env: python2: No such file or directory

And indeed there's no python2, and my mercurial dir state is now different than before I invoked git-push-to-try (e.g. all my mq patches got messed up).

Here are the tab completion options for python within msys (mozilla-build 2.1RC1):
python python.exe python2.7.exe python27.dll pythonw.exe

I'd suggest that before git-push-to-hg starts executing, it will:

  1. Make sure it has what it needs (python, possibly others).
  2. If the hg dir has a patch queue, possibly with some applied patches, print out the command which can be used to restore them in case something goes wrong, or refuse to execute if it can't handle existing patch queue well.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions