#74 lmerge option for copying rather than linking

closed
nobody
UNIX (32)
3
2009-10-13
2008-03-07
Jeff Kelley
No

I'd like to be able to use lmerge to duplicate a transcript without making a hardlink. The ideal solution would be a flag, perhaps "-c," that I could pass to lmerge so that it would copy the files rather than linking them. The current man page doesn't appear to offer that functionality in any of its flags.

Discussion

  • Wes Craig

    Wes Craig - 2008-03-10

    Logged In: YES
    user_id=1292952
    Originator: NO

    How about cp -r?

     
  • Jeff Kelley

    Jeff Kelley - 2008-03-10

    Logged In: YES
    user_id=2030333
    Originator: YES

    Sure, you could use cp -r, but this would make things much cleaner. you'd have this:

    lmerge -c transcript1 /dev/null transcript2

    rather than this:

    cp transcript1 transcript2
    cp -r ../file/transcript1/ ../file/transcript2/

    Add some directory structures there and that's a lot of typing with lots of room for error. The nice thing about lmerge is that it allows you to think of the transcript as all-encompassing without worrying about the underlying file structure.

     
  • Wes Craig

    Wes Craig - 2008-03-10

    Logged In: YES
    user_id=1292952
    Originator: NO

    How about a script, let's call it lcopy:

    #!/bin/sh
    #
    # Usage: lcopy src dst
    #

    cp "$1" "$2" && cp -r ../file/"$1" ../file/"$2"

     
  • Patrick McNeal

    Patrick McNeal - 2008-07-07
    • priority: 5 --> 3
     
  • Patrick McNeal

    Patrick McNeal - 2008-07-07

    Logged In: YES
    user_id=1296576
    Originator: NO

    Sounds reasonable. Setting to low priority as this can currently be done with other command line tools. ( Use lmerege to create new transcript, then use cp -R to actually copy the files and rename transcript to match the cp'ed directory. )

     
  • Anonymous - 2009-02-13

    Here is a patch that implements what slaunchman is requesting.
    Uses 'cp' via a system() call. Not sure if this is the best solution.

    http://rs471.rapidshare.com/files/197416537/radmind-1.13.0-lmergeC.patch

    Examples:
    lmerge -C path/to/tran.T /dev/null path/to/newtran.T
    lmerge -C path/to/tran1.T path/to/tran2 path/to/tran3 path/to/newtran.T
    lmerge -f -C path/to/tran-patch.T path/to/tran.T

     
  • Andrew Mortensen

    Discussion moved to patch 2877346.

     
  • Andrew Mortensen

    • status: open --> closed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks