gbp buildpackage test build with uncommitted changes

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

gbp buildpackage test build with uncommitted changes

Tong Sun-2
Hi,

I'm new to Debian packaging and gbp buildpackage, and many time I want
to try out my fixes without checking them in, would that be possible
with `gbp buildpackage`?

Because whenever, I have above situation, gbp buildpackage will complains:

- - - - - - - - - - - -
gbp:error: You have uncommitted changes in your source tree:
gbp:error: On branch master
Changes not staged for commit:
. . .
gbp:error: Use --git-ignore-new to ignore.
- - - - - - - - - - - -

Using `--git-ignore-new` will get my changes ignore entirely, and the
build will keep complaining about the same error.

What's the solution? Thx

Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Geert Stappers
On Mon, Mar 18, 2019 at 11:47:06PM -0400, Tong Sun wrote:

> Hi,
>
> I'm new to Debian packaging and gbp buildpackage, and many time I want
> to try out my fixes without checking them in, would that be possible
> with `gbp buildpackage`?
>
> Because whenever, I have above situation, gbp buildpackage will complains:
>
> - - - - - - - - - - - -
> gbp:error: You have uncommitted changes in your source tree:
> gbp:error: On branch master
> Changes not staged for commit:
> . . .
> gbp:error: Use --git-ignore-new to ignore.
> - - - - - - - - - - - -
>
> Using `--git-ignore-new` will get my changes ignore entirely, and the
> build will keep complaining about the same error.
>
> What's the solution? Thx
>

The `--git-ignore-new` works for me.
Currently I have no project at hand to verify   (sorry)

For me is it OK to publish the `gbp clone` URL here.


Groeten
Geert Stappers
--
Leven en laten leven

Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Andrey Rahmatullin-3
In reply to this post by Tong Sun-2
On Mon, Mar 18, 2019 at 11:47:06PM -0400, Tong Sun wrote:
> Using `--git-ignore-new` will get my changes ignore entirely
That's not what --git-ignore-new does. Not using --git-export=WC does
that.

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Emmanuel Arias
In reply to this post by Geert Stappers
HI,


>> Using `--git-ignore-new` will get my changes ignore entirely, and the
>> build will keep complaining about the same error.
>>
>> What's the solution? Thx
>>
That is weird. Currently I am working with gbp and --git-ignore-new work
for me.





signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Tong Sun-2
On Tue, Mar 19, 2019 at 6:08 AM Emmanuel Arias wrote:

> >> Using `--git-ignore-new` will get my changes ignore entirely, and the
> >> build will keep complaining about the same error.
> >>
> >> What's the solution? Thx
> >>
> That is weird. Currently I am working with gbp and --git-ignore-new work
> for me.

Thanks a lot *everyone* for the confirmation!

Now I need to figure out why it didn't work for me...

Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Emmanuel Arias

Thanks a lot *everyone* for the confirmation!

Now I need to figure out why it didn't work for me...

Are you working on a particular salsa repo?

Could you let's me know what is it? Could you send me the patch
that you want to add?




--
Arias Emmanuel
Github/Gitlab; @eamanu
Debian: @eamanu-guest
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Andrey Rahmatullin-3
In reply to this post by Tong Sun-2
On Tue, Mar 19, 2019 at 09:01:30AM -0400, Tong Sun wrote:

> On Tue, Mar 19, 2019 at 6:08 AM Emmanuel Arias wrote:
>
> > >> Using `--git-ignore-new` will get my changes ignore entirely, and the
> > >> build will keep complaining about the same error.
> > >>
> > >> What's the solution? Thx
> > >>
> > That is weird. Currently I am working with gbp and --git-ignore-new work
> > for me.
>
> Thanks a lot *everyone* for the confirmation!
>
> Now I need to figure out why it didn't work for me...
What exactly doesn't work now?

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Adam Lewenberg
In reply to this post by Emmanuel Arias


On 3/19/2019 3:08 AM, Emmanuel Arias wrote:

> HI,
>
>
>>> Using `--git-ignore-new` will get my changes ignore entirely, and the
>>> build will keep complaining about the same error.
>>>
>>> What's the solution? Thx
>>>
> That is weird. Currently I am working with gbp and --git-ignore-new work
> for me.


The original question was asking how to use "gbp buildpackage" to build
the package using any uncommitted files. Doesn't --git-ignore-new
_ignore_ the uncommitted files?

One possibility would be to create a test branch, commit your changes to
this test branch, and then use the --git-debian-branch option to build
on this test branch. You can then throw away the branch when you are done.




Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Tong Sun-5
On Tue, Mar 19, 2019 at 11:42 AM Adam Lewenberg wrote:

>
> On 3/19/2019 3:08 AM, Emmanuel Arias wrote:
> > HI,
> >
> >
> >>> Using `--git-ignore-new` will get my changes ignore entirely, and the
> >>> build will keep complaining about the same error.
> >>>
> >>> What's the solution? Thx
> >>>
> > That is weird. Currently I am working with gbp and --git-ignore-new work
> > for me.
>
>
> The original question was asking how to use "gbp buildpackage" to build
> the package using any uncommitted files. Doesn't --git-ignore-new
> _ignore_ the uncommitted files?

Thanks a lot Adam for paraphrasing what I meant.

Yes, I noticed that `--git-ignore-new` will ignore my changes entirely, and the
build will keep complaining about the same error that I've already fixed.

> One possibility would be to create a test branch, commit your changes to
> this test branch, and then use the --git-debian-branch option to build
> on this test branch. You can then throw away the branch when you are done.

Gotya. Thx.

Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Andrey Rahmatullin-3
In reply to this post by Adam Lewenberg
On Tue, Mar 19, 2019 at 08:25:53AM -0700, Adam Lewenberg wrote:
> The original question was asking how to use "gbp buildpackage" to build the
> package using any uncommitted files. Doesn't --git-ignore-new _ignore_ the
> uncommitted files?
No, gbp already ignores uncommitted files (without --git-export=WC),
--git-ignore-new just allows you to proceed with building.

> One possibility would be to create a test branch, commit your changes to
> this test branch, and then use the --git-debian-branch option to build on
> this test branch. You can then throw away the branch when you are done.
This is completely unnecessary, of course.

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Andrey Rahmatullin-3
In reply to this post by Tong Sun-5
On Tue, Mar 19, 2019 at 12:27:15PM -0400, Tong Sun wrote:
> Yes, I noticed that `--git-ignore-new` will ignore my changes entirely
It doesn't do that.
Also, it all is described in the manpage.

> and the build will keep complaining about the same error that I've
> already fixed.
Haven't you seen my email with the correct answer?

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Tong Sun-5
On Tue, Mar 19, 2019 at 1:28 PM Andrey Rahmatullin wrote:
>
> On Tue, Mar 19, 2019 at 12:27:15PM -0400, Tong Sun wrote:
> > Yes, I noticed that `--git-ignore-new` will ignore my changes entirely
> It doesn't do that.
> Also, it all is described in the manpage.
>
> > and the build will keep complaining about the same error that I've
> > already fixed.
> Haven't you seen my email with the correct answer?

Too short to figure out what you were trying to say.

In my mind the correct answer is the solution on how to use "gbp
buildpackage" to build the package *using* any uncommitted files, not
what  `--git-ignore-new` does or does not.

Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Andrey Rahmatullin-3
On Tue, Mar 19, 2019 at 01:32:46PM -0400, Tong Sun wrote:
> > Haven't you seen my email with the correct answer?
>
> Too short to figure out what you were trying to say.
I see.

> In my mind the correct answer is the solution on how to use "gbp
> buildpackage" to build the package *using* any uncommitted files
I pointed you to --git-export=WC in that email.

> what  `--git-ignore-new` does or does not.
That is important to understand too, as my impression was you only read
the option name and not its description in the manpage.

--
WBR, wRAR

signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: gbp buildpackage test build with uncommitted changes

Tong Sun-5
On Tue, Mar 19, 2019 at 1:39 PM Andrey Rahmatullin wrote:

>
> On Tue, Mar 19, 2019 at 01:32:46PM -0400, Tong Sun wrote:
> > > Haven't you seen my email with the correct answer?
> >
> > Too short to figure out what you were trying to say.
> I see.
>
> > In my mind the correct answer is the solution on how to use "gbp
> > buildpackage" to build the package *using* any uncommitted files
> I pointed you to --git-export=WC in that email.

Thanks -- `--git-export=WC` is the solution to my problem.

- - - - - - - - - - - - - - -
--git-export=TREEISH

Instead of exporting the current branch head, export the treeish
object TREEISH. The special name INDEX exports the current index
whereas the special name WC exports the current working copy as is.
Note that using WC enables the --git-ignore-branch and
--git-ignore-new options as well since when exporting the working copy
there's no point in enforcing any branch or modification checks.
- - - - - - - - - - - - - - -