Bench update with git custom apps

I.

I made my app base_vat with local git support to put in my github repository.

So when i bench update i get this error: 

subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1

I realize that the error is because my app folder .git.

So i patch the code in bench/app.py with a try except block and every thing goes well:

if os.path.exists(os.path.join(app_dir, '.git')):

                        logger.info('pulling {0}'.format(app))

                        try:

                                exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)

                        except:

                                logger.info("this app {} doesn't seem to have a upstream to frappe framework".format(app))

                                logger.info('going to next app')

                                continue


Is this correct or it is not supposed to use git with my app?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e6865db6-6ff1-4e5e-813d-ba495c3faa44%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.

"Upstream" is hardcoded as the remote name. Maybe, that's the issue.

On 20 Sep 2014 15:55, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I made my app base_vat with local git support to put in my github repository.

So when i bench update i get this error:

subprocess.CalledProcessError: Command 'git pull upstream HEAD' returned non-zero exit status 1

I realize that the error is because my app folder .git.

So i patch the code in bench/app.py with a try except block and every thing goes well:

if os.path.exists(os.path.join(app_dir, '.git')):

logger.info('pulling {0}'.format(app))

try:

exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)

except:

logger.info("this app {} doesn't seem to have a upstream to frappe framework".format(app))

logger.info('going to next app')

continue


Is this correct or it is not supposed to use git with my app?



Note:



If you are posting an issue,


  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.



    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e6865db6-6ff1-4e5e-813d-ba495c3faa44%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.
I think that is the problem.

So i do in my base_vat app git remote add upstream https://github.com/saguas/frappe_base_vat.git

Thanks.

Sábado, 20 de Setembro de 2014 11:33:34 UTC+1, Pratik Vyas escreveu:

"Upstream" is hardcoded as the remote name. Maybe, that's the issue.

On 20 Sep 2014 15:55, "Luis Fernandes" <lu...@gmail.com> wrote:
I.

I made my app base_vat with local git support to put in my github repository.

So when i bench update i get this error: 

subprocess.CalledProcessError: Command 'git pull  upstream HEAD' returned non-zero exit status 1

I realize that the error is because my app folder .git.

So i patch the code in bench/app.py with a try except block and every thing goes well:

if os.path.exists(os.path.join(app_dir, '.git')):

                        logger.info('pulling {0}'.format(app))

                        try:

                                exec_cmd("git pull {rebase} upstream HEAD".format(rebase=rebase), cwd=app_dir)

                        except:

                                logger.info("this app {} doesn't seem to have a upstream to frappe framework".format(app))

                                logger.info('going to next app')

                                continue


Is this correct or it is not supposed to use git with my app?



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups “ERPNext Developer Forum” group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/e6865db6-6ff1-4e5e-813d-ba495c3faa44%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.



Note:

 

If you are posting an issue,

 

  1. ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
  2. We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
  3. Paste your code at http://pastebin.com or http://gist.github.com and send only the URL via email
  4. For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.

     

    End of Note



    You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.

    To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer-forum+un…@googlegroups.com.

    To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/868ae4d6-1820-4ebb-88f0-eba76920d288%40googlegroups.com.

    For more options, visit https://groups.google.com/d/optout.