cornercorner
FeaturesPluginsDocs & SupportCommunityPartners

Bug 122263 - Revert does not work well for refactored file
: Revert does not work well for refactored file
Status: STARTED
: versioncontrol
Mercurial
: 6.1
: Sun All
: P3 (vote)
: Next
Assigned To:
:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2007-11-19 10:30 by
Modified: 2009-10-05 08:08 (History)
Issue Type: DEFECT
:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2007-11-19 10:30:38
If I revert a file which has been refactored the new file is deleted but the
old file is not recreated.
------- Comment #1 From 2007-11-19 16:32:42 -------
This cannot be done for an individual file in the plug-in currently  but a
directory can be reverted which results in
the new file being removed and the old one being recreated.

If none of the files specified in a hg log command is a directory we can
specify --follow to get the revisions for a set
of files.

If a file was renamed after a particular revision then gf revert --rev revision
new_file will delete the new file but
will not reacted the old_file. We need to also ncall hg revert --rev revision
old_file.

We need to know that we should call the second hg revert command. We can know
this if the file does not exist after the
first hg revert call. We also need to get the name for old_file. We can do this
by calling hg log --follow -v and trek
through each revision to find when the file was renamed and what the old name
was.    
------- Comment #2 From 2007-11-20 08:05:44 -------
I have logged http://www.selenic.com/mercurial/bts/issue834.

It does not make sense to try to fix this issue until the mercurial bug is
resolved.
------- Comment #3 From 2008-04-01 11:34:26 -------
We need the mercurial bug to be addressed.