Revert creating .~x~ files

Asked by Eric Berry

Bazaar (bzr) 2.1.0
  Python interpreter: /usr/bin/python 2.6.1
  Python standard library: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6
  Platform: Darwin-10.2.0-i386-64bit
  bzrlib: /Library/Python/2.6/site-packages/bzrlib

Recently when I use revert I get these extra files created for all reverted files.
Eg.
bzr ignored
// blank
hack hack hack
bzr revert
bzr ignored
file1.txt.~1~
file2.txt.~1~
file3.txt.~1~
...

Each file that was modified then reverted results in a new file being created with the ~1~ extension. They look to be exact copies of the file with my reverted modifications.

Is this intended, is it a bug? Is there a way to turn it off?

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Eric Berry
Solved:
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

Hi,

I don't think this behaviour is new; we have made backups of files
before reverting them for a while.

I don't think there is an option to turn this off but it would be
reasonable to add one.
--
Martin <http://launchpad.net/~mbp/>

Revision history for this message
Eric Berry (elberry) said :
#2

Ah ok. I haven't seen them alongside the original files before, but I'm sure I've just missed them or thought they came from my editor which creates similar files sometimes.

An option to turn them off, or put them in a specific directory would be nice. This is what I've done with the editor - There is an option to put all file backups under another directory to keep them from muddying up the project code.

Looks like I can use clean-tree --detritus to remove them.

Thanks. :)
Eric

Revision history for this message
John A Meinel (jameinel) said :
#3

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

Eric Berry wrote:
> Question #102075 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/102075
>
> Status: Answered => Solved
>
> Eric Berry confirmed that the question is solved:
> Ah ok. I haven't seen them alongside the original files before, but I'm
> sure I've just missed them or thought they came from my editor which
> creates similar files sometimes.
>
> An option to turn them off, or put them in a specific directory would be
> nice. This is what I've done with the editor - There is an option to put
> all file backups under another directory to keep them from muddying up
> the project code.
>
> Looks like I can use clean-tree --detritus to remove them.
>
> Thanks. :)
> Eric
>

bzr revert --no-backup

- --no-backup Do not save backups of reverted files.

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkuDzX8ACgkQJdeBCYSNAAOf2wCdGd+M2PAA+OexB0MW2lM/E1JC
wkgAoNOsVC9ylQpy1HmVxi27iviHdN6Z
=/dKR
-----END PGP SIGNATURE-----