Very interesting thread! Thanks for the pointer.
Now I recall that I tried darcs mv but when I got the error
message
about the file already existing in the working directory, I
resorted
to remove and add; I didn't know about --case-ok. Could mv
check for
the filenames being the same except for case and emit the
message:
"(perhaps you should use --case-ok ?)"? Is that
worthy of a bug report?
In general, I think this is a much simpler case than yours
but with
the same result. I've only ever used the non-Cygwin scp to
transfer
the repositories around. What I did above causes failures on
Windows
and MacOS because the addfile appears before the rmfile in
the patch.
The patch assumes they are different files and not order
dependent
and on Windows and Mac they are the same and thus are order
dependent.
In terms of fixing my repository, this patch is way back in
my
history, there are a bunch of intervening tags up to
current, and it
contains much more than just that move (so I believe many
other
patches will depend on it anyway). In other words, it looks
like I
would have to blow away much of my patch history to get back
to that
one rename and rerecord everything correctly.
Instead, I edited the raw patch and moved the rmfile
associated
pieces above the addfile pieces and now the get to MacOS and
Windows
works fine.
I haven't tested if this can still happen in 1.0.7, but if
so, as a
defense against this perhaps record should check for
addfiles and
rmfiles that differ in case only and order them in the patch
with the
rmfiles first? I think that won't impact darcs on file
systems that
don't have this problem but would protect other darcs
clients on
systems that do. Perhaps another worthy bug report?
Thanks.
Dave
------
David K. Hess
Verscend Technologies, Inc.
dhess verscend.com
214-684-5448
On Jun 15, 2006, at 12:46 AM, Nimrod A. Abing wrote:
> Hi,
>
> I've had the same problem before. The problem lies in
the way Windows
> handles filename CamelCasing. AFAIK it depends on the
tools that you
> are using to copy files between say an EXT3 filesystem
a FAT32 or NTFS
> filesystem.
>
> Follow this thread for the discussion:
>
> http://www.abridgegame.org/pipermail/darcs-users/2
005-October/
> 008480.html
>
> If you're in a hurry to find the solution (it worked
for me):
>
> http://www.abridgegame.org/pipermail/darcs-users/2
005-October/
> 008539.html
>
> On 6/14/06, David K. Hess <dhess verscend.com> wrote:
>>
>> After more investigation, it looks like it is not a
CR/NL issue.
>>
>> The patch in question has the following in relation
to the file that
>> is failing:
>>
>> [other hunks]
>> addfile Myfile
>> hunk Myfile
>> [Myfile contents with a '+' on every row]
>> hunk myfile
>> [myfile contents with a '-' on every row]
>> rmfile myfile
>> [other hunks]
>>
>> The error that results:
>>
>> Applying patch 14 of 56... Unapplicable patch:
>> [...]
>> darcs failed: Error applying hunk to file ./myfile
>>
>> So, in other words, this patch involved renaming
myfile -> Myfile
>> using add and remove instead of move (doh!) plus
some changes to the
>> contents. On a Linux system, this works just fine.
On a Windows
>> system (and MacOS) it is failing, I assume because
myfile and Myfile
>> are the same thing in the filesystem.
>>
>> Is this a bug? Or just a simple case of gun meet
foot? If the latter,
>> is there anything simple I can do about it? Can I
edit the patch to
>> convert this from an add/remove to a move? Or would
it work to just
>> move the rmfile above the addfile inside the patch?
>>
>> Thanks.
>>
>> Dave
>>
>> ------
>> David K. Hess
>> Verscend Technologies, Inc.
>> dhess verscend.com
>> 214-684-5448
>>
>>
>>
>> On Jun 4, 2006, at 2:18 AM, Juliusz Chroboczek
wrote:
>>
>> >> I'm using darcs 1.0.7 and am getting an
unapplicable patch
>> error when
>> >> get'ing a repository from linux to a
windows workstation over scp.
>> >
>> > Are you using Cygwin scp? Does it look like
>> >
>> > http://thread.gmane.org/gmane.comp.version-control
.darcs.user/
>> 8569
>> >
>> > ?
>> >
>> >
Juliusz
>> >
>> >
>> >
_______________________________________________
>> > darcs-users mailing list
>> > darcs-users darcs.net
>> > http://www.abridgegame.org/mailman/listinfo/darcs-users
a>
>>
>>
>> _______________________________________________
>> darcs-users mailing list
>> darcs-users darcs.net
>> http://www.abridgegame.org/mailman/listinfo/darcs-users
a>
>>
>
>
> --
> _nimrod_a_abing_
>
> "The world is a tragedy to those who feel and a
comedy to those who
> think." - Shakespeare
_______________________________________________
darcs-users mailing list
darcs-users darcs.net
http://www.abridgegame.org/mailman/listinfo/darcs-users
a>
|