darcs

Issue 744 file created and moved onto in the same patch?

Title file created and moved onto in the same patch?
Priority feature Status resolved
Milestone Resolved in
Superseder Nosy List darcs-devel, dmitry.kurochkin, ganesh, kowey, thorkilnaur, tommy, zooko
Assigned To
Topics

Created on 2008-03-10.18:56:08 by zooko, last changed 2012-12-14.15:28:02 by markstos.

Messages
msg3856 (view) Author: zooko Date: 2008-03-10.18:56:06
Folks:

I converted the darcs-2 repository from hashed-format to darcs-2- 
format, and got this weirdness:

This patch apparently includes both "mv Autoconf.lhs Autoconf.lhs.in"  
and "add file Autoconf.lhs.in".

Regards,

Zooko

<changelog>
<patch author='simons@cryp.to' date='Thu May 22 03:37:16 CEST 2003'  
local_date='Wed May 21 20:37:16 PDT 2003' inverted='False'  
hash='2003052203
3716-96760-ccd786794d8c2a58327b90ac5f93a824b456c3b6.gz'>
         <name>Autoconf Redux Part II</name>
         <comment>We&apos;re getting somewhere:

  - If the configured prefix does _not_ contain the string  
&quot;darcs&quot;, it
    will be appended as directory name to $sysconfdir and $libexecdir.
    This is usually what the user wants.

  - If no prefix is given, $sysconfdir will be /etc.

  - Added Autoconf.lhs module for system dependent information. So far:
    darcsconfigdir. Thanks to this module, ghc will also know when to
    re-build a binary because configure ran again.

  - configure will now dump a nice summary before it terminates.</ 
comment>
     <summary>
     <move from="Autoconf.lhs" to="Autoconf.lhs.in"/>
     <add_file>
     Autoconf.lhs.in
     </add_file>
     <modify_file>
     Makefile<removed_lines num='2'/><added_lines num='2'/>
     </modify_file>
     <modify_file>
     autoconf.mk.in<removed_lines num='5'/><added_lines num='2'/>
     </modify_file>
     <modify_file>
     configure.in<removed_lines num='7'/><added_lines num='67'/>
     </modify_file>
     <modify_file>
     darcs_cgi.lhs<removed_lines num='1'/><added_lines num='2'/>
     </modify_file>
     </summary>
</patch>
</changelog>
msg3857 (view) Author: zooko Date: 2008-03-10.18:58:22
This has nothing to do with darcs-2-format -- the same weirdness is present in
the darcs-1-format of the darcs-2 source code:

<changelog>
<patch author='simons@cryp.to' date='Thu May 22 03:37:16 CEST 2003'
local_date='Wed May 21 20:37:16 PDT 2003' inverted='False' hash='2003052203
3716-96760-ccd786794d8c2a58327b90ac5f93a824b456c3b6.gz'>
        <name>Autoconf Redux Part II</name>
        <comment>We&apos;re getting somewhere:

 - If the configured prefix does _not_ contain the string &quot;darcs&quot;, it
   will be appended as directory name to $sysconfdir and $libexecdir.
   This is usually what the user wants.

 - If no prefix is given, $sysconfdir will be /etc.

 - Added Autoconf.lhs module for system dependent information. So far:
   darcsconfigdir. Thanks to this module, ghc will also know when to
   re-build a binary because configure ran again.

 - configure will now dump a nice summary before it terminates.</comment>
    <summary>
    <move from="Autoconf.lhs" to="Autoconf.lhs.in"/>
    <add_file>
    Autoconf.lhs.in
    </add_file>
    <modify_file>
    Makefile<removed_lines num='2'/><added_lines num='2'/>
    </modify_file>
    <modify_file>
    autoconf.mk.in<removed_lines num='5'/><added_lines num='2'/>
    </modify_file>
    <modify_file>
    configure.in<removed_lines num='7'/><added_lines num='67'/>
    </modify_file>
    <modify_file>
    darcs_cgi.lhs<removed_lines num='1'/><added_lines num='2'/>
    </modify_file>
    </summary>
</patch>
</changelog>
msg3858 (view) Author: zooko Date: 2008-03-10.19:09:02
pessi asked what the changes --verbose says:

