How do I remove all files from a mercurial repository having the .class
extension?
This use of patterns does not work:
PS> hg forget -I **.class
abort: no files specified
However, this use of patterns lists all the files I would like to forget:
PS> hg status -A -I **.class
C be\ac\ulg\montefiore\run\distributions\DiscreteDistribution.class
C be\ac\ulg\montefiore\run\distributions\ExponentialDistribution.class
C be\ac\ulg\montefiore\run\distributions\GaussianDistribution.class
C be\ac\ulg\montefiore\run\distributions\GaussianMixtureDistribution.class
C be\ac\ulg\montefiore\run\distributions\MultiGaussianDistribution.class
C be\ac\ulg\montefiore\run\distributions\MultiRandomDistribution.class
C be\ac\ulg\montefiore\run\distributions\PoissonDistribution.class
C be\ac\ulg\montefiore\run\distributions\RandomDistribution.class
C be\ac\ulg\montefiore\run\distributions\SimpleMatrix.class
C be\ac\ulg\montefiore\run\jahmm\Centroid.class
C be\ac\ulg\montefiore\run\jahmm\CentroidFactory.class
C be\ac\ulg\montefiore\run\jahmm\CentroidObservationInteger.class
C be\ac\ulg\montefiore\run\jahmm\CentroidObservationReal.class
C be\ac\ulg\montefiore\run\jahmm\CentroidObservationVector.class
C be\ac\ulg\montefiore\run\jahmm\ForwardBackwardCalculator$Computation.class
C be\ac\ulg\montefiore\run\jahmm\ForwardBackwardCalculator.class
C be\ac\ulg\montefiore\run\jahmm\ForwardBackwardScaledCalculator.class
What am I not understanding about the way forget treats patterns? I am using Mercurial version 2.0.
You're just missing a little something in your command :
hg forget -I **.class .
Note the added .
at the end which tells Mercurial in which directory to look.
It's working with status
, because status
look in every directory by default if nothing is specified. For the forget
command you must specify the files / directory explicitly
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With