Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 1 May 2021 12:50:10 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Matthias Fechner <mfechner@freebsd.org>
Cc:        freebsd-git <freebsd-git@freebsd.org>, "rene@freebsd.org" <rene@FreeBSD.org>, Warner Losh <imp@bsdimp.com>
Subject:   Re: Script rmport shows error message
Message-ID:  <A1F2875F-FE2D-4FC1-8306-0C1E2CCCA209@yahoo.com>
In-Reply-To: <8613e467-9408-527f-d8f0-81a6db0bdce9@freebsd.org>
References:  <8613e467-9408-527f-d8f0-81a6db0bdce9@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-May-1, at 10:07, Matthias Fechner <mfechner at freebsd.org> =
wrote:

> I thought that the rmport script was already updated, but I cannot use =
it.
> I tried to execute it with:
> Tools/scripts/rmport databases/rubygem-gitlab-pg_query
> fatal: ambiguous argument 'remotes/origin/main': unknown revision or =
path not in the working tree.
> Use '--' to separate paths from revisions, like this:
> 'git <command> [<revision>...] -- [<file>...]'
> you have local commits, exiting

Summary:

ports/Tools/scripts/rmport does not yet seem to be set up to
expect or try "remotes/freebsd/" instead of "remotes/origin/".

Details:

If you follow the documented instructions the refs
for the ports main are (ignore any refs/ prefix):

# git remote show
freebsd

# git show-ref --abbrev main
a6233da12c53 refs/heads/main
a6233da12c53 refs/remotes/freebsd/main

If you are not set up to be a committer you might
have something like:

# git remote -v show
freebsd	ssh://anongit@git.freebsd.org/ports.git (fetch)
freebsd	ssh://anongit@git.freebsd.org/ports.git (push)

(Where the push one is not intended to work and there
are https:// alternatives to the ssh:// use.)

You can use such commands to check on what is set up
in your environment.

This contrasts with the typical defaults, such as from
another git context that I have (older github: so master
instead of main):

# git remote show
origin

# git remote -v show # output edited
origin	https://github.com/OMITTED/OMITTED.git (fetch)
origin	https://github.com/OMITTED/OMITTED.git (push)

# git show-ref --abbrev master
ae3f9ba refs/heads/master
ae3f9ba refs/remotes/origin/master


As for ports/Tools/scripts/rmport . . .

# grep origin /usr/ports/Tools/scripts/rmport
if ! ${GIT} diff --exit-code remotes/origin/main ; then

# grep freebsd /usr/ports/Tools/scripts/rmport
	=
url=3D"https://bugs.freebsd.org/bugzilla/buglist.cgi?quicksearch=3D${synop=
sis}"

So no attempt at use of remotes/freebsd/ use.

Locally you could replace the "remotes/origin/" text
in the script until there is official support for
the documented way of setting things up.

> But there are no local changes:
> =E2=95=B0=E2=94=80 git status
> On branch main
> Your branch is up to date with 'freebsd/main'.
>=20
> nothing to commit, working tree clean
>=20
> The FreeBSD repository is under freebsd and not origin, maybe this is =
the source of the problem:
> =E2=95=B0=E2=94=80 git remote -v
> freebsd https://git.freebsd.org/ports.git (fetch)
> freebsd git@gitrepo.freebsd.org:ports.git (push)
> origin  git@gitlab.fechner.net:mfechner/Gitlab.git (fetch)
> origin  git@gitlab.fechner.net:mfechner/Gitlab.git (push)
>=20
> Has anyone an idea how to fix/use this very useful script?
>=20

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A1F2875F-FE2D-4FC1-8306-0C1E2CCCA209>