This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1006457 - Mercurial doesn't add broken symlink when using "copy -A"
Mercurial doesn't add broken symlink when using "copy -A"
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: mercurial (Show other bugs)
6.4
All Linux
unspecified Severity high
: rc
: ---
Assigned To: pstodulk
Leos Pol
: EasyFix, Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-10 12:07 EDT by Dave Johansen
Modified: 2015-07-22 03:45 EDT (History)
3 users (show)

See Also:
Fixed In Version: mercurial-1.4-4.el6
Doc Type: Bug Fix
Doc Text:
Prior to this update, running the "hg copy -A" command did not add broken symbolic links to a repository. The underlying source code has been modified to use the os.patch.lexists() method. As a result, "hg copy -A" adds the broken symbolic links as expected.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-07-22 03:45:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Source rpm of Mercurial 1.4.3 with patch to fix the broken symbolic link issue (1.85 MB, application/x-rpm)
2013-09-13 11:24 EDT, Dave Johansen
no flags Details
copy patch (508 bytes, patch)
2014-11-07 04:57 EST, pstodulk
no flags Details | Diff

  None (edit)
Description Dave Johansen 2013-09-10 12:07:39 EDT
Description of problem:
Broken symbolic links are not added like they should be when "copy -A" is used.

Version-Release number of selected component (if applicable):
1.4

How reproducible:
Always

Steps to Reproduce:
mkdir dir
touch dir/file.txt
cd dir
ln -s file.txt link_valid.txt
ln -s nothing.txt link_invalid.txt
cd ..
hg init
hg add dir
hg ci -m "Initial checkin"
mv dir moved
hg copy -A dir/file.txt moved/file.txt
hg copy -A dir/link_valid.txt moved/link_valid.txt
hg remove dir/file.txt
hg remove dir/link_valid.txt
hg copy -A dir/link_invalid.txt moved/link_invalid.txt
hg remove dir/link_invalid.txt
hg stat

Actual results:
moved/link_invalid.txt is not added to the repository.

Expected results:
moved/link_invalid.txt should be added to the repository.
Comment 2 Dave Johansen 2013-09-11 11:31:49 EDT
I noticed that version 1.4.3 of Mercurial is available, so I tested to see if the issue was fixed in that version, but it is not.

Also, potentially worth noting is that I did the above test on RHEL 5 (which uses Mercurial 1.3.1) and the same issue exists there as well.
Comment 3 Dave Johansen 2013-09-13 11:24:11 EDT
Created attachment 797388 [details]
Source rpm of Mercurial 1.4.3 with patch to fix the broken symbolic link issue

The fix that this patch is taken from can be found at:
http://www.selenic.com/hg/rev/70236d6fd844

I also noticed that Mercurial 1.4.3 is available, so I tested this patch applied to that updated source and it resolves the issue.
Comment 4 RHEL Product and Program Management 2013-10-13 19:11:05 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.
Comment 5 Dave Johansen 2013-10-25 00:26:32 EDT
This is still an issue and I'd like to request that it be considered that the fix be included in the next release.
Comment 6 pstodulk 2014-11-07 04:57:39 EST
Created attachment 954862 [details]
copy patch
Comment 10 errata-xmlrpc 2015-07-22 03:45:42 EDT
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1436.html

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