0
votes

How can I make a copy of all uncommited modified or added files in a Mercurial working copy?

Obviously I can go to each directory that has a changed file and copy it. I am looking for a process I can do from the command line (Windows or Powershell) or using TortoiseHg.

Thanks Matthew

1

1 Answers

1
votes

You can use purge alias from hgrc man page as good starting point and

  • Change status command accordingly to your needs: hg status --no-status -m
  • Pipe output to xargs's cmd.exe oneliner equivalent hg status ... > filelist.txt && FOR /F %k in (filelist.txt) DO copy %k \BACKUPPATH\%k (status without -0 parameter) or install any xargs port (as part of GOW, for example) and use original form of alias status -0 ...|xargs -0 ...