/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive/backend/info.py

  • Committer: Szilveszter Farkas (Phanatic)
  • Date: 2006-08-03 10:44:56 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060803104456-b5f901b6775ef158
Push dialog now displays stored location

2006-08-03  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/gtk/push.py: display known push location if available
    * olive/backend/info.py: implemented get_push_location()

Show diffs side-by-side

added added

removed removed

Lines of Context:
118
118
    else:
119
119
        return tmpfile[1]
120
120
 
 
121
def get_push_location(location):
 
122
    """ Get the stored push location of a branch.
 
123
    
 
124
    :param location: the path to the branch
 
125
    
 
126
    :return: the stored location
 
127
    """
 
128
    from bzrlib.branch import Branch
 
129
    
 
130
    try:
 
131
        branch = Branch.open_containing(location)[0]
 
132
    except errors.NotBranchError:
 
133
        raise NotBranchError(location)
 
134
    except:
 
135
        raise
 
136
    
 
137
    return branch.get_push_location()
 
138
 
121
139
def info(location):
122
140
    """ Get info about branch, working tree, and repository
123
141