Register | Login

Stacking Code

public interface IBlog { string Dump(Stream consciousness); }

Remove Unversioned Files

Monday, 8 August, 2011 @ 1:23 PM < Adam Boddington
Tags: Mercurial, PowerShell

There may have been an easier way to do this, I don't know. I needed to remove all unversioned files from my Mercurial repository because there was something in there that was screwing up my build. I had started some big changes which I had given up on and reverted it all, but something somewhere wasn't getting compiled properly, even after a clean.

I found this post on how to do it at the command line.

hg st -nu | xargs rm

That's deleting unknown files, I needed to delete ignored files. And I needed it to work on Windows. Here's my PowerShell version.

hg status -in | foreach { del $_ }

After which the build worked. Check out hg help status for all the options.

There are 0 comments.


Comments

Leave a Comment

Please register or login to leave a comment.


Older
Handy PowerShell to Find Maximum File Sizes

Newer
Custom Configuration Sections Made Easy

Older
Handy PowerShell to Find Maximum File Sizes

Newer
Custom Configuration Sections Made Easy

browse with Pivot


About


Projects

Building Neno


RSS
Recent Posts

Codility Nitrogenium Challenge
OS X Lock
HACT '13
Codility Challenges
Priority Queue


Tags

Architecture (13)
ASP.NET (2)
ASP.NET MVC (13)
Brisbane Flood (1)
Building Neno (38)
C# (4)
Challenges (3)
Collections (1)
Communicator (1)
Concurrency Control (2)
Configuration (1)
CSS (5)
DataAnnotations (2)
Database (1)
DotNetOpenAuth (2)
Entity Framework (1)
FluentNHibernate (2)
Inversion of Control (5)
JavaScript (1)
jQuery (4)
Kata (2)
Linq (7)
Markdown (4)
Mercurial (5)
NHibernate (20)
Ninject (2)
OpenID (3)
OS X (1)
Pivot (6)
PowerShell (8)
Prettify (2)
RSS (1)
Spring (3)
SQL Server (5)
T-SQL (2)
Validation (2)
Vim (1)
Visual Studio (2)
Windows Forms (3)
Windows Service (1)


Archives


Powered by Neno, ASP.NET MVC, NHibernate, and small furry mammals. Copyright 2010 - 2011 Adam Boddington.
Version 1.0 Alpha (d9e7e4b68c07), Build Date Sunday, 30 January, 2011 @ 11:37 AM