Re: [PATCH] remote-bzr: update old organization

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] remote-bzr: update old organization

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:57:15

Felipe Contreras [off-list ref] writes:
If a clone exists with the old organization (v1.8.2) it will prevent the
new shared repository organization from working, so let's remove this
repository, which is not used any more.

Signed-off-by: Felipe Contreras <redacted>
---
What happens with and without this patch to an existing user from
1.8.2 days, when she does what?

A sample answer (to show the level of descriptiveness, not the
content, I am epecting) might go something like "Because the
organization is different, it will barf whenever she tries to
incrementally update from the other side. By removing the old one
1.8.3 contrib/ does not understand, at least we can unstuck her; she
ends up reimporting the whole history, though."

Trying to see if this is a 1.8.3 "fast-track" material.
quoted hunk
 contrib/remote-helpers/git-remote-bzr | 7 +++++++
 1 file changed, 7 insertions(+)
diff --git a/contrib/remote-helpers/git-remote-bzr b/contrib/remote-helpers/git-remote-bzr
index 3e452af..b295dd4 100755
--- a/contrib/remote-helpers/git-remote-bzr
+++ b/contrib/remote-helpers/git-remote-bzr
@@ -830,6 +830,13 @@ def get_repo(url, alias):
         clone_path = os.path.join(dirname, 'clone')
         if not os.path.exists(clone_path):
             os.mkdir(clone_path)
+        else:
+            # check and remove old organization
+            try:
+                bdir = bzrlib.bzrdir.BzrDir.open(clone_path)
+                bdir.destroy_repository()
+            except bzrlib.errors.NotBranchError:
+                pass
 
     try:
         repo = origin.open_repository()

Re: [PATCH] remote-bzr: update old organization

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:15

On Tue, May 14, 2013 at 12:30 PM, Junio C Hamano [off-list ref] wrote:
Felipe Contreras [off-list ref] writes:
quoted
If a clone exists with the old organization (v1.8.2) it will prevent the
new shared repository organization from working, so let's remove this
repository, which is not used any more.

Signed-off-by: Felipe Contreras <redacted>
---
What happens with and without this patch to an existing user from
1.8.2 days, when she does what?
I already explained it would prevent the new shared repository
organization from working, so the old organization would be used; the
repositories won't be shared.
A sample answer (to show the level of descriptiveness, not the
content, I am epecting) might go something like "Because the
organization is different, it will barf whenever she tries to
incrementally update from the other side. By removing the old one
1.8.3 contrib/ does not understand, at least we can unstuck her; she
ends up reimporting the whole history, though."
Bazaar won't barf, the repositories will be duplicated, so the shared
feature won't work.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help