diffing dir...
Wed May 21 20:37:16 PDT 2003  simons@cryp.to
  * Autoconf Redux Part II
  We're getting somewhere:
  
   - If the configured prefix does _not_ contain the string "darcs", it
     will be appended as directory name to $sysconfdir and $libexecdir.
     This is usually what the user wants.
  
   - If no prefix is given, $sysconfdir will be /etc.
  
   - Added Autoconf.lhs module for system dependent information. So far:
     darcsconfigdir. Thanks to this module, ghc will also know when to
     re-build a binary because configure ran again.
  
   - configure will now dump a nice summary before it terminates.
    {
    move ./Autoconf.lhs ./Autoconf.lhs.in
    addfile ./Autoconf.lhs.in
    hunk ./Autoconf.lhs.in 1
    +%
    +% System dependent information generated by Autoconf.
    +%
    +% @configure_input@
    +%
    +\begin{code}
    +module Autoconf ( darcsconfdir ) where
    +
    +darcsconfdir :: String
    +darcsconfdir = "@sysconfdir@/darcs"
    +\end{code}
    hunk ./Makefile 10
    -   Depends.lhs ArgumentDefaults.lhs
    +   Depends.lhs ArgumentDefaults.lhs Autoconf.lhs
    hunk ./Makefile 19
    -autoconf.mk:       configure
    +Autoconf.lhs autoconf.mk:  configure
    hunk ./autoconf.mk.in 6
    -DESTDIR            =
    -prefix             = @prefix@
    -exec_prefix        = @exec_prefix@
    hunk ./autoconf.mk.in 9
    -datadir            = @datadir@/darcs
    +datadir            = @datadir@
    hunk ./autoconf.mk.in 11
    -libexecdir      = @libexecdir@/darcs
    +libexecdir      = @libexecdir@
    hunk ./configure.in 1
    +dnl Process this file with Autoconf to produce a configure script.
    hunk ./configure.in 3
    -dnl configure.ac -- Process this file with autoconf to produce a configure
script.
    -dnl
    +dnl Written and maintained by Peter Simons <simons@cryp.to>.
    +dnl This is in the public domain.
    +
    hunk ./configure.in 8
    -dnl Get rid of the lousy '-g -O2' defaults.
    +dnl Perform some incredibly experimental magic to guess installation
    +dnl paths in an unexpectedly clever way. Henceforth evaluate the paths
    +dnl right away so that we can guarantee _absolute_ paths for our
    +dnl customers.
    hunk ./configure.in 13
    +if test "$prefix" = "NONE"; then
    +    prefix=/usr/local
    +    if test "$exec_prefix" = "NONE"; then
    +        exec_prefix=/usr/local
    +    fi
    +    if test "$sysconfdir" = '${prefix}/etc'; then
    +        sysconfdir=/etc
    +    fi
    +fi
    +if test "$exec_prefix" = "NONE"; then
    +    exec_prefix=$prefix
    +fi
    +case $prefix in
    +    *darcs*)
    +        ;;
    +    *)
    +        if test "$datadir" = '${prefix}/share'; then
    +            datadir=$datadir/darcs
    +        fi
    +        if test "$libexecdir" = '${exec_prefix}/libexec'; then
    +            libexecdir=$libexecdir/darcs
    +        fi
    +        ;;
    +esac
    +bindir=`eval echo $bindir`
    +sbindir=`eval echo $sbindir`
    +mandir=`eval echo $mandir`
    +datadir=`eval echo $datadir`
    +sysconfdir=`eval echo $sysconfdir`
    +libexecdir=`eval echo $libexecdir`
    +
    +dnl Get rid of the lousy '-g -O2' defaults
    +
    hunk ./configure.in 48
    +
    hunk ./configure.in 57
    +
    hunk ./configure.in 89
    -   AC_MSG_ERROR(Cannot find system's pthread library; please set the
LDFLAGS environment variable!)
    -   ])
    +        AC_MSG_ERROR(Cannot find system's pthread library; please set the
LDFLAGS environment variable!)
    +        ])
    hunk ./configure.in 95
    -dnl Write results.
    hunk ./configure.in 96
    -AC_OUTPUT(autoconf.mk)
    +dnl Write results
    +
    +AC_OUTPUT(autoconf.mk Autoconf.lhs)
    +cat <<[EOF]
    +
    +The build will is configured as follows:
    +
    +    bindir          = $bindir
    +    sbindir         = $sbindir
    +    mandir          = $mandir
    +    datadir         = $datadir
    +    sysconfdir      = $sysconfdir
    +    libexecdir      = $libexecdir
    +
    +    Build Manual    = yes
    +
    +If you want to adjust any of these values, edit autoconf.mk and
    +Autoconf.lhs -- or run configure with appropriate settings.
    +
    +[EOF]
    +
    +dnl Responsibility shifts to the user after this point.
    hunk ./darcs_cgi.lhs 40
    +import Autoconf
    hunk ./darcs_cgi.lhs 102
    -  ls <- (map (takeWhile (/='#')).lines) `liftM` readFile "/etc/darcs/cgi.conf"
    +  ls <- (map (takeWhile (/='#')).lines) `liftM` readFile (darcsconfdir ++
"/cgi.conf")
    }
