Jump to content

Finding changesets where a file is changed


Recommended Posts

I'm trying to locate the changeset when a particular file was deleted. I'm trying to use the query system of cm find or the Changesets view in the GUI. I see documentation saying that you can query on a variety of items, but nowhere do I see a list of things that can be searched for (cm find object [where conditions] [on repositories] [options] <-- but what are the valid where conditions?), and the few examples that are given are almost always dates, labels, or users. What I want to do is something like "find changeset where filename='DisplayNameAttribute'", however "filename" is not a valid, nor is file or name.

Link to comment
Share on other sites

Honestly, we have to bring back the "delete view" from Plastic 3.

Meanwhile you can do the following: (inside your workspace)

cm log -a | findstr /n /b /c:" D c:\tmp\log2\MyFolder\File.txt"
cm log -a > allLog.txt

This line is going to give you the match line number, so you just need to go to the line and review in which changeset was done.

Hope it helps!

Link to comment
Share on other sites

  • 4 years later...

Hi v2k!


first you need to know when and where the file was deleted, in order to do it you can use the "cm find removed" command.


It will give you:

* Time stamp of the "delete" operation

* Owner, who removed the item.

* Changeset number where the delete operation is recorded.

* Branch where the changeset lives.

* Path of the item.



7/1/2016 10:27:57 AM manu     154       br:/main/task4245             c:\Users\manu\wkspaces\repo_zero\src\core.c

It will be easy to "grep" the output in order to get you file, once you have it get its history.


You can get the history in two different ways.


1) CLI


Query the previous changeset where the file was deleted, in my example the file was removed at the changeset #154 so I go for the #153 where I know the file was alive.


cm hist rev:foo.c#cs:153@repo_zero@localhost:8087


2) GUI


Open the branch explorer and diff the changeset (double click it) the "cm find removed" gave you. The context menu will be offer you the "history" operation.


Hope it helps!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...