Just to add more information to this - I did try what was suggested here (it 
refers to a branch and not a commit id - but heck worth a shot) 
https://stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn
 
<https://stackoverflow.com/questions/5989592/git-cannot-checkout-branch-error-pathspec-did-not-match-any-files-kn>
 - but nah /refs/heads/src… or /origin/src… didn’t seem to give a recognised 
path.

Grasping at straws I also tried --ignore-skip-worktree-bits 

So I’m really curious if anyone else has managed to restore a deleted Pharo 
class in git?

Tim

> On 21 Jun 2018, at 16:07, Tim Mackinnon <tim@testit.works> wrote:
> 
> Guille - just following up on this thread as I’d like to get more confident 
> with this stuff.
> 
> You mentioned a Calypso plugin for versions - where is that? I loaded a 
> recentish P7 image and I don’t see those icons? Is this something I can 
> easily load to try out?
> 
> As I don’t have that plugin, I’ve followed up on your next suggestion (just 
> to learn how to do this) about looking up a commit having used the command 
> line git history to list all of my deleted classes (I think this might be a 
> useful thing to add to Iceberg BTW).
> 
> Not sure how to get a repository but I cobbled together the following?
> 
> (IceLibgitRepository registry detect: [ :r | r name beginsWith: 'Prismic' ]) 
> lookupCommit: '65363ad’.
> 
> This give me an IceGitCommit - but then what can I easily do with this to try 
> and iterate over deleted classes to try and get the one I’ve identified back?
> 
> Failing all of this - I went back to the command line again (which should 
> work) - and I’m really wondering if we do something weird with files or paths 
> when checking in?
> 
> Having got a valid commitID (I used: git log --diff-filter=D --summary 
> —pretty="format:%cd|%h|%cn%n%s%n” )
> 
> if I simply run the following (with the id and pathname taken from the output 
> of my previous command
> 
> git checkout 65363ad src/PrismicDemo/PrismicBlock.class.st 
> <http://prismicblock.class.st/>
> 
> I keep getting an error : error: pathspec 
> ‘src/PrismicDemo/PrismicBlock.class.st <http://prismicblock.class.st/>' did 
> not match any file(s) known to git. 
> 
> Are you able to confirm if you can restore a deleted class from a commit? 
> I’ve tried it on 2 different OSX machines and neither of them works - making 
> me think we do something odd.
> 
> Tim
> 
>> On 14 Jun 2018, at 08:52, Guillermo Polito <guillermopol...@gmail.com 
>> <mailto:guillermopol...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>> Regarding history, right now we have a history browser implemented as a 
>> Calypso plugin, that is open using context menu => history or the little box 
>> button on the top right of the method pane (second button from the left in 
>> the picture):
>> 
>> <Screen Shot 2018-06-14 at 09.34.24.png>
>> 
>> That button will nowadays only be shown if the method's package is linked to 
>> an iceberg repository.
>> Once you click it, you will have the entire history of the method.
>> 
>> <Screen Shot 2018-06-14 at 09.47.46.png>
>> 
>> With the possibility to install that version of the method (among others).
>> 
>> Now, regarding the recovery of deleted classes/methods, have you tried the 
>> repository browser?
>> Go to Iceberg, right click on a repository and select "Repository".
>> You can there select a commit in history and then in the tabs below see the 
>> diff between
>>  - your current version and the selected commit
>>  - the selected commit and its main parent
>> 
>> Of course any of these can be improved, but if you have concrete requests, 
>> it is much easier :)
>> 
>> https://github.com/pharo-vcs/iceberg <https://github.com/pharo-vcs/iceberg>
>> 
>> Guille
>> 
>> On Wed, Jun 13, 2018 at 11:22 PM Tim Mackinnon <tim@testit.works 
>> <mailto:tim@testit.works>> wrote:
>> Hi Sean - I tried it again, and it worked:
>> 
>> git log --full-history -- */PrismicBlock.class*
>> 
>> (I got my wildcard slightly wrong for tonel format) - although the beauty of 
>> the one I gave was that it shows you all deleted classes (in case you don’t 
>> know the name)
>> 
>> I’m still confused why I can’t checkout the deleted class though - damn you 
>> git, for the cryptic error: : error: pathspec 
>> 'PrismicDemo/PrismicBlock.class.st <http://prismicblock.class.st/>' did not 
>> match any file(s) known to git.
>> 
>> I was hoping a quick hack to iceberg might be to OSProcess a few choice git 
>> commands to help us along while we work out better ways to do things.
>> 
>> Tim
>> 
>>> On 13 Jun 2018, at 21:53, Sean P. DeNigris <s...@clipperadams.com 
>>> <mailto:s...@clipperadams.com>> wrote:
>>> 
>>> Tim Mackinnon wrote
>>>> I didn’t quite get your fu to work
>>> 
>>> Interesting.
>>> 
>>> When I searched for commits affecting the deleted class SuDebianKey:
>>> 
>>> $ git log --full-history -- */SuDebianKey.class/properties.json
>>> 
>>> I got back a list of commits (obviously with the last chronologically being
>>> the deletion):
>>> 
>>> commit a38fbced4abec59ff9879d4c607da80dc89b6637
>>> Author: Sean DeNigris <s...@seans-mbp.home <mailto:s...@seans-mbp.home>>
>>> Date:   Mon Jan 30 17:13:58 2017 -0500
>>> 
>>>    Extract Lots to ComputerWorld, Absorb Rest of Old ScriptingBase Project
>>> 
>>> commit 61175745d57c60a1707d5e2f9a2fc92e6c19a6ea
>>> Author: Sean DeNigris <s...@clipperadams.com <mailto:s...@clipperadams.com>>
>>> Date:   Sat Aug 20 17:14:12 2016 -0400
>>> 
>>>    Basket O' Enhancements
>>> ...
>>> 
>>> 
>>> 
>>> -----
>>> Cheers,
>>> Sean
>>> --
>>> Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html 
>>> <http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html>
>>> 
>> 
>> 
>> 
>> -- 
>>    
>> Guille Polito
>> Research Engineer
>> 
>> Centre de Recherche en Informatique, Signal et Automatique de Lille
>> CRIStAL - UMR 9189
>> French National Center for Scientific Research - http://www.cnrs.fr 
>> <http://www.cnrs.fr/>
>> 
>> Web: http://guillep.github.io <http://guillep.github.io/>
>> Phone: +33 06 52 70 66 13
> 

Reply via email to