branch command failed with --hardlink option

Bug #309433 reported by Sebastien Richard
2
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned

Bug Description

I tried branching with the --hardlink option and it failed with the stack trace mentioned below. I tested it in a shared repo and in a normal repo and on both test it failed.

The --hardlink option worked when I did a small test containing a simple text file.

Thanks

bzr: ERROR: exceptions.AttributeError: 'module' object has no attribute 'link'

Traceback (most recent call last):
  File "bzrlib\commands.pyo", line 893, in run_bzr_catch_errors
  File "bzrlib\commands.pyo", line 839, in run_bzr
  File "bzrlib\commands.pyo", line 539, in run_argv_aliases
  File "bzrlib\builtins.pyo", line 980, in run
  File "bzrlib\bzrdir.pyo", line 1137, in sprout
  File "bzrlib\bzrdir.pyo", line 1451, in create_workingtree
  File "bzrlib\workingtree_4.pyo", line 1399, in initialize
  File "bzrlib\transform.pyo", line 1932, in build_tree
  File "bzrlib\transform.pyo", line 2024, in _build_tree
  File "bzrlib\transform.pyo", line 2067, in _create_files
  File "bzrlib\transform.pyo", line 390, in create_hardlink
AttributeError: 'module' object has no attribute 'link'

bzr 1.9 on python 2.5.2 (win32)
arguments: ['bzr', 'branch', '--hardlink', 'st1', 'st2']
encoding: 'cp1252', fsenc: 'mbcs', lang: None
plugins:
  bzrtools C:\Program Files\Bazaar\plugins\bzrtools [1.9.1]
  cvsps_import E:\Documents and Settings\TheUser\Application Data\bazaar\2.0\plugins\cvsps_import [unknown]
  fastimport E:\Documents and Settings\TheUser\Application Data\bazaar\2.0\plugins\fastimport [unknown]
  launchpad C:\Program Files\Bazaar\plugins\launchpad [unknown]
  qbzr C:\Program Files\Bazaar\plugins\qbzr [0.9.5]
  svn C:\Program Files\Bazaar\plugins\svn [0.4.14]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.

Tags: win32
Revision history for this message
Andrew Bennetts (spiv) wrote :

Python's os.link function doesn't exist on Windows, but bzrlib.transform's create_hardlink method doesn't handle that. My guess is that --hardlink should probably be a no-op on Windows.

Changed in bzr:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Sebastien Richard (rich-seb) wrote :

I mentioned earlier that I did a test with a small project containing 1 file, but I think I must have done something else because I tried it again and it failed with the same error.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.