As title, If I do copy from one file to destination file, then I commit the change. Afterwards I want to find parent file of copied file, How can I do? for example...
hg copy file1 file2
hg ci -m "copy file1 to file2"
how to find parent of file2? If I use hg parents command, only find parent of changeset not file2.
thanks....
hg log provides the facility
hgt $ hg log --copies -v b.py
changeset: 1:a9c003a9bddb
tag: tip
user: "xxxxx"
date: Mon Dec 06 01:40:01 2010 -0800
files: b.py
copies: b.py (a.py)
description:
copied file
Use the verbose mode
and also --copies
to find if the file has been used using hg copy
command
Use --template for format log:
hg log --template "{file_copies}\n" file2.txt
Filter empty strings (first line - in Unix, second - in Windows):
hg log --template "{file_copies}\n" file2.txt | grep .
hg log --template "{file_copies}\n" file2.txt | findstr /R "."
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