• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 1.6.3.1
    • 1.6.1
    • None
    • None

      I'm trying to rename a file from tradinghistory/settlementReports/2013/20130327 Report_Statement (1).csv to tradinghistory/settlementReports/2013/20130327 Report_Statement.csv. When I do this via the move command, it moves it to tradinghistory/history/settlementReports/2013/20130327 Report_Statement.csv - i.e. it adds an extraneous "history" directory in the target. If I rename source files from within IntelliJ, this works, but the same issue happens within SourceTree. Thanks

      See question: https://answers.atlassian.com/questions/182823/renaming-a-file-doesn-t-work

      I've also attached files which show the issue (on a different file).

        1. From IntelliJ.jpg
          From IntelliJ.jpg
          38 kB
        2. Screen Shot 2013-07-01 at 10.07.08.png
          Screen Shot 2013-07-01 at 10.07.08.png
          392 kB
        3. Step 1.jpg
          Step 1.jpg
          75 kB
        4. Step 2.jpg
          Step 2.jpg
          64 kB
        5. Step 3.jpg
          Step 3.jpg
          58 kB
        6. Step 4.jpg
          Step 4.jpg
          39 kB

          Form Name

            [SRCTREE-1669] Issues when renaming files

            KieranA added a comment -

            /private symlink folder from /var is now dealt with. Scheduled for 1.6.3.

            KieranA added a comment - /private symlink folder from /var is now dealt with. Scheduled for 1.6.3.

            KieranA added a comment -

            Just to clarify, Chris, this is because /var/ is symlink'd. Issue "ls -l /" at the terminal and you'll see var is symlink'd to /private/var/. We're implementing a fix regardless though as we'll just assume if it's not a valid path then we'll get the entire path of the repository instead. It's an edge case as people don't usually stick their repositories in /var/ or other special folders.

            KieranA added a comment - Just to clarify, Chris, this is because /var/ is symlink'd. Issue "ls -l /" at the terminal and you'll see var is symlink'd to /private/var/. We're implementing a fix regardless though as we'll just assume if it's not a valid path then we'll get the entire path of the repository instead. It's an edge case as people don't usually stick their repositories in /var/ or other special folders.

            KieranA added a comment -

            OK thanks Chris. I've confirmed it now so I'll be looking into this today to fix.

            KieranA added a comment - OK thanks Chris. I've confirmed it now so I'll be looking into this today to fix.

            The directory structure on my machine is /var/ccm/src/production, the production directory is the root of the repository. Then under this is fundgui etc. as per the image above.

            Chris Rusby added a comment - The directory structure on my machine is /var/ccm/src/production, the production directory is the root of the repository. Then under this is fundgui etc. as per the image above.

            KieranA added a comment -

            I think I'm going to need to see the full file structure. Can you confirm if the attached image is the full file structure?

            KieranA added a comment - I think I'm going to need to see the full file structure. Can you confirm if the attached image is the full file structure?

            Ok so to avoid confusion I'm renaming the file in the opposite direction to above. The production/duction folder is indeed created. The log is:

            hg rename -y -f fundgui/trunk/test/com/ccm/backtest/fund/rec/TradesReconciliationDlgModelTest.java duction/fundgui/trunk/test/com/ccm/backtest/fund/rec/TradesReconciliationDlgTest.java
            Completed successfully

            Chris Rusby added a comment - Ok so to avoid confusion I'm renaming the file in the opposite direction to above. The production/duction folder is indeed created. The log is: hg rename -y -f fundgui/trunk/test/com/ccm/backtest/fund/rec/TradesReconciliationDlgModelTest.java duction/fundgui/trunk/test/com/ccm/backtest/fund/rec/TradesReconciliationDlgTest.java Completed successfully

            KieranA added a comment -

            Hi Chris,

            Here's two things that can be done. Firstly, if you go into SourceTree preferences (General tab) and turn on "Always display full console output". Then do the move like you did before and you'll see the console stays open. Could you copy and paste that text and put it into here for me?

            Secondly, what happens to the file system when you do the move? Does that production/duction folder exist along with all the subfolders?

            Thanks in advance!

            KieranA added a comment - Hi Chris, Here's two things that can be done. Firstly, if you go into SourceTree preferences (General tab) and turn on "Always display full console output". Then do the move like you did before and you'll see the console stays open. Could you copy and paste that text and put it into here for me? Secondly, what happens to the file system when you do the move? Does that production/duction folder exist along with all the subfolders? Thanks in advance!

            KieranA added a comment -

            Thanks Chris. I'll try a reproduction again using that file structure.

            KieranA added a comment - Thanks Chris. I'll try a reproduction again using that file structure.

            (and then the incorrectly renamed file ends up at production/duction/fundgui/etc... rather than production/fundgui/etc...)

            Chris Rusby added a comment - (and then the incorrectly renamed file ends up at production/duction/fundgui/etc... rather than production/fundgui/etc...)

            Yes - one folder called production which is the root of the repository.

            Chris Rusby added a comment - Yes - one folder called production which is the root of the repository.

              Unassigned Unassigned
              0fdfae3104f5 Chris Rusby
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: