* [PATCH 0/1] git.py: create a branch when checkout @ 2015-07-07 1:33 Robert Yang 2015-07-07 1:33 ` [PATCH 1/1] " Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2015-07-07 1:33 UTC (permalink / raw) To: bitbake-devel The following changes since commit 7a402301c9c8fa9a5262d6d29b2ea199ff0dc07a: distro/package_regex.inc: Use GNOME_STABLE rule for vala (2015-07-02 23:08:41 +0100) are available in the git repository at: git://git.pokylinux.org/poky-contrib rbt/git http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=rbt/git Robert Yang (1): git.py: create a branch when checkout bitbake/lib/bb/fetch2/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] git.py: create a branch when checkout 2015-07-07 1:33 [PATCH 0/1] git.py: create a branch when checkout Robert Yang @ 2015-07-07 1:33 ` Robert Yang 2015-07-07 15:17 ` Richard Purdie 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2015-07-07 1:33 UTC (permalink / raw) To: bitbake-devel Create a branch named oebuild_SRCREV when checkout the source, this makes debug easier than "(no branch)" when look into the source. Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- bitbake/lib/bb/fetch2/git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index 2e53882..12087dd 100644 --- a/bitbake/lib/bb/fetch2/git.py +++ b/bitbake/lib/bb/fetch2/git.py @@ -280,7 +280,8 @@ class Git(FetchMethod): runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.revisions[ud.names[0]], readpathspec), d) runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, d) else: - runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d) + runfetchcmd("%s checkout %s -b oebuild_%s" % (ud.basecmd, \ + ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d) return True def clean(self, ud, d): -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] git.py: create a branch when checkout 2015-07-07 1:33 ` [PATCH 1/1] " Robert Yang @ 2015-07-07 15:17 ` Richard Purdie 2015-07-07 16:56 ` Paul Eggleton 0 siblings, 1 reply; 7+ messages in thread From: Richard Purdie @ 2015-07-07 15:17 UTC (permalink / raw) To: Robert Yang; +Cc: bitbake-devel On Mon, 2015-07-06 at 18:33 -0700, Robert Yang wrote: > Create a branch named oebuild_SRCREV when checkout the source, this > makes debug easier than "(no branch)" when look into the source. > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > --- > bitbake/lib/bb/fetch2/git.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py > index 2e53882..12087dd 100644 > --- a/bitbake/lib/bb/fetch2/git.py > +++ b/bitbake/lib/bb/fetch2/git.py > @@ -280,7 +280,8 @@ class Git(FetchMethod): > runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.revisions[ud.names[0]], readpathspec), d) > runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, d) > else: > - runfetchcmd("%s checkout %s" % (ud.basecmd, ud.revisions[ud.names[0]]), d) > + runfetchcmd("%s checkout %s -b oebuild_%s" % (ud.basecmd, \ > + ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d) > return True Would it not make more sense to set the branch to the upstream branch name here? Cheers, Richard ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] git.py: create a branch when checkout 2015-07-07 15:17 ` Richard Purdie @ 2015-07-07 16:56 ` Paul Eggleton 2015-07-08 1:28 ` Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Paul Eggleton @ 2015-07-07 16:56 UTC (permalink / raw) To: Robert Yang; +Cc: bitbake-devel On Tuesday 07 July 2015 16:17:42 Richard Purdie wrote: > On Mon, 2015-07-06 at 18:33 -0700, Robert Yang wrote: > > Create a branch named oebuild_SRCREV when checkout the source, this > > makes debug easier than "(no branch)" when look into the source. > > > > Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > > --- > > > > bitbake/lib/bb/fetch2/git.py | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py > > index 2e53882..12087dd 100644 > > --- a/bitbake/lib/bb/fetch2/git.py > > +++ b/bitbake/lib/bb/fetch2/git.py > > > > @@ -280,7 +280,8 @@ class Git(FetchMethod): > > runfetchcmd("%s read-tree %s%s" % (ud.basecmd, > > ud.revisions[ud.names[0]], readpathspec), d) > > runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, > > d) > > > > else: > > - runfetchcmd("%s checkout %s" % (ud.basecmd, > > ud.revisions[ud.names[0]]), d) + runfetchcmd("%s checkout > > %s -b oebuild_%s" % (ud.basecmd, \ + > > ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d)> > > return True > > Would it not make more sense to set the branch to the upstream branch > name here? I'd go one step further, use the upstream branch name and also set it to track the remote branch as well. Cheers, Paul -- Paul Eggleton Intel Open Source Technology Centre ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] git.py: create a branch when checkout 2015-07-07 16:56 ` Paul Eggleton @ 2015-07-08 1:28 ` Robert Yang 2015-07-08 8:28 ` Richard Purdie 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2015-07-08 1:28 UTC (permalink / raw) To: Paul Eggleton; +Cc: bitbake-devel On 07/08/2015 12:56 AM, Paul Eggleton wrote: > On Tuesday 07 July 2015 16:17:42 Richard Purdie wrote: >> On Mon, 2015-07-06 at 18:33 -0700, Robert Yang wrote: >>> Create a branch named oebuild_SRCREV when checkout the source, this >>> makes debug easier than "(no branch)" when look into the source. >>> >>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> >>> --- >>> >>> bitbake/lib/bb/fetch2/git.py | 3 ++- >>> 1 file changed, 2 insertions(+), 1 deletion(-) >>> >>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py >>> index 2e53882..12087dd 100644 >>> --- a/bitbake/lib/bb/fetch2/git.py >>> +++ b/bitbake/lib/bb/fetch2/git.py >>> >>> @@ -280,7 +280,8 @@ class Git(FetchMethod): >>> runfetchcmd("%s read-tree %s%s" % (ud.basecmd, >>> ud.revisions[ud.names[0]], readpathspec), d) >>> runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, >>> d) >>> >>> else: >>> - runfetchcmd("%s checkout %s" % (ud.basecmd, >>> ud.revisions[ud.names[0]]), d) + runfetchcmd("%s checkout >>> %s -b oebuild_%s" % (ud.basecmd, \ + >>> ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d)> >>> return True >> >> Would it not make more sense to set the branch to the upstream branch >> name here? > > I'd go one step further, use the upstream branch name and also set it to track > the remote branch as well. Hi Paul and RP, I'm afraid that the ud.revisions[ud.names[0]] which is SRCREV may not point to an upstream branch or tag, please ? // Robert > > Cheers, > Paul > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] git.py: create a branch when checkout 2015-07-08 1:28 ` Robert Yang @ 2015-07-08 8:28 ` Richard Purdie 2015-07-09 5:57 ` Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Richard Purdie @ 2015-07-08 8:28 UTC (permalink / raw) To: Robert Yang; +Cc: Paul Eggleton, bitbake-devel On Wed, 2015-07-08 at 09:28 +0800, Robert Yang wrote: > > On 07/08/2015 12:56 AM, Paul Eggleton wrote: > > On Tuesday 07 July 2015 16:17:42 Richard Purdie wrote: > >> On Mon, 2015-07-06 at 18:33 -0700, Robert Yang wrote: > >>> Create a branch named oebuild_SRCREV when checkout the source, this > >>> makes debug easier than "(no branch)" when look into the source. > >>> > >>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> > >>> --- > >>> > >>> bitbake/lib/bb/fetch2/git.py | 3 ++- > >>> 1 file changed, 2 insertions(+), 1 deletion(-) > >>> > >>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py > >>> index 2e53882..12087dd 100644 > >>> --- a/bitbake/lib/bb/fetch2/git.py > >>> +++ b/bitbake/lib/bb/fetch2/git.py > >>> > >>> @@ -280,7 +280,8 @@ class Git(FetchMethod): > >>> runfetchcmd("%s read-tree %s%s" % (ud.basecmd, > >>> ud.revisions[ud.names[0]], readpathspec), d) > >>> runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, > >>> d) > >>> > >>> else: > >>> - runfetchcmd("%s checkout %s" % (ud.basecmd, > >>> ud.revisions[ud.names[0]]), d) + runfetchcmd("%s checkout > >>> %s -b oebuild_%s" % (ud.basecmd, \ + > >>> ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d)> > >>> return True > >> > >> Would it not make more sense to set the branch to the upstream branch > >> name here? > > > > I'd go one step further, use the upstream branch name and also set it to track > > the remote branch as well. > > Hi Paul and RP, > > I'm afraid that the ud.revisions[ud.names[0]] which is SRCREV may > not point to an upstream branch or tag, please ? ud.revisions might not, but ud.branches should. I think you want something like: branchcmd = "" if not ud.nobranch: branchcmd = "-b %s" % ud.branches[ud.names[0]] runfetchcmd("%s checkout %s %s" % (ud.basecmd, ud.revisions[ud.names[0]], branchcmd), d) However as Paul notes, setting it to track the upstream remote branch would also be ideal. Cheers, Richard ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] git.py: create a branch when checkout 2015-07-08 8:28 ` Richard Purdie @ 2015-07-09 5:57 ` Robert Yang 0 siblings, 0 replies; 7+ messages in thread From: Robert Yang @ 2015-07-09 5:57 UTC (permalink / raw) To: Richard Purdie; +Cc: Paul Eggleton, bitbake-devel Thanks, I will send a V2. // Robert On 07/08/2015 04:28 PM, Richard Purdie wrote: > On Wed, 2015-07-08 at 09:28 +0800, Robert Yang wrote: >> >> On 07/08/2015 12:56 AM, Paul Eggleton wrote: >>> On Tuesday 07 July 2015 16:17:42 Richard Purdie wrote: >>>> On Mon, 2015-07-06 at 18:33 -0700, Robert Yang wrote: >>>>> Create a branch named oebuild_SRCREV when checkout the source, this >>>>> makes debug easier than "(no branch)" when look into the source. >>>>> >>>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> >>>>> --- >>>>> >>>>> bitbake/lib/bb/fetch2/git.py | 3 ++- >>>>> 1 file changed, 2 insertions(+), 1 deletion(-) >>>>> >>>>> diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py >>>>> index 2e53882..12087dd 100644 >>>>> --- a/bitbake/lib/bb/fetch2/git.py >>>>> +++ b/bitbake/lib/bb/fetch2/git.py >>>>> >>>>> @@ -280,7 +280,8 @@ class Git(FetchMethod): >>>>> runfetchcmd("%s read-tree %s%s" % (ud.basecmd, >>>>> ud.revisions[ud.names[0]], readpathspec), d) >>>>> runfetchcmd("%s checkout-index -q -f -a" % ud.basecmd, >>>>> d) >>>>> >>>>> else: >>>>> - runfetchcmd("%s checkout %s" % (ud.basecmd, >>>>> ud.revisions[ud.names[0]]), d) + runfetchcmd("%s checkout >>>>> %s -b oebuild_%s" % (ud.basecmd, \ + >>>>> ud.revisions[ud.names[0]], ud.revisions[ud.names[0]]), d)> >>>>> return True >>>> >>>> Would it not make more sense to set the branch to the upstream branch >>>> name here? >>> >>> I'd go one step further, use the upstream branch name and also set it to track >>> the remote branch as well. >> >> Hi Paul and RP, >> >> I'm afraid that the ud.revisions[ud.names[0]] which is SRCREV may >> not point to an upstream branch or tag, please ? > > ud.revisions might not, but ud.branches should. I think you want > something like: > > branchcmd = "" > if not ud.nobranch: > branchcmd = "-b %s" % ud.branches[ud.names[0]] > runfetchcmd("%s checkout %s %s" % (ud.basecmd, ud.revisions[ud.names[0]], branchcmd), d) > > However as Paul notes, setting it to track the upstream remote branch > would also be ideal. > > Cheers, > > Richard > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-07-09 5:57 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-07-07 1:33 [PATCH 0/1] git.py: create a branch when checkout Robert Yang 2015-07-07 1:33 ` [PATCH 1/1] " Robert Yang 2015-07-07 15:17 ` Richard Purdie 2015-07-07 16:56 ` Paul Eggleton 2015-07-08 1:28 ` Robert Yang 2015-07-08 8:28 ` Richard Purdie 2015-07-09 5:57 ` Robert Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox