bzr (0.16) rm --new fails

Bug #118688 reported by Andrew Voznytsa
2
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Low
Unassigned

Bug Description

command sequence:

mkdir work
cd work
touch file.1
touch file.2
bzr init
bzr add
bzr rm --new file.2

bzr: ERROR: Can't remove changed or unknown files:
added:
  file.2
Use --keep to not delete them, or --force to delete them regardless.

bzr commit -m "initial commit"
bzr status -r 0

added:
  file.1
  file.2

System WinXP SP2, bzr 0.16 with bzr tools.

P.S.
MSYS commands were used to show command sequence and simply things for non-Windows developers.

Revision history for this message
John A Meinel (jameinel) wrote :

Um... I don't see a "--new" flag.

Basically, the question is whether "bzr rm file.2" should be deleting the file, or just marking it as not versioned.

We don't know whether you added the file by accident because:

a) You thought it would be interesting, but have decided you don't like it (bzr rm --force to delete it from disk)
b) It is an important file that shouldn't be versioned (say a local configuration file, or a temporary file) then you want "bzr rm --keep" so that we just don't version it.

I'd like more information before I decide how to triage this. Since we don't have a --new flag, I don't really know what you are trying to do.

Changed in bzr:
importance: Undecided → Low
status: Unconfirmed → Needs Info
Revision history for this message
Andrew Voznytsa (andrew-voznytsa) wrote :

I ran 'bzr add' to add all files in working directory and after all I decided to don't add one of them.

Below is output of my bzr.exe.

D:\temp\work>bzr rm --help
usage: bzr remove [FILE...]
aliases: rm

Remove files or directories.

This makes bzr stop tracking changes to the specified files and
delete them if they can easily be recovered using revert.

You can specify one or more files, and/or --new. If you specify --new,
only 'added' files will be removed. If you specify both, then new files
in the specified directories will be removed. If the directories are
also new, they will also be removed.

Options:
  --new remove newly-added files
[skip]

D:\temp\work>bzr version
Bazaar (bzr) 0.16.0
Using python interpreter: d:\dev\Bazaar\bzr.exe
Using python standard library: d:\dev\Bazaar\lib\library.zip
Using bzrlib: d:\dev\Bazaar\lib\library.zip\bzrlib

Revision history for this message
John A Meinel (jameinel) wrote :

Ah, I missed that, that is something that was just added.

Anyway, as I understand it --new is as opposed to specifying a list of files.

So you would do:

bzr rm --new

*or*

bzr rm --keep foo
bzr rm --force bar

There still is the valid statement that we don't know whether you want to delete the file on disk or not, hence the prompt for --keep or --force.

Revision history for this message
Bubba Siggler (bud3) wrote : Re: [Bug 118688] Re: bzr (0.16) rm --new fails

On 6/4/07, John A Meinel <email address hidden> wrote:
>
> Um... I don't see a "--new" flag.
>
> Basically, the question is whether "bzr rm file.2" should be deleting
> the file, or just marking it as not versioned.
>
> We don't know whether you added the file by accident because:
>
> a) You thought it would be interesting, but have decided you don't like it
> (bzr rm --force to delete it from disk)
> b) It is an important file that shouldn't be versioned (say a local
> configuration file, or a temporary file) then you want "bzr rm --keep" so
> that we just don't version it.
>
> I'd like more information before I decide how to triage this. Since we
> don't have a --new flag, I don't really know what you are trying to do.

Hi john,

I have wiped the drives clean. I was make it way to hard on the Team and
myself. I would like to get it set backup with what .17 version have it were
it will work for the Team. Email is one way to do it. I have wanted to start
some bugsquah. I also have this project with the wirless cards.

Regards

bubba

** Changed in: bzr (upstream)
> Importance: Undecided => Low
> Status: Unconfirmed => Needs Info
>
> --
> bzr (0.16) rm --new fails
> https://bugs.launchpad.net/bugs/118688
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>

--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFkcN7yXWcajQQndYRAgbqAKCMyXN9Jx4g0X7jocg+aUSFz0x4LwCgrURW
eGtqLjpzQVYa9+gzpCRtB84=
=zrpM
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

Would it have helped if the error message was something more like:

bzr: ERROR: Can't remove changed or unknown files:
added:
  test.txt
Use 'bzr rm --keep' to unversion them without deleting them, or --force to also delete them from disk.

Or do you have any other possible wordings that might be clearer?

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 118688] bzr (0.16) rm --new fails

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Voznytsa wrote:
> Public bug reported:
> bzr rm --new file.2
>
> bzr: ERROR: Can't remove changed or unknown files:
> added:
> file.2
> Use --keep to not delete them, or --force to delete them regardless.

This is intended behavior. You need to do either "bzr rm --keep file.2"
or "bzr rm --force file.2"

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZHKq0F+nu1YWqI0RAkyYAJwJKpiFLtTq5Hp/7rm4r6z5nUwXXwCdHntv
nBQ7gERBilRp3e7DaQiL+AU=
=g9Mi
-----END PGP SIGNATURE-----

Revision history for this message
Bubba Siggler (bud3) wrote : Re: [Bug 118688] Re: bzr (0.16) rm --new fails

On 6/4/07, John A Meinel <email address hidden> wrote:
>
> Would it have helped if the error message was something more like:
>
> bzr: ERROR: Can't remove changed or unknown files:
> added:
> test.txt
> Use 'bzr rm --keep' to unversion them without deleting them, or --force to
> also delete them from disk.
>
> Or do you have any other possible wordings that might be clearer?
> I don't know what the unknown's are just more junk : It is my thinking
> that the unknowns belong to one's tying to use this as sftp.

bubba

--
> bzr (0.16) rm --new fails
> https://bugs.launchpad.net/bugs/118688
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>

--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFkcN7yXWcajQQndYRAgbqAKCMyXN9Jx4g0X7jocg+aUSFz0x4LwCgrURW
eGtqLjpzQVYa9+gzpCRtB84=
=zrpM
-----END PGP SIGNATURE-----

Revision history for this message
Bubba Siggler (bud3) wrote : Re: [Bug 118688] bzr (0.16) rm --new fails

On 6/4/07, Aaron Bentley <email address hidden> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Voznytsa wrote:
> > Public bug reported:
> > bzr rm --new file.2
> >
> > bzr: ERROR: Can't remove changed or unknown files:
> > added:
> > file.2
> > Use --keep to not delete them, or --force to delete them regardless.
>
> This is intended behavior. You need to do either "bzr rm --keep file.2"
> or "bzr rm --force file.2"

Hi, Aaron,

I need to get bzr setup and follow thu.

Aaron
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.1 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
>
> iD8DBQFGZHKq0F+nu1YWqI0RAkyYAJwJKpiFLtTq5Hp/7rm4r6z5nUwXXwCdHntv
> nBQ7gERBilRp3e7DaQiL+AU=
> =g9Mi
> -----END PGP SIGNATURE-----
>
> --
> bzr (0.16) rm --new fails
> https://bugs.launchpad.net/bugs/118688
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>

--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFkcN7yXWcajQQndYRAgbqAKCMyXN9Jx4g0X7jocg+aUSFz0x4LwCgrURW
eGtqLjpzQVYa9+gzpCRtB84=
=zrpM
-----END PGP SIGNATURE-----

Revision history for this message
Andrew Voznytsa (andrew-voznytsa) wrote :

I was under impression that rm --new remove non-versined files from 'add queue' whereas rm --keep/--force work with already versined files.

I guess it would be better to drop '--new' at all, adjust documentation to clearly state that rm --keep/--force works for unversioned-but-queued-for-versioning files too.

From my experience bzr 0.14 did not require anything besides --new to remove just added file from 'add queue'.

Revision history for this message
Bubba Siggler (bud3) wrote : Re: [Bug 118688] Re: bzr (0.16) rm --new fails

welll Andrew it's stuck on 1 phase and if I cut the process. ?

On 6/4/07, Andrew Voznytsa <email address hidden> wrote:
>
> I was under impression that rm --new remove non-versined files from 'add
> queue' whereas rm --keep/--force work with already versined files.
>
> I guess it would be better to drop '--new' at all, adjust documentation
> to clearly state that rm --keep/--force works for unversioned-but-
> queued-for-versioning files too.
>
> >From my experience bzr 0.14 did not require anything besides --new to
> remove just added file from 'add queue'.
>
> --
> bzr (0.16) rm --new fails
> https://bugs.launchpad.net/bugs/118688
> You received this bug notification because you are a member of Bazaar
> Developers, which is the registrant for Bazaar.
>

--
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFFkcN7yXWcajQQndYRAgbqAKCMyXN9Jx4g0X7jocg+aUSFz0x4LwCgrURW
eGtqLjpzQVYa9+gzpCRtB84=
=zrpM
-----END PGP SIGNATURE-----

Revision history for this message
John A Meinel (jameinel) wrote :

"bzr rm --new" does remove new files from the add queue. Such that:

bzr add foo bar baz
bzr rm --new

Will remove all of "foo" "bar" and "baz".

However, it still doesn't know whether you want to delete them from disk, or just from versioned status. So you need to "bzr rm --new --keep" or "bzr rm --new --force".

Svn actually works in the same way. It will refuse to remove newly added files unless you supply --force.

svn co $URL/test
cd test
touch foo
svn add foo
svn rm foo

subversion/clients/cmdline/util.c:639: (apr_err=195006)
svn: Use --force to override this restriction
subversion/libsvn_client/delete.c:76: (apr_err=195006)
svn: 'foo' has local modifications

I find ours less confusing, but that doesn't mean we can't do better.

At this point, I think it just needs to be documented better that "--new" just schedules all files which have been recently added for removal, and have it clearly explained why/when you need --keep or --force.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Voznytsa wrote:
> I was under impression that rm --new remove non-versined files from 'add
> queue' whereas rm --keep/--force work with already versined files.

No, --new is an alternative to specifying particular files.

> I guess it would be better to drop '--new' at all

It does serve a useful purpose, so I'm not sure that makes sense.

> adjust documentation
> to clearly state that rm --keep/--force works for unversioned-but-
> queued-for-versioning files too.

We actually consider those files to be versioned, not
unversioned-but-queued.

>>From my experience bzr 0.14 did not require anything besides --new to
> remove just added file from 'add queue'.

bzr 0.14 did not require --new if you specified filenames.

To get the old behavior, use --keep.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZHsM0F+nu1YWqI0RAuM7AJ0a7M5hkxWaib2lpVYH5TnMIUiQBACcC1+y
LZoJrPAFOyJsY86p2rJxXPI=
=CWx1
-----END PGP SIGNATURE-----

Revision history for this message
Andrew Voznytsa (andrew-voznytsa) wrote :

Well, just restored 0.14: rm there has no --keep/--force/--safe and therefore --new worked silently and did what was expected. In such ligh bug report might be considered as invalid. I'm sorry for your lost time.

Revision history for this message
Aaron Bentley (abentley) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andrew Voznytsa wrote:
> Well, just restored 0.14: rm there has no --keep/--force/--safe and
> therefore --new worked silently and did what was expected. In such ligh
> bug report might be considered as invalid. I'm sorry for your lost time.

If you want to get the same behavior without downgrading, you can create
an alias for rm.

In the [ALIASES] section of bazaar.conf, you just put:
rm = rm --keep

If there is no ALIASES section, you can create one.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGZIle0F+nu1YWqI0RApqKAJ0d4brbWe5jdhyHYwJql7E9sLAXuwCeJe74
b29sE/0ep2WyGTdVBIbMiVg=
=ajTZ
-----END PGP SIGNATURE-----

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Bazaar because there has been no activity for 60 days.]

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.