'bzr mv' unwieldy
I often work with Python namespace products, mostly in a Zope and/or Plone context. During development, I regularly find that I'd rather want to rename my product. So, eg. "name.space" becomes "other.name". In the context of a namespaced product, this means that
name.space/
More often than not, I say something like 'bzr mv --after name.space other.name", only to find that there is no way to rename the lower directories as well (bazaar says "directory ... is not versioned"), and I'm stuck with the bogus rename I have already done. I can't even 'bzr mv' the now renamed dir back to the original one, and restart the process bottom-up style, because now bzr says that the original dir is already versioned, and it can't rename the directory in question. What's the suggested way to get out of such a situation?
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- Bazaar Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Revision history for this message
![]() |
#1 |
On Mon, Nov 03, 2008 at 11:05:41AM -0000, ToniMueller wrote:
> New question #49988 on Bazaar:
> https:/
>
> I often work with Python namespace products, mostly in a Zope and/or
> Plone context. During development, I regularly find that I'd rather
> want to rename my product. So, eg. "name.space" becomes "other.name".
> In the context of a namespaced product, this means that
>
> name.space/
>
> More often than not, I say something like 'bzr mv --after name.space
> other.name", only to find that there is no way to rename the lower
> directories as well (bazaar says "directory ... is not versioned"),
> and I'm stuck with the bogus rename I have already done. I can't even
> 'bzr mv' the now renamed dir back to the original one, and restart
> the process bottom-up style, because now bzr says that the original
> dir is already versioned, and it can't rename the directory in
> question. What's the suggested way to get out of such a situation?
Does it work to do:
bzr mv --after name.space/name/ other.name/other # so far what you did
bzr mv --after other.name/name/ other.name/other # use the new other.name/ but the old 'name'
bzr mv --after other.name/
In my quick testing, that workaround seemed to get it done.
I agree it would be more ideal if `bzr mv --after name.space/name
other.name/other` worked, and the helptext of mv suggests that it does,
so that is a bug imo.
Wouter
Revision history for this message
![]() |
#2 |
Hi,
On Mon, 03.11.2008 at 19:39:26 -0000, Wouter van Heyst <email address hidden> wrote:
> Wouter van Heyst proposed the following answer:
> On Mon, Nov 03, 2008 at 11:05:41AM -0000, ToniMueller wrote:
> > New question #49988 on Bazaar:
> > https:/
> >
> > I often work with Python namespace products, mostly in a Zope and/or
> > Plone context. During development, I regularly find that I'd rather
> > want to rename my product. So, eg. "name.space" becomes "other.name".
> > In the context of a namespaced product, this means that
> >
> > name.space/
> >
> > More often than not, I say something like 'bzr mv --after name.space
> > other.name", only to find that there is no way to rename the lower
> > directories as well (bazaar says "directory ... is not versioned"),
> > and I'm stuck with the bogus rename I have already done. I can't even
> > 'bzr mv' the now renamed dir back to the original one, and restart
> > the process bottom-up style, because now bzr says that the original
> > dir is already versioned, and it can't rename the directory in
> > question. What's the suggested way to get out of such a situation?
>
> Does it work to do:
>
> bzr mv --after name.space/name/ other.name/other # so far what you did
> bzr mv --after other.name/name/ other.name/other # use the new other.name/ but the old 'name'
> bzr mv --after other.name/
none of these work. I have created a simple test case that shows the
error messages. I've attached a typescript, cleaned of control chars,
that demonstrates this.
Kind regards,
--Toni++
Revision history for this message
![]() |
#3 |
Hi,
On Mon, 03.11.2008 at 21:16:28 +0100, Toni Mueller <email address hidden> wrote:
> none of these work. I have created a simple test case that shows the
> error messages. I've attached a typescript, cleaned of control chars,
> that demonstrates this.
I forgot to say that I'm still on bzr 1.5. Maybe this is the problem?
Kind regards,
--Toni++
Revision history for this message
![]() |
#4 |
And now I don't see an option to attach anything, so:
#!/bin/bash
bzr=~/src/
rm -rf move
$bzr init move
pushd move
$bzr mkdir name.space
$bzr mkdir name.space/name
$bzr mkdir name.space/
$bzr ci -m 1
mv name.space other.name
mv other.name/name other.name/other
mv other.name/
$bzr st
echo -----------
$bzr mv --after name.space other.name
$bzr st
echo -----------
$bzr mv --after other.name/name other.name/other
$bzr st
echo -----------
$bzr mv --after other.name/
$bzr st
Revision history for this message
![]() |
#5 |
On Mon, Nov 03, 2008 at 08:18:16PM -0000, ToniMueller wrote:
> Question #49988 on Bazaar changed:
> https:/
>
> ToniMueller gave more information on the question:
>
> Hi,
>
> On Mon, 03.11.2008 at 21:16:28 +0100, Toni Mueller <email address hidden> wrote:
> > none of these work. I have created a simple test case that shows the
> > error messages. I've attached a typescript, cleaned of control chars,
> > that demonstrates this.
>
> I forgot to say that I'm still on bzr 1.5. Maybe this is the problem?
Hmm, I don't think so. The script I'm about to attach works with 1.5 as
well. I didn't see your typescript yet, could you compare what we're
doing, and tell me what I'm missing?
Wouter
Revision history for this message
![]() |
#6 |
Hi,
On Mon, 03.11.2008 at 21:01:01 -0000, Wouter van Heyst <email address hidden> wrote:
> Hmm, I don't think so. The script I'm about to attach works with 1.5 as
the typescript was attached to the message with the message id
<email address hidden>
Ie, my first answer to the ticket. It seems to have been stripped, so I
include it verbatim below:
-------
$ paster create -t plone name.space
Selected and implied templates:
ZopeSkel#
ZopeSkel#plone A Plone project
Variables:
egg: name.space
package: namespace
project: name.space
Enter namespace_package (Namespace package (like plone)) ['plone']: name
Enter package (The package contained namespace package (like example)) ['example']: space
Enter zope2product (Are you creating a Zope 2 Product?) [False]:
Enter version (Version) ['0.1']:
Enter description (One-line description of the package) ['']: bla
Enter long_description (Multi-line description (in reST)) ['']: bla
Enter author (Author name) ['Plone Foundation']:
Enter author_email (Author email) ['<email address hidden>']:
Enter keywords (Space-separated keywords/tags) ['']:
Enter url (URL of homepage) ['http://
Enter license_name (License name) ['GPL']:
Enter zip_safe (True/False: if the package can be distributed as a .zip file) [False]:
Creating template basic_namespace
Creating directory ./name.space
Recursing into +namespace_package+
Creating ./name.space/name/
Recursing into +package+
Creating ./name.
Copying __init__.py_tmpl to ./name.
Copying __init__.py_tmpl to ./name.
Copying README.txt_tmpl to ./name.
Recursing into docs
Creating ./name.space/docs/
Copying HISTORY.txt_tmpl to ./name.
Copying setup.cfg to ./name.
Copying setup.py_tmpl to ./name.
Creating template plone
Recursing into +namespace_package+
Recursing into +package+
.
Copying configure.zcml_tmpl to ./name.
Copying tests.py_tmpl to ./name.
Recursing into docs
Copying INSTALL.txt_tmpl to ./name.
Copying LICENSE.GPL to ./name.
Copying LICENSE.txt_tmpl to ./name.
Replace 1009 bytes with 1039 bytes (0/32 lines changed; 1 lines added)
Copying setup.py_tmpl to ./name.
Running /usr/bin/python setup.py egg_info
$ ls -al
total 8
drwxrwx--- 3 toni toni 1024 2008-11-03 21:07 .
drwxrwxrwt 13 root root 4096 2008-11-03 21:06 ..
drwxrwx--- 5 toni toni 1024 2008-11-03 21:07 name.space
-rw-rw---- 1 toni toni 2048 2008-11-03 21:07 typescript
$ ls -al name.space/
total 9
drwxrwx--- 5 toni toni 1024 2008-11-03 21:07 .
drwxrwx--- 3 toni toni 1024 2008-11-03 21:07 ..
-rw-rw---- 1 toni toni 31 2008-11-03 21:07 README.txt
drwxrwx--- 2 toni toni 1024 2008-11-03 21:07 docs
drwxrwx--- 3 toni toni 1024 2008-11-03 21:07 name
drwxrwx--- 2 toni toni 1024 2008-11-03 21:07 name.space.egg-info
-rw-rw---- 1 toni toni 51 2008-11-03 21:07 setup.cfg
-rw-rw---- 1 toni toni 1039 2008-11-03 21:07 setup.py
$ bzr init
$ bzr add name.space
added name.space
added name.space/
added name.space/docs
added name.space/name
added name.space/
added name.space/
added name.space/setup.py
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
spruce 21:07:38 /tmp/t
$ bzr commit -m 'initial import'
Committing to: /tmp/t/
added name.space
added name.space/
added name.space/docs
added name.space/name
added name.space/
added name.space/
added name.space/setup.py
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
added name.space/
Committed revision 1.
$ mv name.space other.name
$ mv other.name/name other.name/other
$ mv other.name/
$ find other.name
other.name
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/docs
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/other
other.name/
other.name/
other.name/
other.name/
other.name/
other.name/setup.py
spruce 21:08:46 /tmp/t
$ bzr st
removed:
name.space/
name.
name.space/docs/
name.
name.
name.
name.
name.space/name/
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
name.
unknown:
other.name/
typescript
$ bzr mv --after name.space/name/ other.name/other
bzr: ERROR: Could not move name => other: other.name is not versioned.
$ bzr mv --after other.name/name/ other.name/other
bzr: ERROR: Could not move to other: other.name/other is not versioned.
$ bzr mv --after other.name/
bzr: ERROR: Could not move to name: other.name/
$
-------
> well. I didn't see your typescript yet, could you compare what we're
> doing, and tell me what I'm missing?
I thought I'd have cut&paste'd the commands you sent above, but I
also ran the script you posted, and your script worked quite well.
Now... something in there must still be missing.
Kind regards,
--Toni++
Revision history for this message
![]() |
#7 |
This question was expired because it remained in the 'Open' state without activity for the last 15 days.