Closed GoogleCodeExporter closed 9 years ago
Original comment by sop+code@google.com
on 24 Sep 2009 at 11:06
Is there any update on this issue?
Today I tried switching manifest branches using repo init -b and I still see
the same issue:
-----------------------
project .repo/manifests/
First, rewinding head to replay your work on top of it...
Applying: Update the default manifest
Using index info to reconstruct a base tree...
Falling back to patching base and 3-way merge...
Auto-merging default.xml
CONFLICT (content): Merge conflict in default.xml
Failed to merge in the changes.
Patch failed at 0001 Update the default manifest
When you have resolved this problem run "git rebase --continue".
If you would prefer to skip this patch, instead run "git rebase --skip".
To restore the original branch and stop rebasing run "git rebase --abort".
fatal: cannot create default in manifest
---------------------------
Is there any known workaround that we can use to switch between manifest
branches via repo?
Thanks in advance
Original comment by jla...@gmail.com
on 4 Oct 2010 at 6:20
One work around is to delete the "default" branch before switching branches /
advancing to the next tag. I've implemented this in a repo plugin for Jenkins
but this workaround is not ideal and is fragile to changes in repo
implementation.
https://github.com/tgover1/repo-plugin
Original comment by timgo...@gmail.com
on 13 Dec 2011 at 12:43
I pushed a patch proposal to the review server here :
https://gerrit-review.googlesource.com/35900
It basically implements the solution from comment #3 directly into repo
Original comment by Florian....@gmail.com
on 7 Jun 2012 at 3:24
Fixed in repo 1.9.4
Original comment by sop@google.com
on 13 Jun 2012 at 5:01
Still pretty busted actually:
Take a look at the results of running:
for x in master release-R20-2268.B master release-R20-2268.B{,} \
master{,,}; do
repo init -u https://git.chromium.org/chromiumos/manifest.git -b $x;
git config -f .repo/manifests/.git/config --get-regexp \
'branch\.default\..*'
git --git-dir .repo/manifests/.git symbolic-ref HEAD;
echo echo
done
Specifically, track the remote/merge settings; they toggle, sometimes there,
sometimes not across re-inits; this breaks the git configuration itself, and
there are cases I've seen where there is *no* merge/origin output (and it's
left itself on detached HEAD); haven't ran down the cause yet.
This is still broken.
Original comment by ferringb
on 20 Jun 2012 at 12:03
Our group in Samsung 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 comment by s.x...@sta.samsung.com
on 21 Jun 2012 at 6:12
I'm seeing problems with the fix for this issue.
If I run "repo init -u <url> -b <branch> -m <manifest>; repo sync -j5; repo
init -u <url> -b <branch> -m <manifest>; repo sync -j5" I get the following
error on the second sync:
username@machine:~/Workspace/mydroid$ repo sync -j5
.repo/manifests/: leaving default; does not track upstream
Traceback (most recent call last):
File "/home/username/Workspace/mydroid/.repo/repo/main.py", line 385, in <module>
_Main(sys.argv[1:])
File "/home/username/Workspace/mydroid/.repo/repo/main.py", line 365, in _Main
result = repo._Run(argv) or 0
File "/home/username/Workspace/mydroid/.repo/repo/main.py", line 137, in _Run
result = cmd.Execute(copts, cargs)
File "/home/username/Workspace/mydroid/.repo/repo/subcmds/sync.py", line 431, in Execute
all = self.GetProjects(args, missing_ok=True)
File "/home/username/Workspace/mydroid/.repo/repo/command.py", line 66, in GetProjects
all = self.manifest.projects
File "/home/username/Workspace/mydroid/.repo/repo/manifest_xml.py", line 235, in projects
self._Load()
File "/home/username/Workspace/mydroid/.repo/repo/manifest_xml.py", line 287, in _Load
self.manifestProject.worktree))
File "/home/username/Workspace/mydroid/.repo/repo/manifest_xml.py", line 302, in _ParseManifestXml
root = xml.dom.minidom.parse(path)
File "/usr/lib/python2.6/xml/dom/minidom.py", line 1918, in parse
return expatbuilder.parse(file)
File "/usr/lib/python2.6/xml/dom/expatbuilder.py", line 922, in parse
fp = open(file, 'rb')
IOError: [Errno 2] No such file or directory:
'/home/username/Workspace/mydroid/.repo/manifest.xml'
When I roll back to a version of repo prior to the below commit, I do not see
this error.
commit 5d016502ebc68bc054d85c98c6cdb51e0b63a1f5
Author: Florian Vallee <florian.vallee@gmail.com>
Date: Thu Jun 7 17:19:26 2012 +0200
Fix switching manifest branches using repo init -b
See repo issue #46 :
https://code.google.com/p/git-repo/issues/detail?id=46
When using repo init -b on an already existing repository,
the next sync will try to rebase changes coming from the old manifest
branch onto the new, leading in the best case scenario to conflicts
and in the worst case scenario to an incorrect "mixed up" manifest.
This patch fixes this by deleting the "default" branch in the local
manifest repository when the -d init switch is used, thus forcing
repo to perform a fresh checkout of the new manifest branch
Change-Id: I379e4875ec5357d8614d1197b6afbe58f9606751
Original comment by ma...@bornski.com
on 29 Jun 2012 at 9:00
Original issue reported on code.google.com by
code-rev...@gtempaccount.com
on 24 Sep 2009 at 9:10