jueyunqi / git-repo

Automatically exported from code.google.com/p/git-repo
Apache License 2.0
0 stars 0 forks source link

Repo init -b <branch> is no longer working on Repo version 1.17 if it's used on any branch other than "master" #113

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Affected Version: 1.17
Environment: Ubuntu 11.10

What steps will reproduce the problem?
1.repo init -u ssh://our_local_mirror/projects/ABC -b local
2.repo sync

What is the expected output? What do you see instead?
The manifest.xml should be pointing to the 'local' branch copy instead of the 
'master'

What is the actual output?
The manifest.xml is switched to "no branch" state and force it back to 'master' 
branch instead of the "-b local" I had specified.

Please provide any additional information below.

Our group is using Repo tool to manage some of our projects, and some projects 
are used as a mirror from other upstream sources.

We normally follow this process when using 'repo init -u URL -b branch' for our 
project.

We saw one of your changes (see below) that might be having some different 
behaviours than what's working for us in the past, but no longer working.  We 
are trying to see the actual reason behind this change and want to know what we 
should do going forward.

This is our process:

We have a mirror project that's mirroring with an upstream project, hence, we 
have a "local" branch of the manifest, and a "master" branch of the manifest. 
Our local branch of the manifest is pointing to your local mirror Gerrit server.

We normally use this workflow:

1) repo init -u ssh://our_local_mirror/projects/ABC -b local
2) repo sync
The manifest file we wanted to use should be from the branch "local".
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <notice>
    Your sources have been sync'd successfully.
  </notice>
  <remote fetch="ssh://192.168.1.52:29418/external/projects/ABC/"
          name="local_mirror"
          review="http://192.168.1.52/"/
  <default remote="local_mirror" />
3) run some builds

This is what we are seeing:

However, after the "repo sync", we found our manifest.xml is changed back to 
the copy from our upstream (master), it is not using the our "-b local" branch.
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote  name="upstream"
           fetch="http://abc.samsung.com/test"
           review="gerrit.abc.samsung.com/gerrit" />
  <default revision="refs/heads/master"
           remote="upstream" />

We found that now we might be need to use "-d" option for "init", but we had 
tried although nothing has seems to work for us.
Please advise what we should be doing continue forward.

Original issue reported on code.google.com by s.x...@sta.samsung.com on 22 Jun 2012 at 6:31

GoogleCodeExporter commented 8 years ago
This can be closed this functionality has worked for a long while...

If it isn't working, then maintenance of the local repository's 'local' branch 
should be checked.

Original comment by ferringb on 24 Jun 2012 at 11:44

GoogleCodeExporter commented 8 years ago
The 'local' branch is checked into the server Git. It is still *not* working.

So I want to know what else I should need to do to get this either fix or 
workaround in the meantime.

Thanks.

Original comment by s.x...@sta.samsung.com on 25 Jun 2012 at 6:10