In darcs, how to view only the names of changed files - version-control

The command $ darcs whatsnew lists unrecorded changes in the working tree. However, often the full list of changes is too cluttered to see in one screen which files have changed.
How can I list only the names of changed files?
In git I do this via $ git diff --name-only.

darcs whatsnew -ls should work I think

Related

ClearCase equivalent of git status

With git (and other revision control apps like mercurial), you have a "status" functionality for a repository, which lists the repo files which are Modified, Deleted, Moved, Added or Missing.
How do we achieve the same in ClearCase (relative to the non-checked-out version chosen by the configspec currently in effect)?
The best I have so far is listing the files with modifications using ct diff and grep'ping for ---'s.
Anything related to file status is usually managed by cleartool ls
cleartool ls -r -l -vis
You can also add --view-only to restricts the listing to objects that belong logically to the view: view-private files, view-private directories, and view-private links; checked-out versions; and all derived objects visible in the view.
But I suspect some kind of post-processing (grep/awk) will be needed to get exactly what you want.
You have an example in bmpenuelas/gfcc
gfcc status
clearcase actions: List all new or modified files.
cleartool ls -rec -view_only to get new files.
cleartool lsco -cview -a -s to get all the checked out files, then find those which have been actually modified with cleartool diff -predecessor.
So a better git status equivalent is, according to this project, a bit more involved.

How to remove git unstageg changes resulted from removing directories?

I had many subdirectories under workspace directory that was under git configuration. I moved some of these subdirectories to another directory. As a result I see thousands of unstaged changed from these deletions, I can watch them from Eclipse. Git diff shows “deleted file mode 100644”.
How to remove these unstaged changes resulted from removing directories?
IF you move elements of a repository outside, it is expected for the Git repo to list those element as being deleted.
You should simply add them (Team > Add), and commit them (recording their deletion).
Once you have done a commit, those files won't show up anymore.
I find it useful to run git add -p, which interactively prompts you to stage all changes in the working directory.
In general, there is a lot more flexibility using git from the command-line than you'll get from within an IDE.

How to view all current uncommmited changes to a specific file in hg?

How to look at all uncommited changes to a file in hg? If we use TortoiseHG it's clear, but what about command line?
You probably want some combination of
hg status -mad to list all Modified, Added and Deleted files,
and hg diff <filename> to show the changes in a particular file.

Perforce - How to get the list of files that have been modified locally?

I am looking for a perforce command to get the list of the files that have been modified locally and "not" checked-in to the repository.
I understand that I "should" get the list of modified files in Pending changelist, but there are scenarios when I don't get to see a modified file in that list. And then on "manually" checking out a file and doing a diff i realize the difference.
Is there any command that could check all the files in a given folder and provide me a list of files that are not same as there state in the repository?
I tried "p4 sync", but that did not work.
Thanks for your interest.
Try
p4 diff -f -sa
(see manual for further details)
I use "p4 revert -n ./..."
where
-n
List the files that would be reverted without actually performing the revert.
This lets you make sure the revert does what you think it does before actually reverting the files.
In the recent versions of Perforce, try "p4 reconcile -e"
see: http://www.perforce.com/perforce/r12.1/manuals/cmdref/reconcile.html
It certainly takes its time though (not very fast).
I think, the modified files are submitted locallay (Otherwise, p4 opened ./... will help to find)
If files are already submitted to local perforce and still want to know which all are modified..
p4 changes -m 5 ./... (Should give changes lists)
p4 integrate -n ./... //server/code/base/... (This should list the files to be integrated to mainline.

Mercurial: Getting changed files from revision?

I can't get my head around how I can get only the files that were changed in my last revision, and not the complete repo, which i get by using Clone. This would be super helpful to for instance, deploy the last changed files.
What do I do?
Thanks
You cannot transfer just some files -- you must always have a full clone locally. So I suggest you make that once and then pull in changes incrementally.
You should then use hg status to show the names of files changes been revisions. You normally use hg status to see which files are changes compared to the working copy parent revision, but you can pass --rev to status to see changes between any two revisions!
So use
$ hg status --change tip
to see which files were changed in the tip changeset. Use
$ hg pull
$ hg status --rev .:tip
to see what files will be changed when you do a hg update after a pull. The update will take you from the current working directory parent, denoted by ., to the tip, assuming you are on the same named branch as tip. Otherwise hg update will take you to the tip-most changeset on your current branch.
You can use a template to hg log or hg tip to get all filenames:
hg tip --template '{files}'
or to get e.g. all files changed/added/modified by changeset 5:
hg log -r5 --template '{files}'
You can read more about templates Mercurial: The Definitive Guide, Chapter 11. Customizing the output of Mercurial or short help with hg help templating`
If you want to do something to the files e.g grep through them:
hg tip --template '{files}' | xargs grep foo
Careful this will break with filenames containing spaces!
To process all kinds of filenames something more complicated is needed (thanks to mg on #mercurial for the tip):
We need multiline styles for this suppose a file named zerosep contains:
changeset = "{files}"
file = "{file}\0"
Then you can use this to produce a \0 separated list of filenames and process it with xargs -0:
hg tip --style zerosep | xargs -0 grep foo
Information how this works can be found in: Listing files on multiple lines
Martin has the right way to get a list of what files have changed in a revision, and I've upvoted his answer, but just to expand on why your question is a little off:
In Mercurial every location has a full copy with all changes. If you're going to use Mercurial to deploy to your server then you have to clone everything to your server -- once. After that push/pull will move over only the (compressed) changesets that the server doesn't already have.
If you don't want to have everything that ever was on the server, then you need to use something other than mercurial for your deployment, perhaps something fed from the status commands Martin showed or a snapshot created from hg archive.
Personally, I'm okay with having full history on my servers, and just do a hg pull ; hg update on the server for each new deployment. It's tidy and efficient.