msg4019 (view) Author: zooko Date: 2008-03-26.03:15:55
Folks: this bug is blocking me from setting up a nice trac-darcs repository
browser.  It appears to be a bug in darcs's repository for darcs development.

Or do I misunderstand and there is some meaning to the notion that the same
patch moved Autoconf.lhs to Autoconf.lhs.in and also added a new file
Autoconf.lhs.in ?
msg4022 (view) Author: droundy Date: 2008-03-26.14:02:23
This used to be the semantics that darcs supported (intentionally) and we
haven't been willing to break old repositories.  I suppose we could clean this
up when converting to darcs-2 format.  But for now, we have to treat renames of
nonexistent files as identity patches, because we used to allow them.

Is there something you'd like to have changed?
msg4026 (view) Author: zooko Date: 2008-03-26.15:41:47
What I want is to be able to use the trac-darcs plugin to browse the darcs
repository itself (and, of course, other repositories that might have similar
issues).

So, if "darcs convert" to convert to darcs-2-format would clean this up, then I
would probably be satisfied, as I could run trac-darcs pointing at a
darcs-2-format repository of darcs.

Otherwise, I could hack the trac-darcs plugin to, um, to ignore renames of
non-existent files.  Are you going to do the former -- cause darcs convert to
clean this up?
msg4046 (view) Author: droundy Date: 2008-03-27.00:13:02
I believe this is resolved.  It's not yet tested, and once again the
automatic-patch-closing has failed me.  :(
msg4049 (view) Author: zooko Date: 2008-03-27.01:23:07
> I believe this is resolved.

Great!  Thank you!  I will set up a trac instance on a darcs-2-format  
conversion of the darcs-unstable repository!

Regards,

Zooko
msg12710 (view) Author: ganesh Date: 2010-10-15.21:51:01
zooko, did you actually verify that this was fixed? From the code change, 
I can't see how the fix could have worked.
msg12711 (view) Author: zooko Date: 2010-10-16.05:37:27
I'm sorry, I do not remember what happened with this, but I believe the
repo in question was eventually replaced by this one:
http://tahoe-lafs.org/trac/darcs-2/log/trunk/ .
msg12712 (view) Author: ganesh Date: 2010-10-16.12:09:33
Thanks - I hadn't read carefully enough to realise you were talking 
about the darcs repo, not tahoe-lafs. Current darcs HEAD does have the 
same sequence of patches, which validates my belief that the fix was 
ineffective.

As an aside, anyone know what it is even supposed to mean? I guess the 
key point is that the initial file didn't exist, so the answer is as 
David says that it means identity. I hope that it wasn't possible with 
files that did actually exist! Current darcs doesn't allow either case.
msg16413 (view) Author: markstos Date: 2012-12-14.15:28:00
ganesh said "Current darcs doesn't allow either case." and no one else 
has complained in 2+ years. I'm marking this as resolved.

Please re-open if this issue is known to persist.
History
Date User Action Args
2008-03-10 18:56:08zookocreate
2008-03-10 18:58:23zookosetpriority: bug
nosy: droundy, tommy, beschmi, kowey, zooko
status: unread -> unknown
messages: + msg3857
2008-03-10 19:09:04zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg3858
2008-03-11 17:37:59zookolinkissue745 superseder
2008-03-26 03:16:00zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg4019
2008-03-26 14:02:25droundysetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg4022
2008-03-26 14:03:32droundysetpriority: bug -> feature
nosy: droundy, tommy, beschmi, kowey, zooko
2008-03-26 15:41:48zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg4026
2008-03-27 00:13:04droundysetstatus: unknown -> resolved-in-unstable
nosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg4046
2008-03-27 01:23:09zookosetnosy: droundy, tommy, beschmi, kowey, zooko
messages: + msg4049
2008-09-04 21:32:57adminsetstatus: resolved-in-unstable -> resolved
nosy: + dagit
2009-08-06 17:56:28adminsetnosy: + markstos, jast, Serware, dmitry.kurochkin, darcs-devel, mornfall, simon, thorkilnaur, - droundy
2009-08-06 21:00:24adminsetnosy: - beschmi
2009-08-10 22:17:54adminsetnosy: - markstos, darcs-devel, jast, Serware, mornfall
2009-08-11 00:08:38adminsetnosy: - dagit
2009-08-25 18:07:34adminsetnosy: + darcs-devel, - simon
2009-08-27 14:09:27adminsetnosy: tommy, kowey, darcs-devel, zooko, thorkilnaur, dmitry.kurochkin
2010-10-15 21:51:02ganeshsetstatus: resolved -> unknown
nosy: + ganesh
messages: + msg12710
2010-10-16 05:37:27zookosetmessages: + msg12711
2010-10-16 12:09:34ganeshsetmessages: + msg12712
2012-12-14 15:28:02markstossetstatus: unknown -> resolved
messages: + msg16413