Patchwork record and crecord: proposal to merge into core

login
register
mail settings
Submitter Harvey Chapman
Date March 11, 2015, 7:41 p.m.
Message ID <0C9620EE-1253-45C0-8E66-447202B4B561@3gfp.com>
Download mbox | patch
Permalink /patch/8006/
State Not Applicable
Headers show

Comments

Harvey Chapman - March 11, 2015, 7:41 p.m.
> On Mar 11, 2015, at 3:07 PM, Harvey Chapman <hchapman-hg@3gfp.com> wrote:
> 
>> 
>> On Mar 11, 2015, at 2:58 PM, Harvey Chapman <hchapman-hg@3gfp.com> wrote:
>> 
>>> On Mar 11, 2015, at 2:42 PM, Harvey Chapman <hchapman-hg@3gfp.com> wrote:
>>> 
>>>> 
>>>> On Mar 11, 2015, at 1:51 PM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:
>>>> On 03/11/2015 05:35 AM, Harvey Chapman wrote:
>>>>> 
>>>>>> On Mar 11, 2015, at 3:54 AM, Pierre-Yves David <pierre-yves.david@ens-lyon.org> wrote:
>>>>>> 
>>>>>> I would be very happy to take such command into evolve. (this will take care of 4.) so we can play with the UI a bit. Having a `split` command in evolve is something I want to have for a while since recording "split" markers is important for evolution.
>>>>> 
>>>>> It would definitely be nice to be able to split as a first class command.
>>>>> 
>>>>> On a related note since crecord is getting a lot of attention:
>>>>> 
>>>>> 1. Is this bug fixed: add a file, then from a subdirectory in the repo try to commit with crecord and it fails because it tries to find the added file using the full repo path relative to the current working directory? (Using https://bitbucket.org/edgimar/crecord 71f7fa103401 with 3.3).
>>>> 
>>>> Fixed in af245f45c93d
>>> 
>>> Ah, I thought I remembered it being broken and fixed. It appears to have been regressed in the very next commit, c44e2c19caaa.
>> 
>> I think this fixes it, but I’m not sure if I might have broken code in the middle: 
>> 
>> https://bitbucket.org/sr105/crecord/commits/9ae53595f6fdc7ef998c7fa7ca6566aa8187427c
>> 
>> I just moved the previous fix up earlier in the code before all of the newly_added_files code.
> 
> I think my change breaks the code. I’ll look at it more closely and commit a better fix.

This is better. Pull request sent.

https://bitbucket.org/sr105/crecord/commits/5cfaabfe9cb9f0a0d6837956d73127f290a213be

Patch

diff --git a/crecord/crecord_core.py b/crecord/crecord_core.py
--- a/crecord/crecord_core.py
+++ b/crecord/crecord_core.py
@@ -133,7 +133,7 @@ 
                           lambda key: key in backups)
             # remove newly added files from 'clean' repo (so patch can apply)
             for f in newly_added_backups:
-                os.unlink(f)
+                os.unlink(repo.wjoin(f))

             # 3b. (apply)
             if dopatch: