Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 406877 - "repoman commit" should remove files ending in "~" automatically
Summary: "repoman commit" should remove files ending in "~" automatically
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
: 143171 (view as bug list)
Depends on:
Blocks: 409383 411127 428208
  Show dependency tree
 
Reported: 2012-03-04 11:57 UTC by Pacho Ramos
Modified: 2012-08-19 21:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2012-03-04 11:57:54 UTC
As I use "joe" to edit ebuilds and all files, I usually need to manually run "rm *~" before committing, could this be done automatically by "repoman commit"?

Thanks a lot

Reproducible: Always
Comment 1 Fabian Groffen gentoo-dev 2012-03-04 14:25:01 UTC
joe doesn't have an option not to write backup files?
Comment 2 Pacho Ramos gentoo-dev 2012-03-04 15:24:51 UTC
Yes, -nobackups option, but I usually rely on its backup files (as maybe I make some wrong change) and, then, would prefer to get backups removed only at last stage (at committing time)
Comment 3 Fabian Groffen gentoo-dev 2012-03-04 15:27:18 UTC
doesn't that defeat the purpose of the underlying VCS repoman is committing to?
Comment 4 Pacho Ramos gentoo-dev 2012-03-04 15:30:36 UTC
I don't think so
Comment 5 Fabian Groffen gentoo-dev 2012-03-04 15:34:05 UTC
I think it does.

Nevertheless, repoman should NEVER remove files on its own.  It might ignore files, though.

Still I think you're just using your editor + VCS wrong here.  If you believe the VCS isn't providing what you're looking for, let your editor write its backup files to somewhere else instead, or wrap your repoman inside a script that does a rm *~ before actually calling repoman.
Comment 6 Pacho Ramos gentoo-dev 2012-03-04 15:38:07 UTC
I don't see why repoman commit cannot be tweaked to simply not commit files that are not allowed to be committed
Comment 7 Zac Medico gentoo-dev 2012-03-04 16:28:19 UTC
Ideally, repoman would respect whatever filter the current VCS uses. If the VCS provides a way to get of list of such files, then your request is relatively easy to implement. Otherwise, it's not easy.
Comment 8 Pacho Ramos gentoo-dev 2012-03-05 07:55:38 UTC
Oh, I thought that, as it's now able to die telling you ~ files are not allowed, it would also be able to drop them... but I was wrong :(
Comment 9 Zac Medico gentoo-dev 2012-03-05 08:10:58 UTC
What does it look like when it dies? Is it a cvs error or what?

If a given vcs doesn't provide a way to explicitly list the ignored files, we'll have to duplicate whatever algorithm the vcs uses. For example, the cvsignore algorithm seems to be documented here:

  http://evscm.org/manual/html/cvsignore.html
Comment 10 Fabian Groffen gentoo-dev 2012-03-05 08:15:10 UTC
I thought repoman checks manually in the CVS/Entries files, so doesn't do ignoring when it checks files it sees.  With SVN it uses -I to also list ignored files, I think we do the same for all other VCSs.
Comment 11 Pacho Ramos gentoo-dev 2012-03-05 08:15:48 UTC
Well, I never tried to run "repoman commit" as "repoman full" dies already with:

RepoMan scours the neighborhood...
  file.name                     1
   /home/pacho/gentoo-x86/app-portage/gpytage/metadata.xml~: char '~'

Note: use --include-dev (-d) to check dependencies for 'dev' profiles

Please fix these important QA issues first.
RepoMan sez: "Make your QA payment on time and you'll never see the likes of me."
Comment 12 Zac Medico gentoo-dev 2012-03-05 08:23:55 UTC
Maybe we can just use the regular expression from the file.name check for files to ignore. We can simply ignore those files if they haven't been explicitly added to the vcs.
Comment 13 Zac Medico gentoo-dev 2012-03-17 19:50:11 UTC
(In reply to comment #12)
> Maybe we can just use the regular expression from the file.name check for
> files to ignore. We can simply ignore those files if they haven't been
> explicitly added to the vcs.

This is implemented by the following 2 commits:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2dac56fa282645031eb29860abc403e983a04b2d
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=237427dbf5eadf1e7b7bf2962b2ccbb352e527ab
Comment 14 Zac Medico gentoo-dev 2012-03-18 00:21:14 UTC
This is in 2.2.0_alpha91, but I'll leave this bug open until it's in an unmasked release.
Comment 15 Zac Medico gentoo-dev 2012-03-23 01:17:24 UTC
This is fixed in 2.1.10.50.
Comment 16 Zac Medico gentoo-dev 2012-08-19 21:43:52 UTC
*** Bug 143171 has been marked as a duplicate of this bug. ***