Giter Site home page Giter Site logo

Comments (3)

jcpetruzza avatar jcpetruzza commented on July 18, 2024 1

Oh, I see. Marge is actually trying to merge onto your 3.10 branch. It is when cleaning up that we try to remove the source branch from the local repo and for that we need to first checkout something else and for that we assume a branched called master to exist.

from marge-bot.

jcpetruzza avatar jcpetruzza commented on July 18, 2024

I don't think we are hard-coding master anywhere. You indicate the target branch on GitLab when you create the merge-request (which by default will be master). Will that work for you?

from marge-bot.

alexandear avatar alexandear commented on July 18, 2024

Yes, there are two places where master is hardcoded:

.git.py

def remove_branch(self, branch):
    assert branch != 'master'
    self.git('checkout', 'master', '--')
    self.git('branch', '-D', branch)
job.py

if source_branch != 'master':
    repo.remove_branch(source_branch)
else:
    assert source_repo_url is not None

How to reproduce

Create MR in GitLab. Target branch is not master, e.g. 3.10.

image

Then assign MR to Marge Bot.

Expected result

Marge Bot merges source branch into target branch 3.10.

Current result

Exception occured:

2018-03-02 18:17:25,096 INFO Running git clone --origin=origin git@gitlab/MessagesTransceiver.git 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1'
2018-03-02 18:18:31,330 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' config user.email [email protected]
2018-03-02 18:18:31,957 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' config user.name 'Marge Bot'
2018-03-02 18:18:31,981 INFO Processing !8 - 'Remove using namespace'
2018-03-02 18:18:32,188 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' fetch --prune origin
2018-03-02 18:18:35,721 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout -B refactor/removeUsingNamespace origin/refactor/removeUsingNamespace --
2018-03-02 18:18:35,892 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rebase origin/3.10
2018-03-02 18:18:43,460 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rev-parse HEAD
2018-03-02 18:18:43,568 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout refactor/removeUsingNamespace --
2018-03-02 18:18:43,596 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' diff-index --quiet HEAD
2018-03-02 18:18:43,628 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' ls-files --others
2018-03-02 18:18:43,740 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' push --force origin refactor/removeUsingNamespace
2018-03-02 18:18:45,010 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' rev-parse origin/3.10
2018-03-02 18:18:45,032 INFO Running git -C 'C:\Users\ADMINI~1\AppData\Local\Temp\tmp81lxjhwu\tmp59d9phm1' checkout master --
2018-03-02 18:18:45,071 WARNING git returned 128
2018-03-02 18:18:45,071 WARNING stdout: b''
2018-03-02 18:18:45,071 WARNING stderr: b'fatal: invalid reference: master\n'
2018-03-02 18:18:45,071 ERROR Unexpected Git error
Traceback (most recent call last):
  File "C:\marge-bot\marge\git.py", line 163, in git
    return _run(*command, env=env, check=True, timeout=timeout_seconds)
  File "C:\marge-bot\marge\git.py", line 189, in _run
    retcode, process.args, output=stdout, stderr=stderr,
subprocess.CalledProcessError: Command '('git', '-C', 'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp

from marge-bot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.