Re: bzr repository upgraded to 2a format and restructured

2012-10-16 Thread Henrik Nordström
tis 2012-10-16 klockan 05:39 +0200 skrev Eliezer Croitoru:

 I did that already and I get error while updating:
 ##start
 $ bzr update
 Doing on-the-fly conversion from RepositoryFormat2a() to 
 RepositoryFormatKnitPack6(). 
 
 This may take some time. Upgrade the repositories to the same format for 
 better performance.
 bzr: ERROR: 
 KnitPackRepository('file:///home/eliezer/squid-repo/.bzr/repository/') 
 
 is not compatible with
 CHKInventoryRepository('http://bzr.squid-cache.org/bzr/squid3/.bzr/repository/')
 different rich-root support
 ##end

Is this a old bound branch automatically pulling changes from the master
repository? Then unbind it using bzr unbind.

There is no need to update any old branches. But it's best if your
working tree is all committed to your local branch.

 it's kind of weird since for the new branch seems to work fine with 
 updates and everything.

Good. Now you just merge over your old branch(es) into the new
repository.

I am assuming you have locally committed your changes to your local
repository? If not then you need to merge changes from the working
directory (--uncommitted flag to bzr merge)

Regards
Henrik



Re: bzr repository upgraded to 2a format and restructured

2012-10-16 Thread Eliezer Croitoru

On 10/16/2012 6:00 AM, Alex Rousskov wrote:


It looks like you failed to upgrade your local repository and/or the
trunk checkout. I am not sure which directory you typed the above
commands in, but what output do the following commands produce?

 cd/home/eliezer/squid-repo/
 bzr upgrade

 cd/path/to/local/trunk-checkout/
 bzr upgrade




it's kind of weird since for the new branch seems to work fine with
updates and everything.

Perhaps your old setup was using old format because official Squid
repositories were using old format. Your new branch (or is it a
checkout?) is using new format because the current official Squid
repositories are using new format.



Thanks Alex,

I upgraded the squid-repo first and then the check-out and it seems to 
work fine.


Eliezer


Re: bzr repository upgraded to 2a format and restructured

2012-10-15 Thread Eliezer Croitoru

On 9/13/2012 1:25 AM, Henrik Nordström wrote:

As per prior discussions the bzr repository have now been upgraded to 2a
format.

New master repository layout is a flat layout with branches

trunk
3.2
3.1
3.0

more branches will be migrated over on a need basis.

There is also branches/... symlinks in place so old branch URLs continue
to work as well for those branches.

Unfortunately upgrading to 2a means you need to upgrade your local
repository as well if you haven't already or you won't be able to pull
changes from the master repository. There is a couple of methods for
doing that depending on if you are impatient or lazy

The simple but slow method is by running

   bzr upgrade --2a

I used CHECKOUT and it seems to not work.
I give the upgrade --2a and then update and it's showing some error 
which seems to me better to not solve and instead just use a new branch.




this will upgrade your repository in-place to 2a format, but due to the
fairly long history of Squid it takes a while as it replays the whole
history to the new format.

A somewhat faster method is to create a new repository branching from
the master 2a repository, and then migrate over your branches there. An
example of that follows

   bzr init-repo squid-new

   bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/trunk squid-new/trunk

   bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/3.2 squid-new/3.2

   [repeat for each version you need]

   bzr branch path/to/local-branch-1 squid-new/local-branch-1

   [repeat for each local branch]


I initialized a branch and I have diff from revision 12317.
How would I patch the branch?
now it's on revision 12396.

Thanks for the help
Eliezer


Re: bzr repository upgraded to 2a format and restructured

2012-10-15 Thread Amos Jeffries

On 16.10.2012 14:39, Eliezer Croitoru wrote:

On 9/13/2012 1:25 AM, Henrik Nordström wrote:
As per prior discussions the bzr repository have now been upgraded 
to 2a

format.

New master repository layout is a flat layout with branches

trunk
3.2
3.1
3.0

more branches will be migrated over on a need basis.

There is also branches/... symlinks in place so old branch URLs 
continue

to work as well for those branches.

Unfortunately upgrading to 2a means you need to upgrade your local
repository as well if you haven't already or you won't be able to 
pull

changes from the master repository. There is a couple of methods for
doing that depending on if you are impatient or lazy

The simple but slow method is by running

   bzr upgrade --2a

I used CHECKOUT and it seems to not work.
I give the upgrade --2a and then update and it's showing some error
which seems to me better to not solve and instead just use a new
branch.



this will upgrade your repository in-place to 2a format, but due to 
the
fairly long history of Squid it takes a while as it replays the 
whole

history to the new format.

A somewhat faster method is to create a new repository branching 
from
the master 2a repository, and then migrate over your branches there. 
An

example of that follows

   bzr init-repo squid-new

   bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/trunk 
squid-new/trunk


   bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/3.2 
squid-new/3.2


   [repeat for each version you need]

   bzr branch path/to/local-branch-1 squid-new/local-branch-1

   [repeat for each local branch]


I initialized a branch and I have diff from revision 12317.
How would I patch the branch?
now it's on revision 12396.


  cd /path/to/local/trunk/checkout
  bzr update

  cd /your/branch/directory
  bzr merge /path/to/local/trunk/checkout(squid-new/trunk in the 
above example)


then resolve any conflicts, commit (we usually label such merges merge 
from trunk) and re-test.


Amos


Re: bzr repository upgraded to 2a format and restructured

2012-10-15 Thread Eliezer Croitoru

On 10/16/2012 3:48 AM, Amos Jeffries wrote:

   cd /path/to/local/trunk/checkout
   bzr update

   cd /your/branch/directory
   bzr merge /path/to/local/trunk/checkout(squid-new/trunk in the
above example)

I did that already and I get error while updating:
##start
$ bzr update
Doing on-the-fly conversion from RepositoryFormat2a() to 
RepositoryFormatKnitPack6(). 

This may take some time. Upgrade the repositories to the same format for 
better performance.
bzr: ERROR: 
KnitPackRepository('file:///home/eliezer/squid-repo/.bzr/repository/') 


is not compatible with
CHKInventoryRepository('http://bzr.squid-cache.org/bzr/squid3/.bzr/repository/')
different rich-root support
##end

it's kind of weird since for the new branch seems to work fine with 
updates and everything.


I was thinking of maybe reverting the new repo to older revision(since 
it's 600 + patch) and then patch it using the diff file I have as last 
resort but I have never done something like that(which can might have 
side effects).


I'm not such a big user of patch but I have seen before that it can be 
used to patch newer versions if nothing major was done to the source 
files in the patch.


Any help welcome.



then resolve any conflicts, commit (we usually label such merges merge
from trunk) and re-test.

Amos


Thanks,
Eliezer


Re: bzr repository upgraded to 2a format and restructured

2012-10-15 Thread Alex Rousskov
On 10/15/2012 09:39 PM, Eliezer Croitoru wrote:

 I give the upgrade --2a and then update and it's showing some error
 which seems to me better to not solve and instead just use a new
 branch.

Please always paste the errors when reporting a problem, especially when
unsure what they mean.


 On 10/16/2012 3:48 AM, Amos Jeffries wrote:
cd /path/to/local/trunk/checkout
bzr update

cd /your/branch/directory
bzr merge /path/to/local/trunk/checkout(squid-new/trunk in the
 above example)
 I did that already and I get error while updating:
 ##start
 $ bzr update
 Doing on-the-fly conversion from RepositoryFormat2a() to
 RepositoryFormatKnitPack6().
 This may take some time. Upgrade the repositories to the same format for
 better performance.
 bzr: ERROR:
 KnitPackRepository('file:///home/eliezer/squid-repo/.bzr/repository/')
 is not compatible with
 CHKInventoryRepository('http://bzr.squid-cache.org/bzr/squid3/.bzr/repository/')
 
 different rich-root support
 ##end


It looks like you failed to upgrade your local repository and/or the
trunk checkout. I am not sure which directory you typed the above
commands in, but what output do the following commands produce?

cd /home/eliezer/squid-repo/
bzr upgrade

cd /path/to/local/trunk-checkout/
bzr upgrade



 it's kind of weird since for the new branch seems to work fine with
 updates and everything.

Perhaps your old setup was using old format because official Squid
repositories were using old format. Your new branch (or is it a
checkout?) is using new format because the current official Squid
repositories are using new format.


 I was thinking of maybe reverting the new repo to older revision(since
 it's 600 + patch) and then patch it using the diff file I have as last
 resort but I have never done something like that(which can might have
 side effects).
 
 I'm not such a big user of patch but I have seen before that it can be
 used to patch newer versions if nothing major was done to the source
 files in the patch.

Patch is just a set of replace that line with this line directives
plus context. You can patch anything that has the same context. The
patch command does not know about bzr, trunk, branches, etc.

Nevertheless, you need to use a format=2a bzr setup (one way or another)
so that you can generate and test patches against current Squid sources.


HTH,

Alex.



bzr repository upgraded to 2a format and restructured

2012-09-12 Thread Henrik Nordström
As per prior discussions the bzr repository have now been upgraded to 2a
format.

New master repository layout is a flat layout with branches

   trunk
   3.2
   3.1
   3.0

more branches will be migrated over on a need basis.

There is also branches/... symlinks in place so old branch URLs continue
to work as well for those branches.

Unfortunately upgrading to 2a means you need to upgrade your local
repository as well if you haven't already or you won't be able to pull
changes from the master repository. There is a couple of methods for
doing that depending on if you are impatient or lazy

The simple but slow method is by running

  bzr upgrade --2a

this will upgrade your repository in-place to 2a format, but due to the
fairly long history of Squid it takes a while as it replays the whole
history to the new format.

A somewhat faster method is to create a new repository branching from
the master 2a repository, and then migrate over your branches there. An
example of that follows

  bzr init-repo squid-new

  bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/trunk squid-new/trunk

  bzr branch bzr+ssh://bzr.squid-cache.org/bzr/squid3/3.2 squid-new/3.2

  [repeat for each version you need]

  bzr branch path/to/local-branch-1 squid-new/local-branch-1

  [repeat for each local branch]

exact details differ slightly depending on what kind of local repository
 branch model you use. Feel free to grab me (or perhaps
Robert/lifeless?) on irc if there is any doubt.

Note: if you already have some 2a tree but not all then you can branch
that into the repository first to speed up the initial download.

Regards
Henrik