Author Topic: Auto Build Issues  (Read 2236 times)

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Auto Build Issues
« on: December 30, 2015, 01:09:16 PM »
Starting a thread where we can discuss future issues with the Auto Build script, since problems seem to come up with it fairly often.

Latest problem is with the cheat_editor_ui_redesign branch being built (or possibly another branch/ commit being built which the script believes to be that one).  Below are some examples of the problem, and some of the things I have done to diagnose:

$ git checkout master    (can't check out master after checking out cheat_editor_ui_redesign)
Code: [Select]
error: Your local changes to the following files would be overwritten by checkout:
        res/xml/preferences_global.xml
Please, commit your changes or stash them before you can switch branches.
Aborting

$ git checkout --force master    (but will if I use --force)
Code: [Select]
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.

$ git status    (no issues yet)
Code: [Select]
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working directory clean

$ git checkout cheat_editor_ui_redesign    (check out cheat_editor_ui_redesign again)
Code: [Select]
Switched to branch 'cheat_editor_ui_redesign'
Your branch is up-to-date with 'origin/cheat_editor_ui_redesign'.

$ git status    (problem seems to have returned)
Code: [Select]
On branch cheat_editor_ui_redesign
Your branch is up-to-date with 'origin/cheat_editor_ui_redesign'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   res/xml/preferences_global.xml

no changes added to commit (use "git add" and/or "git commit -a")

$ git checkout master    (can't check out master again)
Code: [Select]
error: Your local changes to the following files would be overwritten by checkout:
        res/xml/preferences_global.xml
Please, commit your changes or stash them before you can switch branches.
Aborting

$ git checkout -- res/xml/preferences_global.xml    (this should overwrite local changes for that file)
$ git checkout master    (but no dice)
Code: [Select]
error: Your local changes to the following files would be overwritten by checkout:
        res/xml/preferences_global.xml
Please, commit your changes or stash them before you can switch branches.
Aborting

$ git stash    (this should also discard local changes .. interesting output here)
Code: [Select]
warning: CRLF will be replaced by LF in res/xml/preferences_global.xml.
The file will have its original line endings in your working directory.
warning: CRLF will be replaced by LF in res/xml/preferences_global.xml.
The file will have its original line endings in your working directory.
Saved working directory and index state WIP on cheat_editor_ui_redesign: 144134a front: Made preference activities navigational using a controller.
HEAD is now at 144134a front: Made preference activities navigational using a controller.

$ git checkout master    (didn't help, but the previous output looks relevant)
Code: [Select]
error: Your local changes to the following files would be overwritten by checkout:
        res/xml/preferences_global.xml
Please, commit your changes or stash them before you can switch branches.
Aborting

So this looks like an issue with line-endings for file res/xml/preferences_global.xml (that dern Windows versus Linux issue).  As you can see from one of the steps above, I could potentially work around the issue by using --force option on the call to checkout each branch, but I would like to resolve the problem "correctly" if possible.  Maybe there is an issue with the repository's .gitattributes file, or with my local git settings on the auto-build machine?  Do any of you all have some knowledge of Git and line-ending issues like this one?
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline fzurita

  • Moderator
  • double
  • *****
  • Posts: 558
    • View Profile
Re: Auto Build Issues
« Reply #1 on: December 30, 2015, 07:08:55 PM »
A quick Google search led to this page. It may be worth a try:

https://help.github.com/articles/dealing-with-line-endings/

Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3495
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Auto Build Issues
« Reply #2 on: December 30, 2015, 08:49:48 PM »
Yes, I have seen that, but it isn't really clear to me what the settings should be to address this specific issue.  It gives various options for how to specify how you want the line endings to be for particular files, but doesn't go into what to use to solve a problem like this one here.  I'll probably just have to play around with it until I find a configuration that works.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted